Title: [278894] trunk
- Revision
- 278894
- Author
- achristen...@apple.com
- Date
- 2021-06-15 13:19:05 -0700 (Tue, 15 Jun 2021)
Log Message
Allow legacy SecurityOrigin behavior for x-apple-ql-id2 scheme
https://bugs.webkit.org/show_bug.cgi?id=226993
Source/WebCore:
<rdar://76474042>
Reviewed by Tim Horton.
Why have one x-apple-ql-id scheme when you can have 2?
* page/SecurityOrigin.cpp:
(WebCore::shouldTreatAsUniqueOrigin):
Also move the linked-on-or-before check to after the hasSpecialScheme check which will be true for most URLs (http, https, file, etc.)
Tools:
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebCore/SecurityOrigin.cpp:
(TestWebKitAPI::TEST_F):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (278893 => 278894)
--- trunk/Source/WebCore/ChangeLog 2021-06-15 20:12:47 UTC (rev 278893)
+++ trunk/Source/WebCore/ChangeLog 2021-06-15 20:19:05 UTC (rev 278894)
@@ -1,3 +1,17 @@
+2021-06-15 Alex Christensen <achristen...@webkit.org>
+
+ Allow legacy SecurityOrigin behavior for x-apple-ql-id2 scheme
+ https://bugs.webkit.org/show_bug.cgi?id=226993
+ <rdar://76474042>
+
+ Reviewed by Tim Horton.
+
+ Why have one x-apple-ql-id scheme when you can have 2?
+
+ * page/SecurityOrigin.cpp:
+ (WebCore::shouldTreatAsUniqueOrigin):
+ Also move the linked-on-or-before check to after the hasSpecialScheme check which will be true for most URLs (http, https, file, etc.)
+
2021-06-15 Philippe Normand <pnorm...@igalia.com>
[GStreamer] Another crash under gst_element_add_pad
Modified: trunk/Source/WebCore/page/SecurityOrigin.cpp (278893 => 278894)
--- trunk/Source/WebCore/page/SecurityOrigin.cpp 2021-06-15 20:12:47 UTC (rev 278893)
+++ trunk/Source/WebCore/page/SecurityOrigin.cpp 2021-06-15 20:19:05 UTC (rev 278894)
@@ -110,16 +110,13 @@
if (LegacySchemeRegistry::shouldTreatURLSchemeAsNoAccess(innerURL.protocol().toStringWithoutCopying()))
return true;
-#if PLATFORM(COCOA)
- if (!linkedOnOrAfter(SDKVersion::FirstWithNullOriginForNonSpecialSchemedURLs))
- return false;
-#endif
-
// https://url.spec.whatwg.org/#origin with some additions
if (url.hasSpecialScheme()
#if PLATFORM(COCOA)
+ || !linkedOnOrAfter(SDKVersion::FirstWithNullOriginForNonSpecialSchemedURLs)
|| url.protocolIs("applewebdata")
|| url.protocolIs("x-apple-ql-id")
+ || url.protocolIs("x-apple-ql-id2")
|| url.protocolIs("x-apple-ql-magic")
#endif
#if PLATFORM(GTK) || PLATFORM(WPE)
Modified: trunk/Tools/ChangeLog (278893 => 278894)
--- trunk/Tools/ChangeLog 2021-06-15 20:12:47 UTC (rev 278893)
+++ trunk/Tools/ChangeLog 2021-06-15 20:19:05 UTC (rev 278894)
@@ -1,3 +1,13 @@
+2021-06-15 Alex Christensen <achristen...@webkit.org>
+
+ Allow legacy SecurityOrigin behavior for x-apple-ql-id2 scheme
+ https://bugs.webkit.org/show_bug.cgi?id=226993
+
+ Reviewed by Tim Horton.
+
+ * TestWebKitAPI/Tests/WebCore/SecurityOrigin.cpp:
+ (TestWebKitAPI::TEST_F):
+
2021-06-15 Jonathan Bedard <jbed...@apple.com>
[git-webkit] Handle auth failures
Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/SecurityOrigin.cpp (278893 => 278894)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/SecurityOrigin.cpp 2021-06-15 20:12:47 UTC (rev 278893)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/SecurityOrigin.cpp 2021-06-15 20:19:05 UTC (rev 278894)
@@ -88,6 +88,7 @@
#if PLATFORM(COCOA)
auto o9 = SecurityOrigin::createFromString("x-apple-ql-id://host");
auto o10 = SecurityOrigin::createFromString("x-apple-ql-magic://host");
+ auto o11 = SecurityOrigin::createFromString("x-apple-ql-id2://host");
#endif
EXPECT_EQ(String("http"), o1->protocol());
@@ -101,6 +102,7 @@
#if PLATFORM(COCOA)
EXPECT_EQ(String("x-apple-ql-id"), o9->protocol());
EXPECT_EQ(String("x-apple-ql-magic"), o10->protocol());
+ EXPECT_EQ(String("x-apple-ql-id2"), o11->protocol());
#endif
EXPECT_EQ(String("example.com"), o1->host());
@@ -114,6 +116,7 @@
#if PLATFORM(COCOA)
EXPECT_EQ(String("host"), o9->host());
EXPECT_EQ(String("host"), o10->host());
+ EXPECT_EQ(String("host"), o11->host());
#endif
EXPECT_FALSE(o1->port());
@@ -127,6 +130,7 @@
#if PLATFORM(COCOA)
EXPECT_FALSE(o9->port());
EXPECT_FALSE(o10->port());
+ EXPECT_FALSE(o11->port());
#endif
EXPECT_EQ("http://example.com", o1->toString());
@@ -140,6 +144,7 @@
#if PLATFORM(COCOA)
EXPECT_EQ("x-apple-ql-id://host", o9->toString());
EXPECT_EQ("x-apple-ql-magic://host", o10->toString());
+ EXPECT_EQ("x-apple-ql-id2://host", o11->toString());
#endif
EXPECT_TRUE(o1->isSameOriginAs(o2.get()));
@@ -152,6 +157,7 @@
#if PLATFORM(COCOA)
EXPECT_FALSE(o1->isSameOriginAs(o9.get()));
EXPECT_FALSE(o1->isSameOriginAs(o10.get()));
+ EXPECT_FALSE(o1->isSameOriginAs(o11.get()));
#endif
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes