Changeset 115104 in webkit
- Timestamp:
- Apr 24, 2012 1:52:51 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r115102 r115104 1 2012-04-24 Joe Mason <jmason@rim.com> 2 3 [BlackBerry] Revert broken changes to authentication dialog 4 https://bugs.webkit.org/show_bug.cgi?id=80135 5 6 Reviewed by Antonio Gomes. 7 8 The previous patches from this bug caused an infinite loop when using digest auth; 9 apparently they were only tested with basic. 10 11 * platform/blackberry/PageClientBlackBerry.h: 12 * platform/network/blackberry/NetworkJob.cpp: 13 (WebCore::NetworkJob::handleAuthHeader): 14 (WebCore::NetworkJob::sendRequestWithCredentials): 15 1 16 2012-04-24 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> 2 17 -
trunk/Source/WebCore/platform/blackberry/PageClientBlackBerry.h
r114493 r115104 71 71 virtual bool isActive() const = 0; 72 72 virtual bool isVisible() const = 0; 73 virtual bool authenticationChallenge(const WebCore::KURL&, const WebCore::ProtectionSpace&, WebCore::Credential&) = 0;73 virtual WebCore::Credential authenticationChallenge(const WebCore::KURL&, const WebCore::ProtectionSpace&) = 0; 74 74 virtual SaveCredentialType notifyShouldSaveCredential(bool) = 0; 75 75 }; -
trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp
r114235 r115104 742 742 return false; 743 743 744 if (!m_handle->getInternal()->m_currentWebChallenge.isNull()) 745 return false; 746 744 747 if (header.isEmpty()) 745 748 return false; … … 850 853 String password; 851 854 855 if (!m_frame || !m_frame->loader() || !m_frame->loader()->client()) 856 return false; 857 852 858 // Before asking the user for credentials, we check if the URL contains that. 853 859 if (!m_handle->getInternal()->m_user.isEmpty() && !m_handle->getInternal()->m_pass.isEmpty()) { … … 860 866 m_handle->getInternal()->m_pass = ""; 861 867 } else { 862 Credential inputCredential; 863 bool isConfirmed = m_frame->page()->chrome()->client()->platformPageClient()->authenticationChallenge(newURL, protectionSpace, inputCredential); 868 Credential inputCredential = m_frame->page()->chrome()->client()->platformPageClient()->authenticationChallenge(newURL, protectionSpace); 864 869 username = inputCredential.user(); 865 870 password = inputCredential.password(); 866 867 if (!isConfirmed) 868 return false;869 }871 } 872 873 if (username.isEmpty() && password.isEmpty()) 874 return false; 870 875 871 876 credential = Credential(username, password, CredentialPersistenceForSession); -
trunk/Source/WebKit/blackberry/Api/DumpRenderTreeClient.h
r114263 r115104 26 26 27 27 namespace WebCore { 28 class Credential;29 28 class Frame; 30 29 class DOMWrapperWorld; … … 83 82 virtual bool shouldInsertText(const WTF::String&, WebCore::Range*, int insertAction) = 0; 84 83 virtual bool isSelectTrailingWhitespaceEnabled() const = 0; 85 virtual bool didReceiveAuthenticationChallenge(WebCore::Credential&) = 0;86 84 87 85 }; -
trunk/Source/WebKit/blackberry/Api/WebPage.cpp
r114779 r115104 2040 2040 } 2041 2041 2042 bool WebPagePrivate::authenticationChallenge(const KURL& url, const ProtectionSpace& protectionSpace, Credential& inputCredential)2042 Credential WebPagePrivate::authenticationChallenge(const KURL& url, const ProtectionSpace& protectionSpace) 2043 2043 { 2044 2044 WebString username; 2045 2045 WebString password; 2046 2047 #if ENABLE_DRT2048 if (m_dumpRenderTree)2049 return m_dumpRenderTree->didReceiveAuthenticationChallenge(inputCredential);2050 #endif2051 2046 2052 2047 #if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST) … … 2055 2050 #endif 2056 2051 2057 bool isConfirmed =m_client->authenticationChallenge(protectionSpace.realm().characters(), protectionSpace.realm().length(), username, password);2052 m_client->authenticationChallenge(protectionSpace.realm().characters(), protectionSpace.realm().length(), username, password); 2058 2053 2059 2054 #if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST) 2060 Credential credential(username, password, CredentialPersistencePermanent);2055 Credential inputCredential(username, password, CredentialPersistencePermanent); 2061 2056 if (!m_webSettings->isPrivateBrowsingEnabled()) 2062 credentialManager().saveCredentialIfConfirmed(this, CredentialTransformData(url, protectionSpace, credential));2057 credentialManager().saveCredentialIfConfirmed(this, CredentialTransformData(url, protectionSpace, inputCredential)); 2063 2058 #else 2064 Credential credential(username, password, CredentialPersistenceNone); 2065 #endif 2066 inputCredential = credential; 2067 return isConfirmed; 2059 Credential inputCredential(username, password, CredentialPersistenceNone); 2060 #endif 2061 return inputCredential; 2068 2062 } 2069 2063 -
trunk/Source/WebKit/blackberry/Api/WebPageClient.h
r115066 r115104 212 212 213 213 virtual void setPreventsScreenIdleDimming(bool noDimming) = 0; 214 virtual boolauthenticationChallenge(const unsigned short* realm, unsigned int realmLength, WebString& username, WebString& password) = 0;214 virtual void authenticationChallenge(const unsigned short* realm, unsigned int realmLength, WebString& username, WebString& password) = 0; 215 215 virtual SaveCredentialType notifyShouldSaveCredential(bool isNew) = 0; 216 216 -
trunk/Source/WebKit/blackberry/Api/WebPage_p.h
r114779 r115104 180 180 virtual bool isActive() const; 181 181 virtual bool isVisible() const { return m_visible; } 182 virtual bool authenticationChallenge(const WebCore::KURL&, const WebCore::ProtectionSpace&, WebCore::Credential&);182 virtual WebCore::Credential authenticationChallenge(const WebCore::KURL&, const WebCore::ProtectionSpace&); 183 183 virtual SaveCredentialType notifyShouldSaveCredential(bool); 184 184 -
trunk/Source/WebKit/blackberry/ChangeLog
r115066 r115104 1 2012-04-24 Joe Mason <jmason@rim.com> 2 3 [BlackBerry] Revert broken changes to authentication dialog 4 https://bugs.webkit.org/show_bug.cgi?id=80135 5 6 Reviewed by Antonio Gomes. 7 8 The previous patches from this bug caused an infinite loop when using digest auth; 9 apparently they were only tested with basic. 10 11 * Api/DumpRenderTreeClient.h: 12 * Api/WebPage.cpp: 13 (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge): 14 * Api/WebPageClient.h: 15 * Api/WebPage_p.h: 16 (WebPagePrivate): 17 1 18 2012-04-24 Mike Fenton <mifenton@rim.com> 2 19 -
trunk/Tools/ChangeLog
r115094 r115104 1 2012-04-24 Joe Mason <jmason@rim.com> 2 3 [BlackBerry] Revert broken changes to authentication dialog 4 https://bugs.webkit.org/show_bug.cgi?id=80135 5 6 Reviewed by Antonio Gomes. 7 8 The previous patches from this bug caused an infinite loop when using digest auth; 9 apparently they were only tested with basic. 10 11 * DumpRenderTree/blackberry/DumpRenderTree.cpp: 12 * DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h: 13 (WebCore): 14 1 15 2012-04-24 Zan Dobersek <zandobersek@gmail.com> 2 16 -
trunk/Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp
r114488 r115104 24 24 #include "BackForwardListImpl.h" 25 25 #include "CString.h" 26 #include "Credential.h"27 26 #include "DatabaseTracker.h" 28 27 #include "DocumentLoader.h" … … 123 122 } 124 123 125 static WTF::String drtCredentialDescription(WebCore::Credential&)126 {127 return "<unknown>";128 }129 130 124 static bool shouldLogFrameLoadDelegates(const WTF::String& url) 131 125 { … … 814 808 } 815 809 816 bool DumpRenderTree::didReceiveAuthenticationChallenge(WebCore::Credential& credential)817 {818 if (!gLayoutTestController->handlesAuthenticationChallenges()) {819 credential = WebCore::Credential();820 printf("%s - didReceiveAuthenticationChallenge - Simulating cancelled authentication\n", drtCredentialDescription(credential).utf8().data());821 return false;822 }823 const char* user = gLayoutTestController->authenticationUsername().c_str();824 const char* password = gLayoutTestController->authenticationPassword().c_str();825 credential = WebCore::Credential(user, password, WebCore::CredentialPersistenceForSession);826 printf("%s - didReceiveAuthenticationChallenge - Responding with %s:%s\n", drtCredentialDescription(credential).utf8().data(), user, password);827 return true;828 }829 830 810 } 831 811 } -
trunk/Tools/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h
r114263 r115104 29 29 30 30 namespace WebCore { 31 class Credential;31 class Frame; 32 32 class DOMWrapperWorld; 33 class Frame;34 33 class Range; 35 34 } … … 103 102 bool isSelectTrailingWhitespaceEnabled() const { return s_selectTrailingWhitespaceEnabled; } 104 103 void setSelectTrailingWhitespaceEnabled(bool enabled) { s_selectTrailingWhitespaceEnabled = enabled; } 105 bool didReceiveAuthenticationChallenge(WebCore::Credential&);106 104 107 105 private:
Note: See TracChangeset
for help on using the changeset viewer.