Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-39697

Regex MatchExpression should error at parse time if the regex is not valid

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.1.9
    • Querying
    • None
    • Fully Compatible
    • Query 2019-03-11

    Description

      We attempted this improvement in SERVER-30986, the fix for which is present in 3.6.0 through 3.6.5 and 4.0.0. Due to a bug in the underlying PCRE library, this fix broke valid regular expressions which rely on some verbs (e.g. the UCP verb for configuring unicode support). See SERVER-34933 for details. This work was subsequently reverted, so recent versions of the 3.6 and 4.0 due not correctly reject invalid regular expressions.

      SERVER-39693 tracks the work to fix the underlying issue in PCRE. Once SERVER-39693 is done, we can reintroduce parse-time validation of regular expressions in the MatchExpression library. We should also make sure that any new aggregation expressions which evaluate perl-compatible regexes error at parse time if the regex is invalid, but this work is tracked elsewhere.

      Attachments

        Issue Links

          Activity

            People

              ian.boros@mongodb.com Ian Boros
              david.storch@mongodb.com David Storch
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: