Title: [228163] branches/safari-605-branch/Source

Diff

Modified: branches/safari-605-branch/Source/WebCore/ChangeLog (228162 => 228163)


--- branches/safari-605-branch/Source/WebCore/ChangeLog	2018-02-06 15:16:22 UTC (rev 228162)
+++ branches/safari-605-branch/Source/WebCore/ChangeLog	2018-02-06 15:16:26 UTC (rev 228163)
@@ -1,5 +1,26 @@
 2018-02-06  Jason Marcell  <[email protected]>
 
+        Cherry-pick r228114. rdar://problem/37264445
+
+    2018-02-05  Daniel Bates  <[email protected]>
+
+            REGRESSION (r222795): Nike app "Refused to set unsafe header" when adding and viewing cart
+            https://bugs.webkit.org/show_bug.cgi?id=182491
+            <rdar://problem/36533447>
+
+            Reviewed by Brent Fulgham.
+
+            Exempt Nike from the XHR header restrictions in r222795.
+
+            Following r222795 only Dashboard widgets are allowed to set arbitrary XHR headers.
+            However Nike also depends on such functionality.
+
+            * platform/RuntimeApplicationChecks.h:
+            * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
+            (WebCore::IOSApplication::isNike):
+
+2018-02-06  Jason Marcell  <[email protected]>
+
         Cherry-pick r228101. rdar://problem/37264480
 
     2018-02-05  Chris Dumez  <[email protected]>

Modified: branches/safari-605-branch/Source/WebCore/platform/RuntimeApplicationChecks.h (228162 => 228163)


--- branches/safari-605-branch/Source/WebCore/platform/RuntimeApplicationChecks.h	2018-02-06 15:16:22 UTC (rev 228162)
+++ branches/safari-605-branch/Source/WebCore/platform/RuntimeApplicationChecks.h	2018-02-06 15:16:26 UTC (rev 228163)
@@ -84,6 +84,7 @@
 bool isIBooksStorytime();
 WEBCORE_EXPORT bool isTheSecretSocietyHiddenMystery();
 WEBCORE_EXPORT bool isCardiogram();
+WEBCORE_EXPORT bool isNike();
 
 } // IOSApplication
 

Modified: branches/safari-605-branch/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm (228162 => 228163)


--- branches/safari-605-branch/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm	2018-02-06 15:16:22 UTC (rev 228162)
+++ branches/safari-605-branch/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm	2018-02-06 15:16:26 UTC (rev 228163)
@@ -242,6 +242,12 @@
     return isCardiogram;
 }
 
+bool IOSApplication::isNike()
+{
+    static bool isNike = applicationBundleIsEqualTo("com.nike.omega");
+    return isNike;
+}
+
 #endif
 
 } // namespace WebCore

Modified: branches/safari-605-branch/Source/WebKit/ChangeLog (228162 => 228163)


--- branches/safari-605-branch/Source/WebKit/ChangeLog	2018-02-06 15:16:22 UTC (rev 228162)
+++ branches/safari-605-branch/Source/WebKit/ChangeLog	2018-02-06 15:16:26 UTC (rev 228163)
@@ -1,3 +1,23 @@
+2018-02-06  Jason Marcell  <[email protected]>
+
+        Cherry-pick r228114. rdar://problem/37264445
+
+    2018-02-05  Daniel Bates  <[email protected]>
+
+            REGRESSION (r222795): Nike app "Refused to set unsafe header" when adding and viewing cart
+            https://bugs.webkit.org/show_bug.cgi?id=182491
+            <rdar://problem/36533447>
+
+            Reviewed by Brent Fulgham.
+
+            Exempt Nike from the XHR header restrictions in r222795.
+
+            Following r222795 only Dashboard widgets are allowed to set arbitrary XHR headers.
+            However Nike also depends on such functionality.
+
+            * UIProcess/API/Cocoa/WKWebView.mm:
+            (shouldAllowSettingAnyXHRHeaderFromFileURLs):
+
 2018-02-05  Jason Marcell  <[email protected]>
 
         Cherry-pick r228135. rdar://problem/37232614

Modified: branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (228162 => 228163)


--- branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2018-02-06 15:16:22 UTC (rev 228162)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2018-02-06 15:16:26 UTC (rev 228163)
@@ -424,7 +424,7 @@
 
 static bool shouldAllowSettingAnyXHRHeaderFromFileURLs()
 {
-    static bool shouldAllowSettingAnyXHRHeaderFromFileURLs = WebCore::IOSApplication::isCardiogram() && !linkedOnOrAfter(WebKit::SDKVersion::FirstThatDisallowsSettingAnyXHRHeaderFromFileURLs);
+    static bool shouldAllowSettingAnyXHRHeaderFromFileURLs = (WebCore::IOSApplication::isCardiogram() || WebCore::IOSApplication::isNike()) && !linkedOnOrAfter(WebKit::SDKVersion::FirstThatDisallowsSettingAnyXHRHeaderFromFileURLs);
     return shouldAllowSettingAnyXHRHeaderFromFileURLs;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to