-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Labels
type:bugImpaired feature or lacking behavior that is likely assumedImpaired feature or lacking behavior that is likely assumed
Description
Issue Description
Session objects can be updated or created through REST API without using master key. Specifically, a user can update his/her current session's user field to other users, or add a new session object associated to other users.
Steps to reproduce
Update current session
- Log in to parse application
- Retrieve current session through https://cabana.yahoo.com/parse/sessions/me
- Update the current session's user field through a PUT request
curl -X PUT
-H "X-Parse-Application-Id: myAppId"
-H "X-Parse-Session-Token: mySessionToken"
-G
--data-urlencode "where={"user":{"__type":"Pointer","className":"_User","objectId":""}}"
/sessions/
Create new session
- Log in to parse application
- Create a new session though a POST request
curl -X POST
-H "X-Parse-Application-Id: myAppId"
-H "X-Parse-Session-Token: mySessionToken"
-G
--data-urlencode "where={"user":{"__type":"Pointer","className":"_User","objectId":""}}"
/sessions/
Expected Results
Session should not be writable once created. In addition, users should not be able to create sessions associated to any user.
Actual Outcome
Sessions can be modified or created to associate to any user.
Environment Setup
-
Server
- parse-server version (Be specific! Don't say 'latest'.) : 2.3.7
- Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): Heroku
-
Database
- MongoDB version: 3.2.16
- Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): mLab
Metadata
Metadata
Assignees
Labels
type:bugImpaired feature or lacking behavior that is likely assumedImpaired feature or lacking behavior that is likely assumed