sendBeacon to previously-unvisited https domain always fails
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Jan 2019 00:20:11 +0000 (00:20 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Jan 2019 00:20:11 +0000 (00:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193508

Reviewed by Geoffrey Garen.

* NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::didReceiveChallenge):
If a ping load is doing a TLS handshake, continue if the server has good certificates.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240094 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/PingLoad.cpp

index c10d0b8..e5f184a 100644 (file)
@@ -1,3 +1,14 @@
+2019-01-16  Alex Christensen  <achristensen@webkit.org>
+
+        sendBeacon to previously-unvisited https domain always fails
+        https://bugs.webkit.org/show_bug.cgi?id=193508
+
+        Reviewed by Geoffrey Garen.
+
+        * NetworkProcess/PingLoad.cpp:
+        (WebKit::PingLoad::didReceiveChallenge):
+        If a ping load is doing a TLS handshake, continue if the server has good certificates.
+
 2019-01-16  Youenn Fablet  <youenn@apple.com>
 
         ASSERTION FAILED: m_networkLoadInformationByID.contains(identifier) in WebKit::NetworkConnectionToWebProcess::addNetworkLoadInformationMetrics
index f62a587..fb5414c 100644 (file)
@@ -117,9 +117,13 @@ void PingLoad::willPerformHTTPRedirection(ResourceResponse&& redirectResponse, R
     });
 }
 
-void PingLoad::didReceiveChallenge(AuthenticationChallenge&&, ChallengeCompletionHandler&& completionHandler)
+void PingLoad::didReceiveChallenge(AuthenticationChallenge&& challenge, ChallengeCompletionHandler&& completionHandler)
 {
     RELEASE_LOG_IF_ALLOWED("didReceiveChallenge");
+    if (challenge.protectionSpace().authenticationScheme() == ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested) {
+        completionHandler(AuthenticationChallengeDisposition::PerformDefaultHandling, { });
+        return;
+    }
     auto weakThis = makeWeakPtr(*this);
     completionHandler(AuthenticationChallengeDisposition::Cancel, { });
     if (!weakThis)