Skip to content

Fix LiveQuery unsafe user #3525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 19, 2017

Conversation

dstarke
Copy link
Contributor

@dstarke dstarke commented Feb 17, 2017

The LiveQuery server was explicitly calling enableUnsafeCurrentUser(), which should not be used in a server environment.

As far as I can tell, this was only used to provide a convenient way to get the user for a session token. I've replaced that mechanism with one that is safe to use when unsafeCurrentUser is disabled. I've also reviewed the LiveQuery code and fixed a place where it was issuing a call without using the master key.

The combination of these issues could result in unexpected failures for invalid session tokens.

Fixes #3516

@dstarke dstarke changed the title Fix livequery unsafe user Fix LiveQuery unsafe user Feb 17, 2017
@flovilmart
Copy link
Contributor

That looks great! Thanks!

@flovilmart flovilmart merged commit a520ea0 into parse-community:master Feb 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression in parse server 2.3.3 getting {"code":209,"message":"invalid session token"} with master key sometimes
3 participants