You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2013/05/17 03:52:09 UTC

[07/21] ios commit: [CB-3394] Re-fix: Cordova iOS crashes when multiple access elements in config.xml

[CB-3394] Re-fix: Cordova iOS crashes when multiple access elements in config.xml


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/93784cd5
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/93784cd5
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/93784cd5

Branch: refs/heads/3.0.0
Commit: 93784cd5cd695bb4d70311f664ac245d9f1d29af
Parents: 6bbdd78
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu May 16 10:48:57 2013 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu May 16 10:48:57 2013 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVWhitelist.m |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/93784cd5/CordovaLib/Classes/CDVWhitelist.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVWhitelist.m b/CordovaLib/Classes/CDVWhitelist.m
index 13a2572..e6807bd 100644
--- a/CordovaLib/Classes/CDVWhitelist.m
+++ b/CordovaLib/Classes/CDVWhitelist.m
@@ -212,6 +212,11 @@ NSString* const kCDVDefaultSchemeName = @"cdv-default-scheme";
     while (regex = [enumerator nextObject]) {
         NSPredicate* regex_test = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex];
 
+        // if wildcard, break out and allow
+        if ([regex isEqualToString:@"*"]) {
+            return YES;
+        }
+
         if ([regex_test evaluateWithObject:urlHost] == YES) {
             // if it matches at least one rule, return
             return YES;