Open
Description
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server.
Issue Description
Have a class with a column type Date. Try post with empty string as iso. Get proper error back
{
"code": 111,
"error": "This is not a valid Date"
}
Add beforeSave to the class and post again. Request will hang there forever. Server will fail with the following errors
(node:63110) UnhandledPromiseRejectionWarning: Error: Tried to encode an invalid date.
at encode (/Users/gordon/workspace/pipe17/pipe17-group/parse/node_modules/parse/lib/node/encode.js:85:13)
at _default (/Users/gordon/workspace/pipe17/pipe17-group/parse/node_modules/parse/lib/node/encode.js:132:10)
at SetOp.toJSON (/Users/gordon/workspace/pipe17/pipe17-group/parse/node_modules/parse/lib/node/ParseOp.js:155:32)
at ParseObject._getSaveJSON (/Users/gordon/workspace/pipe17/pipe17-group/parse/node_modules/parse/lib/node/ParseObject.js:485:61)
at success (/Users/gordon/workspace/pipe17/pipe17-group/parse/node_modules/parse-server/lib/triggers.js:385:45)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
- 🤩 I will submit a PR with a fix (but probably need someone else do a proper fix)
Environment
Server
- Parse Server version: 4.5.0
Metadata
Metadata
Assignees
Labels
No labels