Skip to content

Query retrieves objects with empty ACL without master key #504

Description

@xaratt

Objects with empty or non-existing ACL presents in ParseQuery::find results.

For example look at this test

        $obj = ParseObject::create('TestObject');
        $restrictedACL = new ParseACL();
        $obj->setACL($restrictedACL);
        $obj->save();
        $query = new ParseQuery('TestObject');
        $count = $query->count();

$count will be 1 after running code with local parse-server and 0 - with api.parse.com.

I mean that problem is here: this request transforms to mongo query

{'$and': [
    {},
    {'$or': [ 
        {"_rperm" : { "$exists": false }},
        {"_rperm" : { "$in" : ["*"]}}
    ]}
]};

which just returns all documents without _rperm field and doesn't care about ACL field.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions