cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-1695) [iOS]: CDVURLProtocol should not apply whitelist to non-Cordova view controllers/requests
Date Wed, 21 Nov 2012 18:45:58 GMT

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

Shazron Abdullah commented on CB-1695:
--------------------------------------

I did 5 samples on my iPhone 4S (times in ms): 224, 132, 128, 125, 130 - not too bad I think.

I think the second option is better, since we have to think about the case where people are
using this as an embedded Cordova WebView, and we can't of course reasonably expect other
UIWebView instances by other libraries to modify their UA.

Regarding the request by plugins -- good ideas, let's do it. 

I'll re-factor how I'm doing it so plugins can get the Cordova WebView UA used, as well as
cache the UA - with invalidation by iOS version change and locale change. I'll add a separate
issue for this.

                
> [iOS]: CDVURLProtocol should not apply whitelist to non-Cordova view controllers/requests
> -----------------------------------------------------------------------------------------
>
>                 Key: CB-1695
>                 URL: https://issues.apache.org/jira/browse/CB-1695
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.2.0
>         Environment: Xcode 4.5 / OS X 10.7.5 (Lion) / Commit ef67dcf7bce56c69299bb89ab16c1803d0edd895
>            Reporter: Kevin Hawkins
>            Assignee: Shazron Abdullah
>             Fix For: 2.3.0
>
>
> Registered NSURLProtocol objects respond to NSURLRequests across an application.  As
such, CDVURLProtocol handles all requests that would pass through any UIWebView in the application,
and applies Cordova's whitelist rules accordingly to each http(s) request.
> This is an unreasonable overreach of authority, in an app where Cordova is only one component
of the app.  Consider the case where I have my own UIWebView (think ChildBrowser), and I want
to load arbitrary web content.  This web content has no access to the Cordova sandbox on the
device, and as such should not be subject to the security restrictions that limit requests
to whitelisted/trusted hosts.
> The logic in [CDVURLProtocol canInitWithRequest:] that validates the view controller
against the global CDVViewController registry, for /!gap_exec calls, should be extended to
make the same check against http(s) calls, and allow them without whitelist comparison for
requests that originate outside of any registered CDVViewController instances.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message