Diff
Modified: trunk/Source/WTF/ChangeLog (238746 => 238747)
--- trunk/Source/WTF/ChangeLog 2018-11-30 19:37:44 UTC (rev 238746)
+++ trunk/Source/WTF/ChangeLog 2018-11-30 19:58:07 UTC (rev 238747)
@@ -1,3 +1,12 @@
+2018-11-30 Alexey Proskuryakov <[email protected]>
+
+ Move USE_CFNETWORK_IGNORE_HSTS to its proper place
+ https://bugs.webkit.org/show_bug.cgi?id=192173
+
+ Reviewed by Tim Horton.
+
+ * wtf/Platform.h: Also renamed it to better match other version checks.
+
2018-11-29 Alexey Proskuryakov <[email protected]>
Modernize the check for kCFURLRequestContentDecoderSkipURLCheck existence
Modified: trunk/Source/WTF/wtf/Platform.h (238746 => 238747)
--- trunk/Source/WTF/wtf/Platform.h 2018-11-30 19:37:44 UTC (rev 238746)
+++ trunk/Source/WTF/wtf/Platform.h 2018-11-30 19:58:07 UTC (rev 238747)
@@ -1406,3 +1406,7 @@
#define USE_CFNETWORK_CONTENT_ENCODING_SNIFFING_OVERRIDE 1
#endif
#endif
+
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101302 && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || PLATFORM(IOS_FAMILY)
+#define HAVE_CFNETWORK_WITH_IGNORE_HSTS 1
+#endif
Modified: trunk/Source/WebCore/ChangeLog (238746 => 238747)
--- trunk/Source/WebCore/ChangeLog 2018-11-30 19:37:44 UTC (rev 238746)
+++ trunk/Source/WebCore/ChangeLog 2018-11-30 19:58:07 UTC (rev 238747)
@@ -1,3 +1,13 @@
+2018-11-30 Alexey Proskuryakov <[email protected]>
+
+ Move USE_CFNETWORK_IGNORE_HSTS to its proper place
+ https://bugs.webkit.org/show_bug.cgi?id=192173
+
+ Reviewed by Tim Horton.
+
+ * platform/network/mac/WebCoreURLResponse.mm:
+ (WebCore::schemeWasUpgradedDueToDynamicHSTS):
+
2018-11-30 Basuke Suzuki <[email protected]>
[Curl] Add API for ProtectionSpace.
Modified: trunk/Source/WebCore/PAL/ChangeLog (238746 => 238747)
--- trunk/Source/WebCore/PAL/ChangeLog 2018-11-30 19:37:44 UTC (rev 238746)
+++ trunk/Source/WebCore/PAL/ChangeLog 2018-11-30 19:58:07 UTC (rev 238747)
@@ -1,3 +1,12 @@
+2018-11-30 Alexey Proskuryakov <[email protected]>
+
+ Move USE_CFNETWORK_IGNORE_HSTS to its proper place
+ https://bugs.webkit.org/show_bug.cgi?id=192173
+
+ Reviewed by Tim Horton.
+
+ * pal/spi/cf/CFNetworkSPI.h:
+
2018-11-29 David Quesada <[email protected]>
Add SPI to publish NSProgress on active downloads
Modified: trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h (238746 => 238747)
--- trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h 2018-11-30 19:37:44 UTC (rev 238746)
+++ trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h 2018-11-30 19:58:07 UTC (rev 238747)
@@ -30,14 +30,6 @@
#include <CFNetwork/CFNetwork.h>
#include <pal/spi/cf/CFNetworkConnectionCacheSPI.h>
-// FIXME: Policy about which CFNetwork features to *use* in WebKit does not belong in the SPI header.
-// The SPI header should define which CFNetwork features *exist* in the underlying system, but not
-// policy about what WebKit should do. Accordingly, we should move this somewhere else or rename it
-// to be about CFNetwork capabilities (HAVE) rather than about WebKit policy (USE).
-#if ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101302 && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000) || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 50000) || (PLATFORM(TVOS) && __TV_OS_VERSION_MIN_REQUIRED >= 120000))
-#define USE_CFNETWORK_IGNORE_HSTS 1
-#endif
-
#if PLATFORM(WIN) || USE(APPLE_INTERNAL_SDK)
#include <CFNetwork/CFHTTPCookiesPriv.h>
Modified: trunk/Source/WebCore/platform/network/mac/WebCoreURLResponse.mm (238746 => 238747)
--- trunk/Source/WebCore/platform/network/mac/WebCoreURLResponse.mm 2018-11-30 19:37:44 UTC (rev 238746)
+++ trunk/Source/WebCore/platform/network/mac/WebCoreURLResponse.mm 2018-11-30 19:58:07 UTC (rev 238747)
@@ -331,12 +331,11 @@
static bool schemeWasUpgradedDueToDynamicHSTS(NSURLRequest *request)
{
-#if !USE(CFNETWORK_IGNORE_HSTS)
+#if HAVE(CFNETWORK_WITH_IGNORE_HSTS)
+ return [request _schemeWasUpgradedDueToDynamicHSTS];
+#else
UNUSED_PARAM(request);
return false;
-#else
- return [request respondsToSelector:@selector(_schemeWasUpgradedDueToDynamicHSTS)]
- && [request _schemeWasUpgradedDueToDynamicHSTS];
#endif
}
Modified: trunk/Source/WebKit/ChangeLog (238746 => 238747)
--- trunk/Source/WebKit/ChangeLog 2018-11-30 19:37:44 UTC (rev 238746)
+++ trunk/Source/WebKit/ChangeLog 2018-11-30 19:58:07 UTC (rev 238747)
@@ -1,3 +1,15 @@
+2018-11-30 Alexey Proskuryakov <[email protected]>
+
+ Move USE_CFNETWORK_IGNORE_HSTS to its proper place
+ https://bugs.webkit.org/show_bug.cgi?id=192173
+
+ Reviewed by Tim Horton.
+
+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+ (updateIgnoreStrictTransportSecuritySettingIfNecessary):
+ (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
+ (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
+
2018-11-30 Alex Christensen <[email protected]>
Remove unused WebProcessCreationParameters.uiProcessCookieStorageIdentifier
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (238746 => 238747)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2018-11-30 19:37:44 UTC (rev 238746)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2018-11-30 19:58:07 UTC (rev 238747)
@@ -162,7 +162,7 @@
completionHandler(WebCore::createHTTPBodyNSInputStream(*body).get());
}
-#if USE(CFNETWORK_IGNORE_HSTS)
+#if HAVE(CFNETWORK_WITH_IGNORE_HSTS)
static NSURLRequest* downgradeRequest(NSURLRequest *request)
{
NSMutableURLRequest *nsMutableRequest = [[request mutableCopy] autorelease];
@@ -199,7 +199,7 @@
static NSURLRequest* updateIgnoreStrictTransportSecuritySettingIfNecessary(NSURLRequest *request, bool shouldIgnoreHSTS)
{
-#if USE(CFNETWORK_IGNORE_HSTS)
+#if HAVE(CFNETWORK_WITH_IGNORE_HSTS)
if ([request.URL.scheme isEqualToString:@"https"] && shouldIgnoreHSTS && ignoreHSTS(request)) {
// The request was upgraded for some other reason than HSTS.
// Don't ignore HSTS to avoid the risk of another downgrade.
@@ -229,7 +229,7 @@
auto completionHandlerCopy = Block_copy(completionHandler);
bool shouldIgnoreHSTS = false;
-#if USE(CFNETWORK_IGNORE_HSTS)
+#if HAVE(CFNETWORK_WITH_IGNORE_HSTS)
shouldIgnoreHSTS = schemeWasUpgradedDueToDynamicHSTS(request) && WebCore::NetworkStorageSession::storageSession(_session->sessionID())->shouldBlockCookies(request, networkDataTask->frameID(), networkDataTask->pageID());
if (shouldIgnoreHSTS) {
request = downgradeRequest(request);
@@ -262,7 +262,7 @@
if (auto* networkDataTask = [self existingTask:task]) {
bool shouldIgnoreHSTS = false;
-#if USE(CFNETWORK_IGNORE_HSTS)
+#if HAVE(CFNETWORK_WITH_IGNORE_HSTS)
shouldIgnoreHSTS = schemeWasUpgradedDueToDynamicHSTS(request) && WebCore::NetworkStorageSession::storageSession(_session->sessionID())->shouldBlockCookies(request, networkDataTask->frameID(), networkDataTask->pageID());
if (shouldIgnoreHSTS) {
request = downgradeRequest(request);