Reviewed by Vicki.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Mar 2005 21:43:38 +0000 (21:43 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Mar 2005 21:43:38 +0000 (21:43 +0000)
<rdar://problem/4046018> REGRESSION (TOT): RSS pages don't display anything

* kwq/WebCoreBridge.mm:
        (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Exempt
feed: and feeds: pages from the local file security check.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8847 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/kwq/WebCoreBridge.mm

index 338339464ac6d46dcf156ae1b27590d68325ba56..58602de531d052f65766c2a54b9129073fc4de1c 100644 (file)
@@ -1,3 +1,13 @@
+2005-03-10  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Vicki.
+
+       <rdar://problem/4046018> REGRESSION (TOT): RSS pages don't display anything
+        
+       * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Exempt
+       feed: and feeds: pages from the local file security check.
+
 2005-03-10  Darin Adler  <darin@apple.com>
 
         Change written by Steve Peters, reviewed by me.
index b0000b96ace7bd83beb997bdb7f1ba1ad4fba812..345b184dce54e0a8dbcbaf855ecdfb2355bea321 100644 (file)
@@ -390,9 +390,14 @@ static bool initializedKJS = FALSE;
 {
     *hideReferrer = !hasCaseInsensitivePrefix(referrer,@"http:") && !hasCaseInsensitivePrefix(referrer, @"https:");
     BOOL referrerIsFileURL = hasCaseInsensitivePrefix(referrer, @"file:");
+
+    // FIXME: temporarily let Safari RSS load local file resources, this is a
+    // hole in the security check but can be fixed later.
+    BOOL referrerIsFeedURL = hasCaseInsensitivePrefix(referrer, @"feed:") || hasCaseInsensitivePrefix(referrer, @"feeds:");
+
     BOOL URLIsFileURL = [[URL scheme] compare:@"file" options:(NSCaseInsensitiveSearch|NSLiteralSearch)] == NSOrderedSame;
 
-    return referrerIsFileURL || !URLIsFileURL;
+    return referrerIsFileURL  || !URLIsFileURL || referrerIsFeedURL;
 }
 
 - (void)saveDocumentState