[SERVER-67881] Check unsupported regular expression options in BSON documents in the validate command Created: 07/Jul/22  Updated: 29/Oct/23  Resolved: 09/Aug/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Task Priority: Major - P3
Reporter: Yuhong Zhang Assignee: Richard Hausman (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2022-08-08, Execution Team 2022-08-22
Participants:

 Description   

We would want to validate the regular expression options according to the BSON spec:

Options are identified by characters, which must be stored in alphabetical order. Valid options are 'i' for case insensitive matching, 'm' for multiline matching, 'x' for verbose mode, 'l' to make \w, \W, etc. locale dependent, 's' for dotall mode ('.' matches everything), and 'u' to make \w, \W, etc. match unicode.????

We would want return warnings when running the validate command with/without the checkBSONConsistency: true option.

There might not be an existing interface in our jstest to insert non-conformant regex documents, so we would want to use wt tool to manually inject them. See example.



 Comments   
Comment by Richard Hausman (Inactive) [ 09/Aug/22 ]

https://github.com/10gen/mongo/pull/6704

Generated at Thu Feb 08 06:09:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.