Skip to content
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

Parse server seems to return incorrect count if master key is provided #1690

Closed
3 tasks done
xor22h opened this issue May 3, 2016 · 1 comment · Fixed by #6799 · May be fixed by yozef/parse-server#29 or Bhanditz/parse-server#18
Closed
3 tasks done

Parse server seems to return incorrect count if master key is provided #1690

xor22h opened this issue May 3, 2016 · 1 comment · Fixed by #6799 · May be fixed by yozef/parse-server#29 or Bhanditz/parse-server#18

Comments

@xor22h
Copy link

xor22h commented May 3, 2016

Check out this issue for an ideal bug report. The closer your issue report is to that one, the more likely we are to be able to help, and the more likely we will be to fix the issue quickly!

For implementation related questions or technical support, please refer to the Stack Overflow and Server Fault communities. For database migration help, please file a bug report.

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!

Parse server seems to return incorrect count if master key is provided.

Steps to reproduce

Request from parse-dashboard (Chrome dev tools / Copy as CURL)

$ curl 'https://SERVER_ADDRESS/classes/DiscoverLike' 
-H 'pragma: no-cache' 
-H 'accept-encoding: gzip, deflate' 
-H 'accept-language: en-US,en;q=0.8,lt;q=0.6,ru;q=0.4' 
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36' 
-H 'content-type: text/plain' 
-H 'accept: */*' 
-H 'cache-control: no-cache' 
--data-binary '{"where":{},"limit":0,"count":1,"_method":"GET","_ApplicationId":"1B804BBB-581B-4AE0-8A48-33E017B4D1F2","_ClientVersion":"js1.6.14","_MasterKey":"REMOVED_FOR_PRIVACY"}' 
--compressed | underscore pretty

Response:

{ results: [ ], count: -1 }

Modified request with removed _MasterKey;

$ curl 'https://SERVER_ADDRESS/classes/DiscoverLike' 
-H 'pragma: no-cache' 
-H 'accept-encoding: gzip, deflate' 
-H 'accept-language: en-US,en;q=0.8,lt;q=0.6,ru;q=0.4' 
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36' 
-H 'content-type: text/plain'
-H 'accept: */*' 
-H 'cache-control: no-cache' 
--data-binary '{"where":{},"limit":0,"count":1,"_method":"GET","_ApplicationId":"1B804BBB-581B-4AE0-8A48-33E017B4D1F2","_ClientVersion":"js1.6.14"}' 
--compressed | underscore pretty

Response: (As expected)

{ results: [ ], count: 13 }

Logs/Trace

@flovilmart
Copy link
Contributor

Closing due to lack of activity, please update to latest parse-server version and reopen if the issue persist.

Don't forget to include your current:

  • node version
  • npm version
  • parse-server version
  • any relevant logs (VERBOSE=1 will enable verbose logging)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants