[SERVER-8544] Regex option "ii" is accepted by JSON to BSON parser Created: 13/Feb/13 Updated: 04/Jun/19 Resolved: 04/Jun/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code, Shell |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Andrew Emil (Inactive) | Assignee: | Nathan Brown (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | neweng, platforms-re-triaged | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Steps To Reproduce: | add the following test to jsontests.cpp class RegexInvalidOption7 : public Bad { }"; and the output is JsonTests::FromJsonTests::RegexInvalidOption7 Expected expression fromjson( json() ) to throw MsgAssertionException but it threw nothing. @src/mongo/dbtests/jsontests.cpp:447 |
||||
| Sprint: | Dev Tools 2019-06-03, Dev Tools 2019-06-17 | ||||
| Participants: | |||||
| Comments |
| Comment by Githook User [ 04/Jun/19 ] |
|
Author: {'name': 'Nathan Brown', 'email': 'nathan.brown@10gen.com'}Message: |
| Comment by Shaun Verch [ 23/Jun/14 ] |
|
The following function is the only thing that needs to be modified to fix this: https://github.com/mongodb/mongo/blob/r2.7.2/src/mongo/db/json.cpp#L907 The existing unit tests for regular expressions in the JSON parser are here: https://github.com/mongodb/mongo/blob/r2.7.2/src/mongo/dbtests/jsontests.cpp#L1875 This is where the test for this fix should be added. |