[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
bypassDocumentValidation: 5 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 SERVER-23901 if we end up scheduling this.

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)

 

Generated at Thu Feb 08 04:44:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.