New Issue Checklist
Issue Description
If there are no classLevelPermissions in the schema perm below is undefined thus the error. A simple check should fix this issue since a check for perm already exist within the filterSensitiveData function but I'm not familiar with protectedFields.
|
// fields not requested by client (excluded), |
|
//but were needed to apply protecttedFields |
|
perms.protectedFields && |
|
perms.protectedFields.temporaryKeys && |
|
perms.protectedFields.temporaryKeys.forEach(k => delete object[k]); |
Steps to reproduce
I accidentally ran into this issue while fixing a flaky test on the JS SDK. I don't have a way to reproduce this error server side.
Actual Outcome
Unhandled promise rejection
Expected Outcome
No errors
Environment
Server
- Parse Server version:
6.0.0-alpha.27
- Operating system:
Mac
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
local
Database
- System (MongoDB or Postgres):
Mongodb
- Database version:
4.10.0
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
local
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
JS
- SDK version:
4.0.0
Logs
New Issue Checklist
Issue Description
If there are no classLevelPermissions in the schema
permbelow is undefined thus the error. A simple check should fix this issue since a check forpermalready exist within thefilterSensitiveDatafunction but I'm not familiar with protectedFields.parse-server/src/Controllers/DatabaseController.js
Lines 222 to 226 in 8adc054
Steps to reproduce
I accidentally ran into this issue while fixing a flaky test on the JS SDK. I don't have a way to reproduce this error server side.
Actual Outcome
Unhandled promise rejection
Expected Outcome
No errors
Environment
Server
6.0.0-alpha.27MaclocalDatabase
Mongodb4.10.0localClient
JS4.0.0Logs