]> git.saurik.com Git - cydia.git/commitdiff
Try harder to block all iTunes-related redirects.
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 5 Nov 2014 07:51:28 +0000 (23:51 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 5 Nov 2014 08:54:18 +0000 (00:54 -0800)
CyteKit/WebViewController.mm

index f1448e1a22c6591cc612bf66543241276eaaf1fc..33524f39afa105cf2a5ef6dbacc60609efb2d68d 100644 (file)
@@ -462,7 +462,17 @@ float CYScrollViewDecelerationRateNormal;
 #endif
 
     NSURL *url(request == nil ? nil : [request URL]);
-    if ([[url scheme] isEqualToString:@"itms-appss"] || [[url absoluteString] hasPrefix:@"https://itunes.apple.com/app/"]) {
+    NSString *scheme([[url scheme] lowercaseString]);
+    NSString *absolute([[url absoluteString] lowercaseString]);
+
+    if (
+        [scheme isEqualToString:@"itms"] ||
+        [scheme isEqualToString:@"itmss"] ||
+        [scheme isEqualToString:@"itms-apps"] ||
+        [scheme isEqualToString:@"itms-appss"] ||
+        [absolute hasPrefix:@"http://itunes.apple.com/"] ||
+        [absolute hasPrefix:@"https://itunes.apple.com/"] ||
+    false) {
         appstore_ = url;
 
         UIAlertView *alert = [[[UIAlertView alloc]