Turn off "don't cast update pipelines by default" in favor of a more secure approach #14424
Open
2 tasks done
Labels
backwards-breaking
discussion
If you have any thoughts or comments on this issue, please share them!
Milestone
Prerequisites
Issue
In working on #14400, I got to thinking that the fact that update pipelines aren't casted may be risky for data integrity issues. Passing in untrusted data may lead to bypassing Mongoose casting entirely.
We should consider making update pipelines opt-in, either using a
mongoose.updatePipeline()
helper:or with an
updatePipeline
option:What do you think @hasezoey @AbdelrahmanHafez ?
The text was updated successfully, but these errors were encountered: