Closed scottinet closed 8 years ago
Ok I've been able to pinpoint the problem.
It can be reproduced with this much simpler filter:
{
"term": {
"user.id": "foobar"
}
}
We store the field name user.id
allowing users to filter on a nested attribute. And it works fine when testing documents.
It doesn't work so well when trying to remove the filter though, because we're removing a filter path (detailing how to navigate in the filters object structure), where each path component is separated by a .
character:
collection.index.user.id.hashedValue
And when the removal function tries to get each component to remove a client from it, we get a collection => index => user => id => value
path instead of collection => index => user.id => value
This leads to scanning recursively the filters object for unknown paths, leading to undefined sub-objects, making Kuzzle crash.
A fix has been submitted for review. If it gets validated, I'll backport it to the beta
version of Kuzzle.
Renamed this issue after finding more about the bug. See below
This bug has been reported on the
beta
branch of Kuzzle, and is still live on the latestdevelop
branch.How to reproduce:
ProfitKuzzle dies and restart with the following error: