cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse <purplecabb...@gmail.com>
Subject Re: [Android] Whitelisting is broken, whitelist is ignored
Date Sat, 19 Jan 2013 01:41:02 GMT
I have noticed this as well, while implementing for Windows Phone.
There are also issues with the iOS implementation [1]

There are multiple string replacements that replace eachother ...

First we replace the "*." with "(\\s{0}|*.)"
Then, we replace "." with "\\."
and "*" with ".*"
The problem is that the . and * in the first piece of regex is replaced by
the others ...
So well end up with "(\\s{0}|.*\\.)"

Good times in the land of regex ....

I think it would be beneficial to write some native tests to simply test
the function and verify all url wildcard types and positions, as it appears
it is broken everywhere.

[1]
https://github.com/apache/cordova-ios/blob/master/CordovaLib/Classes/CDVWhitelist.m#L126

On Fri, Jan 18, 2013 at 4:15 PM, Joe Bowser <bowserj@gmail.com> wrote:

> Hey
>
> It seems that the recent move to the Config class has broken
> whitelisting.  I'm currently trying to figure out why, but at the
> moment, it's broken. I created a bug and set it to be a blocker, since
> we should be able to load whitelisted URIs directly in the
> CordovaWebView.
>
> Am I the only one who notices this behaviour?
>
> Joe
>



-- 
@purplecabbage
risingj.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message