Title: [124980] trunk/Source/WebCore
Revision
124980
Author
commit-qu...@webkit.org
Date
2012-08-07 21:34:26 -0700 (Tue, 07 Aug 2012)

Log Message

Fix regression in credential storage when using Negotiate auth
https://bugs.webkit.org/show_bug.cgi?id=93386

Patch by Joe Mason <jma...@rim.com> on 2012-08-07
Reviewed by George Staikos.

r124205 regressed credential storage and lookup.  It added code to update the scheme used in
credential storage if the scheme chosen by the network stack is different from that requested by
webkit (currently this is only used when webkit requests Negotiate auth, but the Negotiate
infrastructure isn't set up correctly, so the network stack falls back to another auth type, usually
NTLM).  But the credentials are saved when a "success" status is received, and the scheme in the
credentials is not updated until notifyAuthReceived is called to report the actual auth scheme used.
The result is that the credentials are stored with the wrong auth scheme and can never be retreived.

Fixed by delaying the credential save until notifyAuthReceived.

RIM PR 166514
Internally reviewed by George Staikos

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::handleNotifyStatusReceived): Stop storing credentials here.
(WebCore::NetworkJob::notifyAuthReceived): Store credentials here instead.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (124979 => 124980)


--- trunk/Source/WebCore/ChangeLog	2012-08-08 04:15:02 UTC (rev 124979)
+++ trunk/Source/WebCore/ChangeLog	2012-08-08 04:34:26 UTC (rev 124980)
@@ -1,3 +1,27 @@
+2012-08-07  Joe Mason  <jma...@rim.com>
+
+        Fix regression in credential storage when using Negotiate auth
+        https://bugs.webkit.org/show_bug.cgi?id=93386
+
+        Reviewed by George Staikos.
+
+        r124205 regressed credential storage and lookup.  It added code to update the scheme used in
+        credential storage if the scheme chosen by the network stack is different from that requested by
+        webkit (currently this is only used when webkit requests Negotiate auth, but the Negotiate
+        infrastructure isn't set up correctly, so the network stack falls back to another auth type, usually
+        NTLM).  But the credentials are saved when a "success" status is received, and the scheme in the
+        credentials is not updated until notifyAuthReceived is called to report the actual auth scheme used.
+        The result is that the credentials are stored with the wrong auth scheme and can never be retreived.
+
+        Fixed by delaying the credential save until notifyAuthReceived.
+
+        RIM PR 166514
+        Internally reviewed by George Staikos
+
+        * platform/network/blackberry/NetworkJob.cpp:
+        (WebCore::NetworkJob::handleNotifyStatusReceived): Stop storing credentials here.
+        (WebCore::NetworkJob::notifyAuthReceived): Store credentials here instead.
+
 2012-08-07  Kent Tamura  <tk...@chromium.org>
 
         [Mac] Do not reformat numbers in <input type=number>

Modified: trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp (124979 => 124980)


--- trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp	2012-08-08 04:15:02 UTC (rev 124979)
+++ trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp	2012-08-08 04:34:26 UTC (rev 124980)
@@ -186,9 +186,7 @@
 
     m_response.setHTTPStatusText(message);
 
-    if (!isError(m_extendedStatusCode))
-        storeCredentials();
-    else if (isUnauthorized(m_extendedStatusCode)) {
+    if (isUnauthorized(m_extendedStatusCode)) {
         purgeCredentials();
         BlackBerry::Platform::log(BlackBerry::Platform::LogLevelCritical, "Authentication failed, purge the stored credentials for this site.");
     }
@@ -277,6 +275,7 @@
                                                                                          challenge.error());
             }
         }
+        storeCredentials();
         return;
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to