Title: [104013] trunk/Source/WebCore
Revision
104013
Author
[email protected]
Date
2012-01-03 22:43:32 -0800 (Tue, 03 Jan 2012)

Log Message

[BlackBerry] Need to support credentials in the URL
https://bugs.webkit.org/show_bug.cgi?id=75341

Patch by Charles Wei <[email protected]> on 2012-01-03
Reviewed by George Staikos.

No new tests required.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (104012 => 104013)


--- trunk/Source/WebCore/ChangeLog	2012-01-04 06:24:42 UTC (rev 104012)
+++ trunk/Source/WebCore/ChangeLog	2012-01-04 06:43:32 UTC (rev 104013)
@@ -1,3 +1,15 @@
+2012-01-03  Charles Wei  <[email protected]>
+
+        [BlackBerry] Need to support credentials in the URL
+        https://bugs.webkit.org/show_bug.cgi?id=75341
+
+        Reviewed by George Staikos.
+
+        No new tests required.
+
+        * platform/network/blackberry/NetworkJob.cpp:
+        (WebCore::NetworkJob::sendRequestWithCredentials):
+
 2012-01-03  Noel Gordon  <[email protected]>
 
         [chromium] Use data decoding swizzle for turbo JPEG grayscale images

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


--- trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp	2012-01-04 06:24:42 UTC (rev 104012)
+++ trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp	2012-01-04 06:43:32 UTC (rev 104013)
@@ -811,8 +811,19 @@
 
         if (!m_frame || !m_frame->loader() || !m_frame->loader()->client())
             return false;
-        m_frame->loader()->client()->authenticationChallenge(realm, username, password);
 
+        // Before asking the user for credentials, we check if the URL contains that.
+        if (!m_handle->getInternal()->m_user.isEmpty() && !m_handle->getInternal()->m_pass.isEmpty()) {
+            username = m_handle->getInternal()->m_user.utf8().data();
+            password = m_handle->getInternal()->m_pass.utf8().data();
+
+            // Prevent them from been used again if they are wrong.
+            // If they are correct, they will the put into CredentialStorage.
+            m_handle->getInternal()->m_user = "";
+            m_handle->getInternal()->m_pass = "";
+        } else
+            m_frame->loader()->client()->authenticationChallenge(realm, username, password);
+
         if (username.isEmpty() && password.isEmpty())
             return false;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to