Changeset 249063 in webkit
- Timestamp:
- Aug 23, 2019 1:23:21 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 5 deleted
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r249060 r249063 1 2019-08-23 Ryan Haddad <ryanhaddad@apple.com> 2 3 Unreviewed, rolling out r249001. 4 5 Caused one layout test to fail on all configurations and 6 another to time out on Catalina / iOS 13. 7 8 Reverted changeset: 9 10 "Add a WebsiteDataStore delegate to handle 11 AuthenticationChallenge that do not come from pages" 12 https://bugs.webkit.org/show_bug.cgi?id=196870 13 https://trac.webkit.org/changeset/249001 14 1 15 2019-08-23 Antoine Quint <graouts@apple.com> 2 16 -
trunk/LayoutTests/http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight-expected.txt
r249001 r249063 1 1 2 PASS Beacon load should not be sent if server is not trusted.3 2 PASS Should send beacon with no CORS preflight 4 3 -
trunk/LayoutTests/http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight.html
r249001 r249063 27 27 } 28 28 29 function testCORSPreflight(what) { 30 var testBase = get_host_info().HTTPS_REMOTE_ORIGIN + RESOURCES_DIR; 29 function testCORSPreflightSuccess(what) { 30 var testBase = get_host_info().HTTP_REMOTE_ORIGIN + RESOURCES_DIR; 31 var id = self.token(); 32 var testUrl = testBase + "beacon-preflight.py?allowCors=1&cmd=put&id=" + id; 31 33 32 promise_test(async function(test) { 33 var id = "ca33c073-1cf0-41e5-bbd4-55969fb1a6c7"; 34 var testUrl = testBase + "beacon-preflight.py?allowCors=1&cmd=put&id=" + id; 35 if (window.testRunner) { 36 window.testRunner.setAllowsAnySSLCertificate(false); 37 window.testRunner.terminateNetworkProcess(); 38 await fetch("").then(() => { }, () => { }); 39 } 40 41 assert_true(navigator.sendBeacon(testUrl, what), "sendBeacon succeeded"); 42 const result = await pollResult(test, id); 43 assert_equals(result['preflight'], 0, "Did not receive CORS preflight") 44 assert_equals(result['beacon'], 0, "Did not receive beacon") 45 }, "Beacon load should not be sent if server is not trusted."); 46 47 promise_test(async function(test) { 48 var id = self.token(); 49 var testUrl = testBase + "beacon-preflight.py?allowCors=1&cmd=put&id=" + id; 50 if (window.testRunner) { 51 window.testRunner.setAllowsAnySSLCertificate(true); 52 window.testRunner.terminateNetworkProcess(); 53 await fetch("").then(() => { }, () => { }); 54 } 55 34 promise_test(function(test) { 56 35 assert_true(navigator.sendBeacon(testUrl, what), "SendBeacon Succeeded"); 57 36 return pollResult(test, id) .then(result => { … … 73 52 } 74 53 75 testCORSPreflight (stringToArrayBufferView("123"));54 testCORSPreflightSuccess(stringToArrayBufferView("123")); 76 55 </script> 77 56 </body> -
trunk/LayoutTests/http/wpt/beacon/resources/beacon-preflight.py
r249001 r249063 45 45 request.server.stash.put(test_id, stashed_data) 46 46 return [("Content-Type", "text/plain")], "" 47 47 48 48 if command == "get": 49 return [("Content-Type", "text/plain")], json.dumps(stashed_data) 49 if stashed_data is not None: 50 return [("Content-Type", "text/plain")], json.dumps(stashed_data) 51 return [("Content-Type", "text/plain")], "" 50 52 51 53 response.set_error(400, "Bad Command") -
trunk/LayoutTests/http/wpt/service-workers/resources/lengthy-pass.py
r249001 r249063 4 4 delay = 0.05 5 5 response.headers.set("Content-type", "text/javascript") 6 response.headers.append("Access-Control-Allow-Origin", "*")7 6 response.write_status_headers() 8 7 time.sleep(delay); -
trunk/Source/WebKit/ChangeLog
r249062 r249063 1 2019-08-23 Ryan Haddad <ryanhaddad@apple.com> 2 3 Unreviewed, rolling out r249001. 4 5 Caused one layout test to fail on all configurations and 6 another to time out on Catalina / iOS 13. 7 8 Reverted changeset: 9 10 "Add a WebsiteDataStore delegate to handle 11 AuthenticationChallenge that do not come from pages" 12 https://bugs.webkit.org/show_bug.cgi?id=196870 13 https://trac.webkit.org/changeset/249001 14 1 15 2019-08-23 Brian Burg <bburg@apple.com> 2 16 -
trunk/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp
r249001 r249063 102 102 } 103 103 104 m_networkProcess->authenticationManager().didReceiveAuthenticationChallenge(m_parameters. sessionID, m_parameters.pageID, m_parameters.frameID, challenge, WTFMove(completionHandler));104 m_networkProcess->authenticationManager().didReceiveAuthenticationChallenge(m_parameters.pageID, m_parameters.frameID, challenge, WTFMove(completionHandler)); 105 105 } 106 106 -
trunk/Source/WebKit/NetworkProcess/NetworkDataTask.cpp
r249001 r249063 151 151 } 152 152 153 PAL::SessionID NetworkDataTask::sessionID() const154 {155 return m_session->sessionID();156 }157 158 153 } // namespace WebKit -
trunk/Source/WebKit/NetworkProcess/NetworkDataTask.h
r249001 r249063 35 35 #include <WebCore/StoredCredentialsPolicy.h> 36 36 #include <WebCore/Timer.h> 37 #include <pal/SessionID.h>38 37 #include <wtf/CompletionHandler.h> 39 38 #include <wtf/ThreadSafeRefCounted.h> … … 132 131 virtual String description() const; 133 132 134 PAL::SessionID sessionID() const;135 136 133 protected: 137 134 NetworkDataTask(NetworkSession&, NetworkDataTaskClient&, const WebCore::ResourceRequest&, WebCore::StoredCredentialsPolicy, bool shouldClearReferrerOnHTTPSToHTTPRedirect, bool dataTaskIsForMainFrameNavigation); -
trunk/Source/WebKit/NetworkProcess/NetworkLoad.cpp
r249001 r249063 202 202 m_networkProcess->authenticationManager().didReceiveAuthenticationChallenge(*pendingDownload, challenge, WTFMove(completionHandler)); 203 203 else 204 m_networkProcess->authenticationManager().didReceiveAuthenticationChallenge(m_ task->sessionID(), m_parameters.webPageID, m_parameters.webFrameID, challenge, WTFMove(completionHandler));204 m_networkProcess->authenticationManager().didReceiveAuthenticationChallenge(m_parameters.webPageID, m_parameters.webFrameID, challenge, WTFMove(completionHandler)); 205 205 } 206 206 -
trunk/Source/WebKit/NetworkProcess/NetworkLoadChecker.h
r249001 r249063 85 85 #endif 86 86 87 NetworkProcess& networkProcess() { return m_networkProcess; }88 89 87 const URL& url() const { return m_url; } 90 88 WebCore::StoredCredentialsPolicy storedCredentialsPolicy() const { return m_storedCredentialsPolicy; } -
trunk/Source/WebKit/NetworkProcess/PingLoad.cpp
r249001 r249063 149 149 RELEASE_LOG_IF_ALLOWED("didReceiveChallenge"); 150 150 if (challenge.protectionSpace().authenticationScheme() == ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested) { 151 m_networkLoadChecker->networkProcess().authenticationManager().didReceiveAuthenticationChallenge(m_parameters.sessionID, m_parameters.webPageID, m_parameters.webFrameID, challenge, WTFMove(completionHandler));151 completionHandler(AuthenticationChallengeDisposition::PerformDefaultHandling, { }); 152 152 return; 153 153 } -
trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp
r249001 r249063 109 109 } 110 110 111 void AuthenticationManager::didReceiveAuthenticationChallenge(P AL::SessionID sessionID, PageIdentifier pageID, FrameIdentifier frameID, const AuthenticationChallenge& authenticationChallenge, ChallengeCompletionHandler&& completionHandler)111 void AuthenticationManager::didReceiveAuthenticationChallenge(PageIdentifier pageID, FrameIdentifier frameID, const AuthenticationChallenge& authenticationChallenge, ChallengeCompletionHandler&& completionHandler) 112 112 { 113 113 ASSERT(pageID); … … 120 120 return; 121 121 122 m_process.send(Messages::NetworkProcessProxy::DidReceiveAuthenticationChallenge( sessionID,pageID, frameID, authenticationChallenge, challengeID));122 m_process.send(Messages::NetworkProcessProxy::DidReceiveAuthenticationChallenge(pageID, frameID, authenticationChallenge, challengeID)); 123 123 } 124 124 -
trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.h
r249001 r249063 64 64 static const char* supplementName(); 65 65 66 void didReceiveAuthenticationChallenge( PAL::SessionID,WebCore::PageIdentifier, WebCore::FrameIdentifier, const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&);66 void didReceiveAuthenticationChallenge(WebCore::PageIdentifier, WebCore::FrameIdentifier, const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&); 67 67 void didReceiveAuthenticationChallenge(IPC::MessageSender& download, const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&); 68 68 -
trunk/Source/WebKit/SourcesCocoa.txt
r249059 r249063 134 134 Shared/cg/ShareableBitmapCG.cpp 135 135 136 Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.mm137 136 Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm 138 137 Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.cpp -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
r249001 r249063 28 28 29 29 #import "APIString.h" 30 #import "AuthenticationChallengeDispositionCocoa.h"31 30 #import "CompletionHandlerCallChecker.h" 32 31 #import "WKHTTPCookieStoreInternal.h" 33 32 #import "WKNSArray.h" 34 #import "WKNSURLAuthenticationChallenge.h"35 33 #import "WKWebViewInternal.h" 36 34 #import "WKWebsiteDataRecordInternal.h" … … 41 39 #import "_WKWebsiteDataStoreConfiguration.h" 42 40 #import "_WKWebsiteDataStoreDelegate.h" 43 #import <WebCore/Credential.h>44 41 #import <WebKit/ServiceWorkerProcessProxy.h> 45 42 #import <wtf/BlockPtr.h> … … 52 49 : m_delegate(delegate) 53 50 , m_hasRequestStorageSpaceSelector([m_delegate.get() respondsToSelector:@selector(requestStorageSpace: frameOrigin: quota: currentSize: spaceRequired: decisionHandler:)]) 54 , m_hasAuthenticationChallengeSelector([m_delegate.get() respondsToSelector:@selector(didReceiveAuthenticationChallenge: completionHandler:)])55 51 { 56 52 } … … 78 74 } 79 75 80 void didReceiveAuthenticationChallenge(Ref<WebKit::AuthenticationChallengeProxy>&& challenge) final81 {82 if (!m_hasAuthenticationChallengeSelector || !m_delegate) {83 challenge->listener().completeChallenge(WebKit::AuthenticationChallengeDisposition::PerformDefaultHandling);84 return;85 }86 87 auto nsURLChallenge = wrapper(challenge);88 auto checker = WebKit::CompletionHandlerCallChecker::create(m_delegate.getAutoreleased(), @selector(didReceiveAuthenticationChallenge: completionHandler:));89 auto completionHandler = makeBlockPtr([challenge = WTFMove(challenge), checker = WTFMove(checker)](NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential) mutable {90 if (checker->completionHandlerHasBeenCalled())91 return;92 checker->didCallCompletionHandler();93 challenge->listener().completeChallenge(WebKit::toAuthenticationChallengeDisposition(disposition), WebCore::Credential(credential));94 });95 96 [m_delegate.getAutoreleased() didReceiveAuthenticationChallenge:nsURLChallenge completionHandler:completionHandler.get()];97 }98 99 76 WeakObjCPtr<id <_WKWebsiteDataStoreDelegate> > m_delegate; 100 77 bool m_hasRequestStorageSpaceSelector { false }; 101 bool m_hasAuthenticationChallengeSelector { false };102 78 }; 103 79 -
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreDelegate.h
r249001 r249063 35 35 - (void)requestStorageSpace:(NSURL *)mainFrameURL frameOrigin:(NSURL *)frameURL quota:(NSUInteger)quota currentSize:(NSUInteger)currentSize spaceRequired:(NSUInteger)spaceRequired decisionHandler:(void (^)(unsigned long long quota))decisionHandler; 36 36 37 - (void)didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler;38 39 37 @end -
trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm
r249001 r249063 36 36 #import "APIWebsiteDataStore.h" 37 37 #import "AuthenticationChallengeDisposition.h" 38 #import "AuthenticationChallengeDispositionCocoa.h"39 38 #import "AuthenticationDecisionListener.h" 40 39 #import "CompletionHandlerCallChecker.h" … … 961 960 } 962 961 962 static AuthenticationChallengeDisposition toAuthenticationChallengeDisposition(NSURLSessionAuthChallengeDisposition disposition) 963 { 964 switch (disposition) { 965 case NSURLSessionAuthChallengeUseCredential: 966 return AuthenticationChallengeDisposition::UseCredential; 967 case NSURLSessionAuthChallengePerformDefaultHandling: 968 return AuthenticationChallengeDisposition::PerformDefaultHandling; 969 case NSURLSessionAuthChallengeCancelAuthenticationChallenge: 970 return AuthenticationChallengeDisposition::Cancel; 971 case NSURLSessionAuthChallengeRejectProtectionSpace: 972 return AuthenticationChallengeDisposition::RejectProtectionSpaceAndContinue; 973 } 974 [NSException raise:NSInvalidArgumentException format:@"Invalid NSURLSessionAuthChallengeDisposition (%ld)", (long)disposition]; 975 } 976 963 977 void NavigationState::NavigationClient::didReceiveAuthenticationChallenge(WebPageProxy&, AuthenticationChallengeProxy& authenticationChallenge) 964 978 { … … 975 989 return; 976 990 checker->didCallCompletionHandler(); 977 challenge->listener().completeChallenge( WebKit::toAuthenticationChallengeDisposition(disposition), Credential(credential));991 challenge->listener().completeChallenge(toAuthenticationChallengeDisposition(disposition), Credential(credential)); 978 992 }).get()]; 979 993 } -
trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
r249001 r249063 38 38 #include "NetworkProcessMessages.h" 39 39 #include "SandboxExtension.h" 40 #if HAVE(SEC_KEY_PROXY)41 #include "SecKeyProxyStore.h"42 #endif43 40 #include "ShouldGrandfatherStatistics.h" 44 41 #include "StorageAccessStatus.h" … … 316 313 } 317 314 318 void NetworkProcessProxy::didReceiveAuthenticationChallenge(PAL::SessionID sessionID, PageIdentifier pageID, FrameIdentifier frameID, WebCore::AuthenticationChallenge&& coreChallenge, uint64_t challengeID) 319 { 320 #if HAVE(SEC_KEY_PROXY) 321 WeakPtr<SecKeyProxyStore> secKeyProxyStore; 322 if (coreChallenge.protectionSpace().authenticationScheme() == ProtectionSpaceAuthenticationSchemeClientCertificateRequested) { 323 if (auto* store = websiteDataStoreFromSessionID(sessionID)) { 324 auto newSecKeyProxyStore = SecKeyProxyStore::create(); 325 secKeyProxyStore = makeWeakPtr(newSecKeyProxyStore.get()); 326 store->addSecKeyProxyStore(WTFMove(newSecKeyProxyStore)); 327 } 328 } 329 auto authenticationChallenge = AuthenticationChallengeProxy::create(WTFMove(coreChallenge), challengeID, makeRef(*connection()), WTFMove(secKeyProxyStore)); 330 #else 331 auto authenticationChallenge = AuthenticationChallengeProxy::create(WTFMove(coreChallenge), challengeID, makeRef(*connection()), nullptr); 332 #endif 333 334 WebPageProxy* page = nullptr; 335 if (pageID && !m_processPool.isServiceWorkerPageID(pageID)) 336 page = WebProcessProxy::webPage(pageID); 337 338 if (!page) { 339 auto* store = websiteDataStoreFromSessionID(sessionID); 340 if (!store || coreChallenge.protectionSpace().authenticationScheme() != ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested) { 341 authenticationChallenge->listener().completeChallenge(AuthenticationChallengeDisposition::PerformDefaultHandling); 342 return; 343 } 344 store->client().didReceiveAuthenticationChallenge(WTFMove(authenticationChallenge)); 345 return; 346 } 347 315 void NetworkProcessProxy::didReceiveAuthenticationChallenge(PageIdentifier pageID, FrameIdentifier frameID, WebCore::AuthenticationChallenge&& coreChallenge, uint64_t challengeID) 316 { 317 #if ENABLE(SERVICE_WORKER) 318 if (auto* serviceWorkerProcessProxy = m_processPool.serviceWorkerProcessProxyFromPageID(pageID)) { 319 auto authenticationChallenge = AuthenticationChallengeProxy::create(WTFMove(coreChallenge), challengeID, makeRef(*connection()), nullptr); 320 serviceWorkerProcessProxy->didReceiveAuthenticationChallenge(pageID, frameID, WTFMove(authenticationChallenge)); 321 return; 322 } 323 #endif 324 325 WebPageProxy* page = WebProcessProxy::webPage(pageID); 326 MESSAGE_CHECK(page); 327 328 auto authenticationChallenge = AuthenticationChallengeProxy::create(WTFMove(coreChallenge), challengeID, makeRef(*connection()), page->secKeyProxyStore(coreChallenge)); 348 329 page->didReceiveAuthenticationChallengeProxy(frameID, WTFMove(authenticationChallenge)); 349 330 } -
trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h
r249001 r249063 214 214 void didReceiveNetworkProcessProxyMessage(IPC::Connection&, IPC::Decoder&); 215 215 void didCreateNetworkConnectionToWebProcess(const IPC::Attachment&); 216 void didReceiveAuthenticationChallenge( PAL::SessionID,WebCore::PageIdentifier, WebCore::FrameIdentifier, WebCore::AuthenticationChallenge&&, uint64_t challengeID);216 void didReceiveAuthenticationChallenge(WebCore::PageIdentifier, WebCore::FrameIdentifier, WebCore::AuthenticationChallenge&&, uint64_t challengeID); 217 217 void didFetchWebsiteData(uint64_t callbackID, const WebsiteData&); 218 218 void didDeleteWebsiteData(uint64_t callbackID); -
trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in
r249001 r249063 24 24 DidCreateNetworkConnectionToWebProcess(IPC::Attachment connectionIdentifier) 25 25 26 DidReceiveAuthenticationChallenge( PAL::SessionID sessionID,WebCore::PageIdentifier pageID, WebCore::FrameIdentifier frameID, WebCore::AuthenticationChallenge challenge, uint64_t challengeID)26 DidReceiveAuthenticationChallenge(WebCore::PageIdentifier pageID, WebCore::FrameIdentifier frameID, WebCore::AuthenticationChallenge challenge, uint64_t challengeID) 27 27 28 28 DidFetchWebsiteData(uint64_t callbackID, struct WebKit::WebsiteData websiteData) -
trunk/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp
r249001 r249063 91 91 } 92 92 93 void ServiceWorkerProcessProxy::didReceiveAuthenticationChallenge(PageIdentifier pageID, FrameIdentifier frameID, Ref<AuthenticationChallengeProxy>&& challenge) 94 { 95 UNUSED_PARAM(pageID); 96 UNUSED_PARAM(frameID); 97 98 // FIXME: Expose an API to delegate the actual decision to the application layer. 99 auto& protectionSpace = challenge->core().protectionSpace(); 100 if (protectionSpace.authenticationScheme() == WebCore::ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested && processPool().allowsAnySSLCertificateForServiceWorker()) { 101 auto credential = WebCore::Credential("accept server trust"_s, emptyString(), WebCore::CredentialPersistenceNone); 102 challenge->listener().completeChallenge(AuthenticationChallengeDisposition::UseCredential, credential); 103 return; 104 } 105 notImplemented(); 106 challenge->listener().completeChallenge(AuthenticationChallengeDisposition::PerformDefaultHandling); 107 } 108 93 109 } // namespace WebKit 94 110 -
trunk/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.h
r249001 r249063 42 42 static bool hasRegisteredServiceWorkers(const String& serviceWorkerDirectory); 43 43 44 void didReceiveAuthenticationChallenge(WebCore::PageIdentifier, WebCore::FrameIdentifier, Ref<AuthenticationChallengeProxy>&&); 45 44 46 void start(const WebPreferencesStore&, Optional<PAL::SessionID> initialSessionID); 45 47 void setUserAgent(const String&); -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r249001 r249063 7334 7334 #endif 7335 7335 7336 WeakPtr<SecKeyProxyStore> WebPageProxy::secKeyProxyStore(const WebCore::AuthenticationChallenge& challenge) 7337 { 7338 #if HAVE(SEC_KEY_PROXY) 7339 if (challenge.protectionSpace().authenticationScheme() == ProtectionSpaceAuthenticationSchemeClientCertificateRequested) { 7340 auto secKeyProxyStore = SecKeyProxyStore::create(); 7341 auto weakPointer = makeWeakPtr(secKeyProxyStore.get()); 7342 m_websiteDataStore->addSecKeyProxyStore(WTFMove(secKeyProxyStore)); 7343 return weakPointer; 7344 } 7345 #endif 7346 return nullptr; 7347 } 7348 7336 7349 void WebPageProxy::didReceiveAuthenticationChallengeProxy(FrameIdentifier, Ref<AuthenticationChallengeProxy>&& authenticationChallenge) 7337 7350 { -
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
r249001 r249063 2232 2232 } 2233 2233 2234 bool WebProcessPool::isServiceWorkerPageID(PageIdentifier pageID) const2235 {2236 2234 #if ENABLE(SERVICE_WORKER) 2235 ServiceWorkerProcessProxy* WebProcessPool::serviceWorkerProcessProxyFromPageID(PageIdentifier pageID) const 2236 { 2237 2237 // FIXME: This is inefficient. 2238 2238 for (auto* serviceWorkerProcess : m_serviceWorkerProcesses.values()) { 2239 2239 if (serviceWorkerProcess->pageID() == pageID) 2240 return true;2241 } 2242 #endif 2243 return false; 2244 } 2240 return serviceWorkerProcess; 2241 } 2242 return nullptr; 2243 } 2244 #endif 2245 2245 2246 2246 void WebProcessPool::addProcessToOriginCacheSet(WebProcessProxy& process, const URL& url) -
trunk/Source/WebKit/UIProcess/WebProcessPool.h
r249001 r249063 380 380 void getNetworkProcessConnection(WebProcessProxy&, Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply&&); 381 381 382 bool isServiceWorkerPageID(WebCore::PageIdentifier) const;383 382 #if ENABLE(SERVICE_WORKER) 384 383 void establishWorkerContextConnectionToNetworkProcess(NetworkProcessProxy&, WebCore::RegistrableDomain&&, Optional<PAL::SessionID>); 384 ServiceWorkerProcessProxy* serviceWorkerProcessProxyFromPageID(WebCore::PageIdentifier) const; 385 385 const HashMap<WebCore::RegistrableDomain, ServiceWorkerProcessProxy*>& serviceWorkerProxies() const { return m_serviceWorkerProcesses; } 386 386 void setAllowsAnySSLCertificateForServiceWorker(bool allows) { m_allowsAnySSLCertificateForServiceWorker = allows; } -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreClient.h
r249001 r249063 26 26 #pragma once 27 27 28 #include "AuthenticationChallengeDisposition.h"29 #include "AuthenticationChallengeProxy.h"30 #include "AuthenticationDecisionListener.h"31 28 #include <wtf/CompletionHandler.h> 32 29 … … 46 43 completionHandler({ }); 47 44 } 48 49 virtual void didReceiveAuthenticationChallenge(Ref<AuthenticationChallengeProxy>&& challenge)50 {51 challenge->listener().completeChallenge(AuthenticationChallengeDisposition::PerformDefaultHandling);52 }53 45 }; 54 46 -
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r249059 r249063 3157 3157 41897ED61F415D860016FA42 /* CacheStorageEngine.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CacheStorageEngine.cpp; sourceTree = "<group>"; }; 3158 3158 419ACF9B1F981D26009F1A83 /* WebServiceWorkerFetchTaskClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebServiceWorkerFetchTaskClient.h; sourceTree = "<group>"; }; 3159 41A5F7B9226ECF7C00671764 /* AuthenticationChallengeDispositionCocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AuthenticationChallengeDispositionCocoa.h; sourceTree = "<group>"; };3160 41A5F7BA226ECF7C00671764 /* AuthenticationChallengeDispositionCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AuthenticationChallengeDispositionCocoa.mm; sourceTree = "<group>"; };3161 3159 41AC86811E042E5300303074 /* WebRTCResolver.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; lineEnding = 0; name = WebRTCResolver.messages.in; path = Network/webrtc/WebRTCResolver.messages.in; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = "<none>"; }; 3162 3160 41B28B081F83AD3E00FB52AC /* RTCPacketOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCPacketOptions.h; sourceTree = "<group>"; }; … … 7044 7042 isa = PBXGroup; 7045 7043 children = ( 7046 41A5F7B9226ECF7C00671764 /* AuthenticationChallengeDispositionCocoa.h */,7047 41A5F7BA226ECF7C00671764 /* AuthenticationChallengeDispositionCocoa.mm */,7048 7044 57B4B45D20B504AB00D4AD79 /* AuthenticationManagerCocoa.mm */, 7049 7045 44A481C621F2D27B00F2F919 /* ClientCertificateAuthenticationXPCConstants.cpp */, -
trunk/Tools/ChangeLog
r249061 r249063 1 2019-08-23 Ryan Haddad <ryanhaddad@apple.com> 2 3 Unreviewed, rolling out r249001. 4 5 Caused one layout test to fail on all configurations and 6 another to time out on Catalina / iOS 13. 7 8 Reverted changeset: 9 10 "Add a WebsiteDataStore delegate to handle 11 AuthenticationChallenge that do not come from pages" 12 https://bugs.webkit.org/show_bug.cgi?id=196870 13 https://trac.webkit.org/changeset/249001 14 1 15 2019-08-23 Jonathan Bedard <jbedard@apple.com> 2 16 -
trunk/Tools/WebKitTestRunner/TestController.cpp
r249013 r249063 1033 1033 m_openPanelFileURLsMediaIcon = nullptr; 1034 1034 #endif 1035 1036 setAllowsAnySSLCertificate(true); 1037 1035 1038 1036 statisticsResetToConsistentState(); 1039 1037 … … 1184 1182 } 1185 1183 1186 #if !PLATFORM(COCOA)1187 1184 void TestController::setAllowsAnySSLCertificate(bool allows) 1188 1185 { 1189 m_allowsAnySSLCertificate = allows;1190 1186 WKContextSetAllowsAnySSLCertificateForWebSocketTesting(platformContext(), allows); 1191 1187 } 1192 #endif1193 1188 1194 1189 static std::string testPath(WKURLRef url) … … 2334 2329 m_serverTrustEvaluationCallbackCallsCount++; 2335 2330 2336 if (m_allowsAnySSLCertificate) { 2337 WKRetainPtr<WKCredentialRef> credential = adoptWK(WKCredentialCreate(toWK("accept server trust").get(), toWK("").get(), kWKCredentialPersistenceNone)); 2338 WKAuthenticationDecisionListenerUseCredential(decisionListener, credential.get()); 2339 return; 2340 } 2341 WKAuthenticationDecisionListenerRejectProtectionSpaceAndContinue(decisionListener); 2331 WKRetainPtr<WKCredentialRef> credential = adoptWK(WKCredentialCreate(toWK("accept server trust").get(), toWK("").get(), kWKCredentialPersistenceNone)); 2332 WKAuthenticationDecisionListenerUseCredential(decisionListener, credential.get()); 2342 2333 return; 2343 2334 } -
trunk/Tools/WebKitTestRunner/TestController.h
r249001 r249063 592 592 uint64_t m_serverTrustEvaluationCallbackCallsCount { 0 }; 593 593 bool m_shouldDismissJavaScriptAlertsAsynchronously { false }; 594 bool m_allowsAnySSLCertificate { true };595 594 }; 596 595 -
trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm
r249001 r249063 36 36 #import <Security/SecItem.h> 37 37 #import <WebKit/WKContextConfigurationRef.h> 38 #import <WebKit/WKContextPrivate.h>39 38 #import <WebKit/WKCookieManager.h> 40 39 #import <WebKit/WKPreferencesRefPrivate.h> … … 399 398 } 400 399 401 void TestController::setAllowsAnySSLCertificate(bool allows)402 {403 m_allowsAnySSLCertificate = allows;404 WKContextSetAllowsAnySSLCertificateForWebSocketTesting(platformContext(), allows);405 [globalWebsiteDataStoreDelegateClient setAllowAnySSLCertificate: allows];406 }407 408 400 bool TestController::canDoServerTrustEvaluationInNetworkProcess() const 409 401 { -
trunk/Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h
r249001 r249063 31 31 @private 32 32 BOOL _shouldAllowRaisingQuota; 33 BOOL _shouldAllowAnySSLCertificate;34 33 } 35 34 - (instancetype)init; 36 35 - (void)setAllowRaisingQuota:(BOOL)shouldAllowRaisingQuota; 37 - (void)setAllowAnySSLCertificate:(BOOL)shouldAllowAnySSLCertificate;38 36 @end -
trunk/Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.mm
r249001 r249063 43 43 _shouldAllowRaisingQuota = shouldAllowRaisingQuota; 44 44 } 45 46 - (void)didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completionHandler47 {48 NSString *method = challenge.protectionSpace.authenticationMethod;49 if ([method isEqualToString:NSURLAuthenticationMethodServerTrust]) {50 if (_shouldAllowAnySSLCertificate)51 completionHandler(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust: challenge.protectionSpace.serverTrust]);52 else53 completionHandler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, nil);54 return;55 }56 completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, nil);57 }58 59 - (void)setAllowAnySSLCertificate:(BOOL)shouldAllowAnySSLCertificate60 {61 _shouldAllowAnySSLCertificate = shouldAllowAnySSLCertificate;62 }63 64 45 @end
Note: See TracChangeset
for help on using the changeset viewer.