Skip to content

Query retrieves objects with empty ACL without master key #504

Closed
@xaratt

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.

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