You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Adam Kocoloski (JIRA)" <ji...@apache.org> on 2010/08/31 06:32:53 UTC
[jira] Closed: (COUCHDB-875) mochijson2 does not validate input
strings after encountering an escape character
[ https://issues.apache.org/jira/browse/COUCHDB-875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adam Kocoloski closed COUCHDB-875.
----------------------------------
Resolution: Fixed
Fixed and tested in mochijson2. Will submit the patch upstream.
> mochijson2 does not validate input strings after encountering an escape character
> ---------------------------------------------------------------------------------
>
> Key: COUCHDB-875
> URL: https://issues.apache.org/jira/browse/COUCHDB-875
> Project: CouchDB
> Issue Type: Bug
> Affects Versions: 0.11.2, 1.0.1
> Reporter: Adam Kocoloski
> Assignee: Adam Kocoloski
> Fix For: 0.11.3, 1.0.2
>
>
> 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©">>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.