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

Properly escape string in tosjon()

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.5.4
    • Affects Version/s: None
    • Component/s: JavaScript
    • None
    • ALL

      > tojson("asdf\x00adsf")
      "asdfadsf"

      should be "asdf\u0000asdf"

      > tojson("asdf\nadsf")
      "asdf
      adsf"

      should be "asdf\nasdf"

      > tojson("asdf
      adsf")
      "asdf\adsf"

      should be "asdf
      asdf"

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: