Title: [171858] trunk/Source
Revision
171858
Author
[email protected]
Date
2014-07-31 09:43:06 -0700 (Thu, 31 Jul 2014)

Log Message

Source/WebCore: WebCore part of: Server trust authentication challenges aren’t sent to the navigation delegate
https://bugs.webkit.org/show_bug.cgi?id=135327

Reviewed by Alexey Proskuryakov.

* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::receivedCredential): Don’t try to change the persistence of
credentials used for server trust, because the platform doesn’t support persistence values
other than Session for server trust.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::receivedCredential): Ditto.

Source/WebKit2: WebKit part of: Server trust authentication challenges aren’t sent to the navigation delegate
https://bugs.webkit.org/show_bug.cgi?id=135327

Reviewed by Alexey Proskuryakov.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
Return true for server trust protection spaces if the delegate implements
-webView:didReceiveAuthenticationChallenge:completionHandler:.
(WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): Removed
an assertion that is no longer true due to the above.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (171857 => 171858)


--- trunk/Source/WebCore/ChangeLog	2014-07-31 16:41:40 UTC (rev 171857)
+++ trunk/Source/WebCore/ChangeLog	2014-07-31 16:43:06 UTC (rev 171858)
@@ -1,5 +1,19 @@
 2014-07-31  Dan Bernstein  <[email protected]>
 
+        WebCore part of: Server trust authentication challenges aren’t sent to the navigation delegate
+        https://bugs.webkit.org/show_bug.cgi?id=135327
+
+        Reviewed by Alexey Proskuryakov.
+
+        * platform/network/cf/ResourceHandleCFNet.cpp:
+        (WebCore::ResourceHandle::receivedCredential): Don’t try to change the persistence of
+        credentials used for server trust, because the platform doesn’t support persistence values
+        other than Session for server trust.
+        * platform/network/mac/ResourceHandleMac.mm:
+        (WebCore::ResourceHandle::receivedCredential): Ditto.
+
+2014-07-31  Dan Bernstein  <[email protected]>
+
         Tried to fix building with the OS X 10.9 SDK while targeting OS X 10.8.
 
         * platform/network/cocoa/CredentialCocoa.mm:

Modified: trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp (171857 => 171858)


--- trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp	2014-07-31 16:41:40 UTC (rev 171857)
+++ trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp	2014-07-31 16:43:06 UTC (rev 171858)
@@ -421,7 +421,7 @@
         return;
     }
 
-    if (credential.persistence() == CredentialPersistenceForSession) {
+    if (credential.persistence() == CredentialPersistenceForSession && challenge.protectionSpace().authenticationScheme() != ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested) {
         // Manage per-session credentials internally, because once NSURLCredentialPersistencePerSession is used, there is no way
         // to ignore it for a particular request (short of removing it altogether).
         Credential webCredential(credential.user(), credential.password(), CredentialPersistenceNone);

Modified: trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm (171857 => 171858)


--- trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm	2014-07-31 16:41:40 UTC (rev 171857)
+++ trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm	2014-07-31 16:43:06 UTC (rev 171858)
@@ -650,7 +650,7 @@
         return;
     }
 
-    if (credential.persistence() == CredentialPersistenceForSession) {
+    if (credential.persistence() == CredentialPersistenceForSession && challenge.protectionSpace().authenticationScheme() != ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested) {
         // Manage per-session credentials internally, because once NSURLCredentialPersistenceForSession is used, there is no way
         // to ignore it for a particular request (short of removing it altogether).
         Credential webCredential(credential, CredentialPersistenceNone);

Modified: trunk/Source/WebKit2/ChangeLog (171857 => 171858)


--- trunk/Source/WebKit2/ChangeLog	2014-07-31 16:41:40 UTC (rev 171857)
+++ trunk/Source/WebKit2/ChangeLog	2014-07-31 16:43:06 UTC (rev 171858)
@@ -1,3 +1,17 @@
+2014-07-31  Dan Bernstein  <[email protected]>
+
+        WebKit part of: Server trust authentication challenges aren’t sent to the navigation delegate
+        https://bugs.webkit.org/show_bug.cgi?id=135327
+
+        Reviewed by Alexey Proskuryakov.
+
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
+        Return true for server trust protection spaces if the delegate implements
+        -webView:didReceiveAuthenticationChallenge:completionHandler:.
+        (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): Removed
+        an assertion that is no longer true due to the above.
+
 2014-07-31  Carlos Garcia Campos  <[email protected]>
 
         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.5.1 release.

Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (171857 => 171858)


--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm	2014-07-31 16:41:40 UTC (rev 171857)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm	2014-07-31 16:43:06 UTC (rev 171858)
@@ -691,7 +691,7 @@
 bool NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::WebProtectionSpace* protectionSpace)
 {
     if (m_navigationState.m_navigationDelegateMethods.webViewDidReceiveAuthenticationChallengeCompletionHandler)
-        return protectionSpace->authenticationScheme() != WebCore::ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested;
+        return true;
 
     if (!m_navigationState.m_navigationDelegateMethods.webViewCanAuthenticateAgainstProtectionSpace)
         return false;
@@ -707,7 +707,6 @@
 {
 #if !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
     if (m_navigationState.m_navigationDelegateMethods.webViewDidReceiveAuthenticationChallengeCompletionHandler) {
-        ASSERT(authenticationChallenge->protectionSpace()->authenticationScheme() != WebCore::ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested);
         auto navigationDelegate = m_navigationState.m_navigationDelegate.get();
         if (!navigationDelegate) {
             authenticationChallenge->listener()->performDefaultHandling();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to