Changeset 173516 in webkit
- Timestamp:
- Sep 11, 2014, 10:20:18 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/WebCore.exp.in (modified) (1 diff)
-
Source/WebCore/loader/ResourceLoader.cpp (modified) (2 diffs)
-
Source/WebCore/loader/ResourceLoader.h (modified) (1 diff)
-
Source/WebKit2/ChangeLog (modified) (1 diff)
-
Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp (modified) (1 diff)
-
Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp (modified) (1 diff)
-
Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r173515 r173516 1 2014-09-11 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 3 [WK2] Authentication dialog is displayed for cross-origin XHR 4 https://bugs.webkit.org/show_bug.cgi?id=131349 5 6 Reviewed by Alexey Proskuryakov. 7 8 * platform/mac-wk2/TestExpectations: Unskipped tests. 9 1 10 2014-09-11 Chris Fleizach <cfleizach@apple.com> 2 11 -
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r173475 r173516 342 342 webkit.org/b/127960 [ MountainLion ] http/tests/security/cross-origin-plugin-private-browsing-toggled.html [ Pass Failure ] 343 343 344 webkit.org/b/131349 http/tests/xmlhttprequest/access-control-preflight-credential-async.html [ Failure ]345 webkit.org/b/131349 http/tests/xmlhttprequest/cross-origin-no-authorization.html [ Failure ]346 webkit.org/b/131349 http/tests/xmlhttprequest/cross-origin-no-credential-prompt.html [ Failure ]347 348 344 webkit.org/b/134550 [ Mavericks ] http/tests/cache/iframe-304-crash.html [ Pass Failure ] 349 345 -
trunk/Source/WebCore/ChangeLog
r173515 r173516 1 2014-09-11 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 3 [WK2] Authentication dialog is displayed for cross-origin XHR 4 https://bugs.webkit.org/show_bug.cgi?id=131349 5 6 Reviewed by Alexey Proskuryakov. 7 8 * WebCore.exp.in: Export of isAllowedToAskUserForCredentials. 9 * loader/ResourceLoader.cpp: 10 (WebCore::ResourceLoader::isAllowedToAskUserForCredentials): Replacing clientCredentialPolicy method. Returns true if credentials can be requested to the user. 11 (WebCore::ResourceLoader::didReceiveAuthenticationChallenge): Updated to use isAllowedToAskUserForCredentials. 12 * loader/ResourceLoader.h: Removing clientCredentialPolicy method and adding isAllowedToAskUserForCredentials method. 13 1 14 2014-09-11 Chris Fleizach <cfleizach@apple.com> 2 15 -
trunk/Source/WebCore/WebCore.exp.in
r173423 r173516 1694 1694 __ZNK7WebCore14ResourceHandle10connectionEv 1695 1695 __ZNK7WebCore14ResourceLoader11frameLoaderEv 1696 __ZNK7WebCore14ResourceLoader32isAllowedToAskUserForCredentialsEv 1696 1697 __ZNK7WebCore14ScrollableArea13scrolledToTopEv 1697 1698 __ZNK7WebCore14ScrollableArea14scrollAnimatorEv -
trunk/Source/WebCore/loader/ResourceLoader.cpp
r172931 r173516 539 539 } 540 540 541 bool ResourceLoader::isAllowedToAskUserForCredentials() const 542 { 543 return m_options.clientCredentialPolicy() == AskClientForAllCredentials || (m_options.clientCredentialPolicy() == DoNotAskClientForCrossOriginCredentials && m_frame->document()->securityOrigin()->canRequest(originalRequest().url())); 544 } 545 541 546 void ResourceLoader::didReceiveAuthenticationChallenge(const AuthenticationChallenge& challenge) 542 547 { … … 548 553 549 554 if (m_options.allowCredentials() == AllowStoredCredentials) { 550 if ( m_options.clientCredentialPolicy() == AskClientForAllCredentials || (m_options.clientCredentialPolicy() == DoNotAskClientForCrossOriginCredentials && m_frame->document()->securityOrigin()->canRequest(originalRequest().url()))) {555 if (isAllowedToAskUserForCredentials()) { 551 556 frameLoader()->notifier().didReceiveAuthenticationChallenge(this, challenge); 552 557 return; -
trunk/Source/WebCore/loader/ResourceLoader.h
r172931 r173516 123 123 void setSendCallbackPolicy(SendCallbackPolicy sendLoadCallbacks) { m_options.setSendLoadCallbacks(sendLoadCallbacks); } 124 124 bool shouldSniffContent() const { return m_options.sniffContent() == SniffContent; } 125 ClientCredentialPolicy clientCredentialPolicy() const { return m_options.clientCredentialPolicy(); }125 WEBCORE_EXPORT bool isAllowedToAskUserForCredentials() const; 126 126 127 127 bool reachedTerminalState() const { return m_reachedTerminalState; } 128 128 129 129 130 const ResourceRequest& request() const { return m_request; } -
trunk/Source/WebKit2/ChangeLog
r173510 r173516 1 2014-09-11 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 3 [WK2] Authentication dialog is displayed for cross-origin XHR 4 https://bugs.webkit.org/show_bug.cgi?id=131349 5 6 Reviewed by Alexey Proskuryakov. 7 8 Precomputing client credential policy in the Web Process before sending the resource load task to the Network Process. 9 10 * NetworkProcess/NetworkResourceLoader.cpp: 11 (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge): Added an ASSERT to ensure that credential policy is never set to DoNotAskClientForCrossOriginCredentials. 12 * WebProcess/Network/WebResourceLoadScheduler.cpp: 13 (WebKit::WebResourceLoadScheduler::scheduleLoad): Precomputing client credential policy to handle the case of cross-origin requests. 14 * WebProcess/Network/WebResourceLoader.cpp: 15 (WebKit::WebResourceLoader::willSendRequest): Added a TODO to check whether redirections need a specific handling. 16 1 17 2014-09-11 Carlos Garcia Campos <cgarcia@igalia.com> 2 18 -
trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
r173468 r173516 358 358 { 359 359 ASSERT_UNUSED(handle, handle == m_handle); 360 361 // FIXME (http://webkit.org/b/115291): Since we go straight to the UI process for authentication we don't get WebCore's 362 // cross-origin check before asking the client for credentials. 363 // Therefore we are too permissive in the case where the ClientCredentialPolicy is DoNotAskClientForCrossOriginCredentials. 360 // NetworkResourceLoader does not know whether the request is cross origin, so Web process computes an applicable credential policy for it. 361 ASSERT(m_parameters.clientCredentialPolicy != DoNotAskClientForCrossOriginCredentials); 362 364 363 if (m_parameters.clientCredentialPolicy == DoNotAskClientForAnyCredentials) { 365 364 challenge.authenticationClient()->receivedRequestToContinueWithoutCredential(challenge); -
trunk/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp
r173423 r173516 170 170 loadParameters.allowStoredCredentials = allowStoredCredentials; 171 171 // If there is no WebFrame then this resource cannot be authenticated with the client. 172 loadParameters.clientCredentialPolicy = (webFrame && webPage ) ? resourceLoader->clientCredentialPolicy(): DoNotAskClientForAnyCredentials;172 loadParameters.clientCredentialPolicy = (webFrame && webPage && resourceLoader->isAllowedToAskUserForCredentials()) ? AskClientForAllCredentials : DoNotAskClientForAnyCredentials; 173 173 loadParameters.shouldClearReferrerOnHTTPSToHTTPRedirect = shouldClearReferrerOnHTTPSToHTTPRedirect; 174 174 loadParameters.isMainResource = resource && resource->type() == CachedResource::MainResource; -
trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp
r173423 r173516 90 90 if (m_coreLoader->documentLoader()->applicationCacheHost()->maybeLoadFallbackForRedirect(m_coreLoader.get(), newRequest, redirectResponse)) 91 91 return; 92 // FIXME: Do we need to update NetworkResourceLoader clientCredentialPolicy in case loader policy is DoNotAskClientForCrossOriginCredentials? 92 93 m_coreLoader->willSendRequest(newRequest, redirectResponse); 93 94
Note:
See TracChangeset
for help on using the changeset viewer.