[SERVER-45588] Use of invalid regex in schema validator can prevent upgrade Created: 15/Jan/20  Updated: 24/Feb/20  Resolved: 24/Feb/20

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 4.2.2
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Ian Boros Assignee: Ian Boros
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-45611 Lazily enforce that persisted collect... Closed
Related
Operating System: ALL
Sprint: Query 2020-01-27, Query 2020-02-10, Query 2020-02-24, Query 2020-03-09
Participants:

 Description   

Repro:

// on 4.0 create a validator with an invalid regex.
db.createCollection("c", {
    validator:
        {email: {$regex: "^*"}}
})
// Now start a 4.2 binary using same data files.

The 4.2 binary will fail at startup with something like:

[initandlisten] exception in
    initAndListen: Location51091: Regular expression is invalid: nothing to repeat,
    terminating



 Comments   
Comment by Ian Boros [ 24/Feb/20 ]

Closing as duplicate of SERVER-45611 as it was fixed in the 4.2 branch.

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