[SERVER-36924] BypassDocumentValidation accepts non-boolean arguments Created: 29/Aug/18 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Nicholas Zolnierz | Assignee: | Backlog - Query Optimization |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | query-44-grooming | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Optimization
|
| Participants: |
| Description |
|
Not sure if it's the shell or server, but setting bypassDocumentValidation defaults to true if the argument is not a boolean. e.g. bypassDocumentValidation: "false" results in true |
| Comments |
| Comment by Nicholas Zolnierz [ 31/Aug/18 ] |
|
Yeah james.wahlin mentioned its probably because we coerce to bool. Should be careful not to bring back something like |
| Comment by Asya Kamsky [ 31/Aug/18 ] |
|
This is probably because we coerce the value to boolean and any string coerces to True (in JS and in our server). Should validate and reject any non-booleans (probably in other places too, though it would be somewhat backwards breaking but justifiably so)
|