Title: [272171] trunk
Revision
272171
Author
[email protected]
Date
2021-02-01 13:18:59 -0800 (Mon, 01 Feb 2021)

Log Message

[Curl] Enable FTP protocol only when ENABLE_FTPDIR is on
https://bugs.webkit.org/show_bug.cgi?id=220941

Reviewed by Fujii Hironori.

.:

Turn off ENABLE_FTPDIR for WinCairo. The version of cURL used has FTP support explicitly
disabled.

* Source/cmake/OptionsWin.cmake:

Source/WebCore:

cURL supports a large number of protocols but only HTTP(S) and FILE should be enabled by
default. Make the FTP(S) protocols dependent on whether ENABLE(FTPDIR) is enabled or not.

* platform/network/curl/CurlContext.cpp:
(WebCore::CurlHandle::enableAllowedProtocols):

Modified Paths

Diff

Modified: trunk/ChangeLog (272170 => 272171)


--- trunk/ChangeLog	2021-02-01 20:56:41 UTC (rev 272170)
+++ trunk/ChangeLog	2021-02-01 21:18:59 UTC (rev 272171)
@@ -1,3 +1,15 @@
+2021-02-01  Don Olmstead  <[email protected]>
+
+        [Curl] Enable FTP protocol only when ENABLE_FTPDIR is on
+        https://bugs.webkit.org/show_bug.cgi?id=220941
+
+        Reviewed by Fujii Hironori.
+
+        Turn off ENABLE_FTPDIR for WinCairo. The version of cURL used has FTP support explicitly
+        disabled.
+
+        * Source/cmake/OptionsWin.cmake:
+
 2021-01-27  Yusuke Suzuki  <[email protected]>
 
         WebAssembly: add support for stream APIs

Modified: trunk/Source/WebCore/ChangeLog (272170 => 272171)


--- trunk/Source/WebCore/ChangeLog	2021-02-01 20:56:41 UTC (rev 272170)
+++ trunk/Source/WebCore/ChangeLog	2021-02-01 21:18:59 UTC (rev 272171)
@@ -1,3 +1,16 @@
+2021-02-01  Don Olmstead  <[email protected]>
+
+        [Curl] Enable FTP protocol only when ENABLE_FTPDIR is on
+        https://bugs.webkit.org/show_bug.cgi?id=220941
+
+        Reviewed by Fujii Hironori.
+
+        cURL supports a large number of protocols but only HTTP(S) and FILE should be enabled by
+        default. Make the FTP(S) protocols dependent on whether ENABLE(FTPDIR) is enabled or not.
+
+        * platform/network/curl/CurlContext.cpp:
+        (WebCore::CurlHandle::enableAllowedProtocols):
+
 2021-02-01  Zalan Bujtas  <[email protected]>
 
         [LFC][IFC] "Find the trailing index" logic repeated in InlineContentBreaker::processOverflowingTextContent

Modified: trunk/Source/WebCore/platform/network/curl/CurlContext.cpp (272170 => 272171)


--- trunk/Source/WebCore/platform/network/curl/CurlContext.cpp	2021-02-01 20:56:41 UTC (rev 272170)
+++ trunk/Source/WebCore/platform/network/curl/CurlContext.cpp	2021-02-01 21:18:59 UTC (rev 272171)
@@ -530,7 +530,11 @@
 
 void CurlHandle::enableAllowedProtocols()
 {
-    static const long allowedProtocols = CURLPROTO_FILE | CURLPROTO_FTP | CURLPROTO_FTPS | CURLPROTO_HTTP | CURLPROTO_HTTPS;
+    static const long allowedProtocols = CURLPROTO_FILE |
+#if ENABLE(FTPDIR)
+        CURLPROTO_FTP | CURLPROTO_FTPS |
+#endif
+        CURLPROTO_HTTP | CURLPROTO_HTTPS;
 
     curl_easy_setopt(m_handle, CURLOPT_PROTOCOLS, allowedProtocols);
 }

Modified: trunk/Source/cmake/OptionsWin.cmake (272170 => 272171)


--- trunk/Source/cmake/OptionsWin.cmake	2021-02-01 20:56:41 UTC (rev 272170)
+++ trunk/Source/cmake/OptionsWin.cmake	2021-02-01 21:18:59 UTC (rev 272171)
@@ -86,6 +86,9 @@
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBDRIVER PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_CRYPTO PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
 
+    # No support planned
+    WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FTPDIR PRIVATE OFF)
+
     # FIXME: Implement plugin process on Modern WebKit. https://bugs.webkit.org/show_bug.cgi?id=185313
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETSCAPE_PLUGIN_API PRIVATE OFF)
 else ()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to