Title: [269049] trunk/Source/WebKit
- Revision
- 269049
- Author
- [email protected]
- Date
- 2020-10-27 10:30:14 -0700 (Tue, 27 Oct 2020)
Log Message
Use NSURLSessionAuthChallengeRejectProtectionSpace if WKNavigationDelegate didReceiveAuthenticationChallenge is not implemented
https://bugs.webkit.org/show_bug.cgi?id=218008
Patch by Alex Christensen <[email protected]> on 2020-10-27
Reviewed by Darin Adler.
This is documented in WKNavigationDelegate.h, and the behavior is basically identical.
The difference is if there is a challenge with multiple protection spaces and a delegate that implements didReceiveAuthenticationChallenge
is attached between the delegate callbacks, it will receive the second callback. This is unlikely and next to impossible to test, but
out of principle we should behave like we have documented that we do.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (269048 => 269049)
--- trunk/Source/WebKit/ChangeLog 2020-10-27 17:25:58 UTC (rev 269048)
+++ trunk/Source/WebKit/ChangeLog 2020-10-27 17:30:14 UTC (rev 269049)
@@ -1,3 +1,18 @@
+2020-10-27 Alex Christensen <[email protected]>
+
+ Use NSURLSessionAuthChallengeRejectProtectionSpace if WKNavigationDelegate didReceiveAuthenticationChallenge is not implemented
+ https://bugs.webkit.org/show_bug.cgi?id=218008
+
+ Reviewed by Darin Adler.
+
+ This is documented in WKNavigationDelegate.h, and the behavior is basically identical.
+ The difference is if there is a challenge with multiple protection spaces and a delegate that implements didReceiveAuthenticationChallenge
+ is attached between the delegate callbacks, it will receive the second callback. This is unlikely and next to impossible to test, but
+ out of principle we should behave like we have documented that we do.
+
+ * UIProcess/Cocoa/NavigationState.mm:
+ (WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge):
+
2020-10-27 Sam Weinig <[email protected]>
Rename WKPreferencesSet*ValueForKey SPI to WKPreferencesSet*ValueForKeyForTesting
Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm (269048 => 269049)
--- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm 2020-10-27 17:25:58 UTC (rev 269048)
+++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm 2020-10-27 17:30:14 UTC (rev 269049)
@@ -1001,11 +1001,11 @@
void NavigationState::NavigationClient::didReceiveAuthenticationChallenge(WebPageProxy&, AuthenticationChallengeProxy& authenticationChallenge)
{
if (!m_navigationState.m_navigationDelegateMethods.webViewDidReceiveAuthenticationChallengeCompletionHandler)
- return authenticationChallenge.listener().completeChallenge(WebKit::AuthenticationChallengeDisposition::PerformDefaultHandling);
+ return authenticationChallenge.listener().completeChallenge(WebKit::AuthenticationChallengeDisposition::RejectProtectionSpaceAndContinue);
auto navigationDelegate = m_navigationState.m_navigationDelegate.get();
if (!navigationDelegate)
- return authenticationChallenge.listener().completeChallenge(WebKit::AuthenticationChallengeDisposition::PerformDefaultHandling);
+ return authenticationChallenge.listener().completeChallenge(WebKit::AuthenticationChallengeDisposition::RejectProtectionSpaceAndContinue);
auto checker = CompletionHandlerCallChecker::create(navigationDelegate.get(), @selector(webView:didReceiveAuthenticationChallenge:completionHandler:));
[static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) webView:m_navigationState.m_webView didReceiveAuthenticationChallenge:wrapper(authenticationChallenge) completionHandler:makeBlockPtr([challenge = makeRef(authenticationChallenge), checker = WTFMove(checker)](NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes