Diff
Modified: trunk/LayoutTests/ChangeLog (242091 => 242092)
--- trunk/LayoutTests/ChangeLog 2019-02-26 18:20:33 UTC (rev 242091)
+++ trunk/LayoutTests/ChangeLog 2019-02-26 18:24:41 UTC (rev 242092)
@@ -1,3 +1,16 @@
+2019-02-26 Takashi Komori <[email protected]>
+
+ [Curl] Load HTTP body of 401 response when AuthenticationChange is cancelled.
+ https://bugs.webkit.org/show_bug.cgi?id=191652
+
+ Reviewed by Alex Christensen.
+
+ Added appropriate expected results for WebKit/WebKitLegacy of WinCairo port.
+
+ * platform/wincairo-wk1/http/tests/security/401-logout/401-logout-expected.txt: Added.
+ * platform/wincairo/TestExpectations:
+ * platform/wincairo/http/tests/security/401-logout/401-logout-expected.txt: Added.
+
2019-02-26 Frederic Wang <[email protected]>
Split tests programmatic-scroll-iframe and scroll-iframe
Modified: trunk/LayoutTests/platform/wincairo/TestExpectations (242091 => 242092)
--- trunk/LayoutTests/platform/wincairo/TestExpectations 2019-02-26 18:20:33 UTC (rev 242091)
+++ trunk/LayoutTests/platform/wincairo/TestExpectations 2019-02-26 18:24:41 UTC (rev 242092)
@@ -930,7 +930,10 @@
http/tests/preconnect [ Skip ]
http/tests/preload [ Skip ]
http/tests/quicklook [ Skip ]
+
http/tests/security [ Skip ]
+http/tests/security/401-logout/401-logout.php [ Pass ]
+
http/tests/ssl [ Skip ]
[ Debug ] http/tests/storage/callbacks-are-called-in-correct-context.html [ Skip ]
Added: trunk/LayoutTests/platform/wincairo/http/tests/security/401-logout/401-logout-expected.txt (0 => 242092)
--- trunk/LayoutTests/platform/wincairo/http/tests/security/401-logout/401-logout-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/wincairo/http/tests/security/401-logout/401-logout-expected.txt 2019-02-26 18:24:41 UTC (rev 242092)
@@ -0,0 +1,3 @@
+127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with username:password
+127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Simulating cancelled authentication sheet
+PASS
Added: trunk/LayoutTests/platform/wincairo-wk1/http/tests/security/401-logout/401-logout-expected.txt (0 => 242092)
--- trunk/LayoutTests/platform/wincairo-wk1/http/tests/security/401-logout/401-logout-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/wincairo-wk1/http/tests/security/401-logout/401-logout-expected.txt 2019-02-26 18:24:41 UTC (rev 242092)
@@ -0,0 +1,3 @@
+http://127.0.0.1:8000/security/401-logout/401-logout.php?uid=username - didReceiveAuthenticationChallenge - Responding with username:password
+http://127.0.0.1:8000/security/401-logout/401-logout.php?uid=username&logout=1 - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet
+PASS
Modified: trunk/Source/WebKit/ChangeLog (242091 => 242092)
--- trunk/Source/WebKit/ChangeLog 2019-02-26 18:20:33 UTC (rev 242091)
+++ trunk/Source/WebKit/ChangeLog 2019-02-26 18:24:41 UTC (rev 242092)
@@ -1,3 +1,17 @@
+2019-02-26 Takashi Komori <[email protected]>
+
+ [Curl] Load HTTP body of 401 response when AuthenticationChange is cancelled.
+ https://bugs.webkit.org/show_bug.cgi?id=191652
+
+ Reviewed by Alex Christensen.
+
+ Test: http/tests/security/401-logout/401-logout.php
+
+ * NetworkProcess/curl/NetworkDataTaskCurl.cpp:
+ (WebKit::NetworkDataTaskCurl::tryHttpAuthentication):
+ (WebKit::NetworkDataTaskCurl::tryProxyAuthentication):
+ * NetworkProcess/curl/NetworkDataTaskCurl.h:
+
2019-02-26 Youenn Fablet <[email protected]>
WebPageProxy should nullify m_userMediaPermissionRequestManager after resetting the media state
Modified: trunk/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp (242091 => 242092)
--- trunk/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp 2019-02-26 18:20:33 UTC (rev 242091)
+++ trunk/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp 2019-02-26 18:24:41 UTC (rev 242092)
@@ -359,13 +359,7 @@
return;
}
- if (disposition == AuthenticationChallengeDisposition::UseCredential && (!credential.isEmpty() || !m_didChallengeEmptyCredentialForAuth)) {
- // When "isAllowedToAskUserForCredentials" is false, an empty credential, which might cause
- // an infinite authentication loop. To avoid such infinite loop, a HTTP authentication with empty
- // user and password is processed only once.
- if (credential.isEmpty())
- m_didChallengeEmptyCredentialForAuth = true;
-
+ if (disposition == AuthenticationChallengeDisposition::UseCredential && !credential.isEmpty()) {
if (m_storedCredentialsPolicy == StoredCredentialsPolicy::Use) {
if (credential.persistence() == CredentialPersistenceForSession || credential.persistence() == CredentialPersistencePermanent)
m_session->networkStorageSession().credentialStorage().set(m_partition, credential, challenge.protectionSpace(), challenge.failureResponse().url());
@@ -391,10 +385,7 @@
return;
}
- if (disposition == AuthenticationChallengeDisposition::UseCredential && (!credential.isEmpty() || !m_didChallengeEmptyCredentialForProxyAuth)) {
- if (credential.isEmpty())
- m_didChallengeEmptyCredentialForProxyAuth = true;
-
+ if (disposition == AuthenticationChallengeDisposition::UseCredential && !credential.isEmpty()) {
CurlContext::singleton().setProxyUserPass(credential.user(), credential.password());
CurlContext::singleton().setDefaultProxyAuthMethod();
Modified: trunk/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.h (242091 => 242092)
--- trunk/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.h 2019-02-26 18:20:33 UTC (rev 242091)
+++ trunk/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.h 2019-02-26 18:24:41 UTC (rev 242092)
@@ -87,8 +87,6 @@
WebCore::ResourceResponse m_response;
unsigned m_redirectCount { 0 };
unsigned m_authFailureCount { 0 };
- bool m_didChallengeEmptyCredentialForAuth { false };
- bool m_didChallengeEmptyCredentialForProxyAuth { false };
MonotonicTime m_startTime;
};
Modified: trunk/Tools/ChangeLog (242091 => 242092)
--- trunk/Tools/ChangeLog 2019-02-26 18:20:33 UTC (rev 242091)
+++ trunk/Tools/ChangeLog 2019-02-26 18:24:41 UTC (rev 242092)
@@ -1,3 +1,15 @@
+2019-02-26 Takashi Komori <[email protected]>
+
+ [Curl] Load HTTP body of 401 response when AuthenticationChange is cancelled.
+ https://bugs.webkit.org/show_bug.cgi?id=191652
+
+ Reviewed by Alex Christensen.
+
+ Fix WinCairo MiniBrowser behavior of authentication dialog.
+
+ * MiniBrowser/win/WebKitBrowserWindow.cpp:
+ (WebKitBrowserWindow::didReceiveAuthenticationChallenge):
+
2019-02-26 Youenn Fablet <[email protected]>
WebPageProxy should nullify m_userMediaPermissionRequestManager after resetting the media state
Modified: trunk/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp (242091 => 242092)
--- trunk/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp 2019-02-26 18:20:33 UTC (rev 242091)
+++ trunk/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp 2019-02-26 18:24:41 UTC (rev 242092)
@@ -289,5 +289,5 @@
return;
}
- WKAuthenticationDecisionListenerCancel(decisionListener);
+ WKAuthenticationDecisionListenerUseCredential(decisionListener, nullptr);
}