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

escape double quotes \" when printing strings to log

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Logging, Usability
    • Server Security

    Description

      A query like this:

      db.foo.find({a: "\"i'm a quoted text\""})

      is printed to the log file like so:

      2014-12-21T15:43:14.894+1100 I QUERY    [conn5] query test.foo query: { a: ""i'm a quoted text"" } planSummary: EOF ...

      The inner quotes are not escaped. This makes parsing this string with json/javascript parsers impossible.

      Instead, it should be printed like so:

      2014-12-21T15:43:14.894+1100 I QUERY    [conn5] query test.foo query: { a: "\"i'm a quoted text\"" } planSummary: EOF ...

      Attachments

        Activity

          People

            backlog-server-security Backlog - Security Team
            thomas.rueckstiess@mongodb.com Thomas Rueckstiess
            Votes:
            4 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: