parse-community / parse-community/parse-server
ProtectedFields not properly used in beforeSave trigger
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Issue Checklist
- [ x] I am not disclosing a vulnerability.
- [ x] I am not just asking a question.
- [ x] I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server.
Issue Description
On Parse Server 4.3.0 (I haven't tried on newer release yet) there's an issue with Protected Fields in the beforeSave trigger. It seems the object is fetched without any identification (no user token or no master key), as the fields that are marked as "protected for public access (*)" are not available in the beforeSave object, whereas the owner of the object (identified with a userField:owner pointer) should have access to every fields
Steps to reproduce
- add a full access for a userField pointer
- add a protected field for public (*)
- perform an update of the object while being identified as the owner
- check the protected field presence
Actual Outcome
The protected field is not in the beforeSave object
Expected Outcome
As the user is the owner, he should have full access
Environment
Server
- Parse Server version: 4.3.0
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
local&AWS
Database
- System (MongoDB or Postgres):
MongoDB - Database version:
3.6 - Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
MongoDB Atlas
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
iOS
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue through the beforeSave trigger using Protected Fields, a userField:owner pointer, and an owner-authenticated update. Compare the fields visible in beforeSave with the expected owner access, and consider the issue done when protected fields are available to the owner without changing public access behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api, authorization, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100