Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-875

mochijson2 does not validate input strings after encountering an escape character

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.11.2, 1.0.1
    • 1.0.2, 1.0.3
    • None
    • None

    Description

      This example throws invalid_json (as it should, <<169>> is not a valid UTF-8 byte sequence)

      1> couch_util:json_decode(<<$", "abc", 169, $">>).

        • exception throw: {invalid_json,<<"\"abc©\"">>}

          in function couch_util:json_decode/1

      but this example does not

      2> couch_util:json_decode(<<$", "abc
      n", 169, $">>).
      <<"abc\n©">>

      Attachments

        Activity

          People

            kocolosk Adam Kocoloski
            kocolosk Adam Kocoloski
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: