Title: [134853] trunk/Source/WebCore
Revision
134853
Author
[email protected]
Date
2012-11-15 16:23:28 -0800 (Thu, 15 Nov 2012)

Log Message

[BlackBerry] Don't assert when notifyAuthReceived is called with a different auth type
https://bugs.webkit.org/show_bug.cgi?id=102436

Patch by Joe Mason <[email protected]> on 2012-11-15
Reviewed by Rob Buis.

The server type could change if we contact a site taking HTTP auth, through an HTTP proxy
taking auth of its own. First we get a 407 from the proxy, and then when get past the
proxy, we get a 401 from the end site - so notifyAuthReceived gets called again with auth
type Proxy instead of HTTP.

The correct thing to do when that happens is skip the "update the auth type in the
credentials" step, since these are actually new credentials and not just credentials being
reused for a different auth type on the same server.

PR 241637

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::notifyAuthReceived):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (134852 => 134853)


--- trunk/Source/WebCore/ChangeLog	2012-11-16 00:23:13 UTC (rev 134852)
+++ trunk/Source/WebCore/ChangeLog	2012-11-16 00:23:28 UTC (rev 134853)
@@ -1,3 +1,24 @@
+2012-11-15  Joe Mason  <[email protected]>
+
+        [BlackBerry] Don't assert when notifyAuthReceived is called with a different auth type
+        https://bugs.webkit.org/show_bug.cgi?id=102436
+
+        Reviewed by Rob Buis.
+
+        The server type could change if we contact a site taking HTTP auth, through an HTTP proxy
+        taking auth of its own. First we get a 407 from the proxy, and then when get past the
+        proxy, we get a 401 from the end site - so notifyAuthReceived gets called again with auth
+        type Proxy instead of HTTP.
+
+        The correct thing to do when that happens is skip the "update the auth type in the
+        credentials" step, since these are actually new credentials and not just credentials being
+        reused for a different auth type on the same server.
+
+        PR 241637
+
+        * platform/network/blackberry/NetworkJob.cpp:
+        (WebCore::NetworkJob::notifyAuthReceived):
+
 2012-11-15  Stephen Chenney  <[email protected]>
 
         mpath elements do not clear resource lists before destruction

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


--- trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp	2012-11-16 00:23:13 UTC (rev 134852)
+++ trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp	2012-11-16 00:23:28 UTC (rev 134853)
@@ -295,9 +295,7 @@
         AuthenticationChallenge& challenge = m_handle->getInternal()->m_currentWebChallenge;
         if (!challenge.isNull()) {
             const ProtectionSpace& oldSpace = challenge.protectionSpace();
-            if (oldSpace.authenticationScheme() != scheme) {
-                // The scheme might have changed, but the server type shouldn't have!
-                BLACKBERRY_ASSERT(serverType == oldSpace.serverType());
+            if (oldSpace.authenticationScheme() != scheme && oldSpace.serverType() == serverType) {
                 ProtectionSpace newSpace(oldSpace.host(), oldSpace.port(), oldSpace.serverType(), oldSpace.realm(), scheme);
                 m_handle->getInternal()->m_currentWebChallenge = AuthenticationChallenge(newSpace,
                                                                                          challenge.proposedCredential(),
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to