Title: [293990] trunk/Source
Revision
293990
Author
pvol...@apple.com
Date
2022-05-09 14:17:57 -0700 (Mon, 09 May 2022)

Log Message

[macOS] HTTP traffic is not filtered in the parental controls filter
https://bugs.webkit.org/show_bug.cgi?id=240180
<rdar://problem/92875540>

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Traditionally, we have not filtered HTTP in the parental controls filter on macOS, since other parts of the system
has taken care of this. This has changed in the most recent macOS version, and WebKit should also filter HTTP in
addition to HTTPS.

* platform/cocoa/ParentalControlsContentFilter.mm:
(WebCore::canHandleResponse):

Source/WTF:

Add HAVE macro which tells us which OS versions are filtering HTTP traffic on behalf of WebKit.

* wtf/PlatformHave.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (293989 => 293990)


--- trunk/Source/WTF/ChangeLog	2022-05-09 20:56:14 UTC (rev 293989)
+++ trunk/Source/WTF/ChangeLog	2022-05-09 21:17:57 UTC (rev 293990)
@@ -1,3 +1,15 @@
+2022-05-09  Per Arne Vollan  <pvol...@apple.com>
+
+        [macOS] HTTP traffic is not filtered in the parental controls filter
+        https://bugs.webkit.org/show_bug.cgi?id=240180
+        <rdar://problem/92875540>
+
+        Reviewed by Alexey Proskuryakov.
+
+        Add HAVE macro which tells us which OS versions are filtering HTTP traffic on behalf of WebKit.
+
+        * wtf/PlatformHave.h:
+
 2022-05-08  Wenson Hsieh  <wenson_hs...@apple.com>
 
         [iOS] Double tapping on YouTube video causes playback to pause instead of seek

Modified: trunk/Source/WTF/wtf/PlatformHave.h (293989 => 293990)


--- trunk/Source/WTF/wtf/PlatformHave.h	2022-05-09 20:56:14 UTC (rev 293989)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2022-05-09 21:17:57 UTC (rev 293990)
@@ -1175,3 +1175,7 @@
     || (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 160000))
 #define HAVE_UI_CONTEXT_MENU_PREVIEW_ITEM_IDENTIFIER 1
 #endif
+
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 120000) || (PLATFORM(MACCATALYST) && __IPHONE_OS_VERSION_MIN_REQUIRED < 150000)
+#define HAVE_SYSTEM_HTTP_CONTENT_FILTERING 1
+#endif

Modified: trunk/Source/WebCore/ChangeLog (293989 => 293990)


--- trunk/Source/WebCore/ChangeLog	2022-05-09 20:56:14 UTC (rev 293989)
+++ trunk/Source/WebCore/ChangeLog	2022-05-09 21:17:57 UTC (rev 293990)
@@ -1,3 +1,18 @@
+2022-05-09  Per Arne Vollan  <pvol...@apple.com>
+
+        [macOS] HTTP traffic is not filtered in the parental controls filter
+        https://bugs.webkit.org/show_bug.cgi?id=240180
+        <rdar://problem/92875540>
+
+        Reviewed by Alexey Proskuryakov.
+
+        Traditionally, we have not filtered HTTP in the parental controls filter on macOS, since other parts of the system
+        has taken care of this. This has changed in the most recent macOS version, and WebKit should also filter HTTP in
+        addition to HTTPS.
+
+        * platform/cocoa/ParentalControlsContentFilter.mm:
+        (WebCore::canHandleResponse):
+
 2022-05-09  Simon Fraser  <simon.fra...@apple.com>
 
         Cache the viewport size inside SVGLengthContext

Modified: trunk/Source/WebCore/platform/cocoa/ParentalControlsContentFilter.mm (293989 => 293990)


--- trunk/Source/WebCore/platform/cocoa/ParentalControlsContentFilter.mm	2022-05-09 20:56:14 UTC (rev 293989)
+++ trunk/Source/WebCore/platform/cocoa/ParentalControlsContentFilter.mm	2022-05-09 21:17:57 UTC (rev 293990)
@@ -74,7 +74,11 @@
 
 static inline bool canHandleResponse(const ResourceResponse& response)
 {
+#if HAVE(SYSTEM_HTTP_CONTENT_FILTERING)
+    return response.url().protocolIs("https");
+#else
     return response.url().protocolIsInHTTPFamily();
+#endif
 }
 
 void ParentalControlsContentFilter::responseReceived(const ResourceResponse& response)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to