incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Jensen (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-192) Plugins fail silently when string argument contains \x00 charachters
Date Wed, 25 Jan 2012 04:26:40 GMT

    [ https://issues.apache.org/jira/browse/CB-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13192853#comment-13192853
] 

Derek Jensen commented on CB-192:
---------------------------------

On 1.3.0 I can guarantee you that console.log("hello\x00"); fails silently.  No log output
at all.  Likewise ANY plugin that has a string with an imbedded null fails silently.  The
point is, it's not illegal JSON, so I doubt he throws an error.

Why don't you just change the call to use JKParseOptionLooseUnicode?  Then you get the
nulls properly formatted in legal UNICODE and in legal JSON.  It's not like the JSON strings
are coming from some mystery place.  They're always encoded by PhoneGap.exec.  Letting JSONKit
get past it's own admittedly arbitrary decision on nulls should not hamper us from getting
legal decoded strings out of PhoneGap's plugin library.
                
> Plugins fail silently when string argument contains \x00 charachters
> --------------------------------------------------------------------
>
>                 Key: CB-192
>                 URL: https://issues.apache.org/jira/browse/CB-192
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.3.0
>         Environment: Mac OS X Lion, XCode 4.2, Phonegap 1.3.0
>            Reporter: Derek Jensen
>            Assignee: Shazron Abdullah
>
> Passing an string argument with hex 0 imbedded in it causes the plugin to fail silently.
> While the argument is correctly processed by JSON.stringify(), the plugin objective-c
code
> is never called.  To see this in action, try console.log("foo\x00");

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message