Escape JSON strings for regex, symbol, and DBPointer types

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.7.0
    • Affects Version/s: 1.6.3
    • Component/s: libbson
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When converting BSON to JSON and extended JSON, bson_utf8_escape_for_json() should be used to escape strings for the regex, symbol, and DBPointer types. Escaping is currently done for keys, UTF-8 strings, code (w/ and w/o scope) types.

      Note: escaping regex patterns with bson_utf8_escape_for_json() causes the following BSON corpus test case to fail: regex with slash. JSON does not require forward slashes to be escaped, so this may mean that bson_utf8_escape_for_json() is too aggressive.

              Assignee:
              A. Jesse Jiryu Davis
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: