You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Joe Bowser <bo...@gmail.com> on 2013/01/19 01:15:37 UTC
[Android] Whitelisting is broken, whitelist is ignored
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
Re: [Android] Whitelisting is broken, whitelist is ignored
Posted by Jesse MacFadyen <pu...@gmail.com>.
Sorry, I didn't see the tests, I was in windows. I will see if I can
write a failing test.
There are still many differences between the android implementation
and the iOS one. For example the 'subdomains' attribute is supported
on android, and soon windows phone.
Cheers,
Jesse
Sent from my iPhone5
On 2013-01-19, at 7:57 AM, Shazron <sh...@gmail.com> wrote:
Yes, they are necessary. You can ask me why it was done or explain it in
plain english.
We do have tests. Did you check out our whitelist tests? They all pass:
https://github.com/apache/cordova-ios/blob/master/CordovaLibTests/CDVWhitelistTests.m
On Fri, Jan 18, 2013 at 5:41 PM, Jesse <pu...@gmail.com> wrote:
> 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 <bo...@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
>
Re: [Android] Whitelisting is broken, whitelist is ignored
Posted by Shazron <sh...@gmail.com>.
Yes, they are necessary. You can ask me why it was done or explain it in
plain english.
We do have tests. Did you check out our whitelist tests? They all pass:
https://github.com/apache/cordova-ios/blob/master/CordovaLibTests/CDVWhitelistTests.m
On Fri, Jan 18, 2013 at 5:41 PM, Jesse <pu...@gmail.com> wrote:
> 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 <bo...@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
>
Re: [Android] Whitelisting is broken, whitelist is ignored
Posted by Jesse <pu...@gmail.com>.
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 <bo...@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