Title: [229905] trunk
Revision
229905
Author
[email protected]
Date
2018-03-23 11:04:00 -0700 (Fri, 23 Mar 2018)

Log Message

Allow fully whitelisted plug-ins to match non HTTP URLs
https://bugs.webkit.org/show_bug.cgi?id=183938
rdar://problem/38534312

Reviewed by Chris Dumez.

Source/WebCore:

Covered by manual testing and unit testing.

* platform/URL.cpp:
(WebCore::URL::isMatchingDomain const):

Tools:

* TestWebKitAPI/Tests/WebCore/URL.cpp:
(TestWebKitAPI::TEST_F):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (229904 => 229905)


--- trunk/Source/WebCore/ChangeLog	2018-03-23 18:02:30 UTC (rev 229904)
+++ trunk/Source/WebCore/ChangeLog	2018-03-23 18:04:00 UTC (rev 229905)
@@ -1,5 +1,18 @@
 2018-03-23  Youenn Fablet  <[email protected]>
 
+        Allow fully whitelisted plug-ins to match non HTTP URLs
+        https://bugs.webkit.org/show_bug.cgi?id=183938
+        rdar://problem/38534312
+
+        Reviewed by Chris Dumez.
+
+        Covered by manual testing and unit testing.
+
+        * platform/URL.cpp:
+        (WebCore::URL::isMatchingDomain const):
+
+2018-03-23  Youenn Fablet  <[email protected]>
+
         ActiveDOMObject should assert that they are destroyed in the thread they are created
         https://bugs.webkit.org/show_bug.cgi?id=183671
 

Modified: trunk/Source/WebCore/platform/URL.cpp (229904 => 229905)


--- trunk/Source/WebCore/platform/URL.cpp	2018-03-23 18:02:30 UTC (rev 229904)
+++ trunk/Source/WebCore/platform/URL.cpp	2018-03-23 18:04:00 UTC (rev 229905)
@@ -790,13 +790,15 @@
 
 bool URL::isMatchingDomain(const String& domain) const
 {
-    // We restrict it to HTTP for simplicity since we do not want to match data, blob or file based URLs.
-    if (isNull() || !protocolIsInHTTPFamily())
+    if (isNull())
         return false;
 
     if (domain.isEmpty())
         return true;
 
+    if (!protocolIsInHTTPFamily())
+        return false;
+
     auto host = this->host();
     if (!host.endsWith(domain))
         return false;

Modified: trunk/Tools/ChangeLog (229904 => 229905)


--- trunk/Tools/ChangeLog	2018-03-23 18:02:30 UTC (rev 229904)
+++ trunk/Tools/ChangeLog	2018-03-23 18:04:00 UTC (rev 229905)
@@ -1,3 +1,14 @@
+2018-03-23  Youenn Fablet  <[email protected]>
+
+        Allow fully whitelisted plug-ins to match non HTTP URLs
+        https://bugs.webkit.org/show_bug.cgi?id=183938
+        rdar://problem/38534312
+
+        Reviewed by Chris Dumez.
+
+        * TestWebKitAPI/Tests/WebCore/URL.cpp:
+        (TestWebKitAPI::TEST_F):
+
 2018-03-23  JF Bastien  <[email protected]>
 
         dump-class-layout is just wrong

Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/URL.cpp (229904 => 229905)


--- trunk/Tools/TestWebKitAPI/Tests/WebCore/URL.cpp	2018-03-23 18:02:30 UTC (rev 229904)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/URL.cpp	2018-03-23 18:04:00 UTC (rev 229905)
@@ -383,8 +383,8 @@
 
     url = ""
 
-    EXPECT_FALSE(url.isMatchingDomain(String { }));
-    EXPECT_FALSE(url.isMatchingDomain(emptyString()));
+    EXPECT_TRUE(url.isMatchingDomain(String { }));
+    EXPECT_TRUE(url.isMatchingDomain(emptyString()));
     EXPECT_FALSE(url.isMatchingDomain(ASCIILiteral("org")));
     EXPECT_FALSE(url.isMatchingDomain(ASCIILiteral("webkit.org")));
     EXPECT_FALSE(url.isMatchingDomain(ASCIILiteral("www.webkit.org")));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to