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

Delete character is allowed by JSON to BSON parser

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • ALL
    • Hide

      add the following test to jsontests.cpp

      class QuotedFieldName7 : public Bad {
      virtual string json() const {
      return "

      { \"del\\u007Fdel\" : \"b\" }

      ";
      }
      };

      and the output is

      JsonTests::FromJsonTests::QuotedFieldName7 Expected expression fromjson( json() ) to throw MsgAssertionException but it threw nothing. @src/mongo/dbtests/jsontests.cpp:447

      Show
      add the following test to jsontests.cpp class QuotedFieldName7 : public Bad { virtual string json() const { return " { \"del\\u007Fdel\" : \"b\" } "; } }; and the output is JsonTests::FromJsonTests::QuotedFieldName7 Expected expression fromjson( json() ) to throw MsgAssertionException but it threw nothing. @src/mongo/dbtests/jsontests.cpp:447

          Assignee:
          andrew.emil@10gen.com Andrew Emil (Inactive)
          Reporter:
          andrew.emil@10gen.com Andrew Emil (Inactive)
          Votes:
          0 Vote for this issue
          Watchers:
          3 Start watching this issue

            Created:
            Updated:
            Resolved: