Changeset 235631 in webkit
- Timestamp:
- Sep 4, 2018, 1:37:29 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r235626 r235631 1 2018-09-04 Rob Buis <rbuis@igalia.com> 2 3 Adjust XMLHttpRequest username/password precedence rules 4 https://bugs.webkit.org/show_bug.cgi?id=184910 5 6 Reviewed by Chris Dumez. 7 8 Adjust test because now we do set password on the url in 9 open(), even if the username is null. 10 11 * http/tests/xmlhttprequest/basic-auth.html: 12 1 13 2018-09-03 Dean Jackson <dino@apple.com> 2 14 -
trunk/LayoutTests/http/tests/xmlhttprequest/basic-auth.html
r120167 r235631 50 50 sendAndLogResponse("sync6", req); 51 51 52 req.open("GET", document.URL.replace("basic-auth.html", "resources/basic-auth/basic-auth.php?uid=sync7").replace("http://", "http://sync7: 123@"), false, undefined, "incorrect");52 req.open("GET", document.URL.replace("basic-auth.html", "resources/basic-auth/basic-auth.php?uid=sync7").replace("http://", "http://sync7:incorrect@"), false, undefined, "123"); 53 53 sendAndLogResponse("sync7", req); 54 54 … … 98 98 log('async6: ' + req.responseText); 99 99 req.onreadystatechange = processStateChange; 100 req.open("GET", document.URL.replace("basic-auth.html", "resources/basic-auth/basic-auth.php?uid=async7").replace("http://", "http://async7: 123@"), true, undefined, "incorrect");100 req.open("GET", document.URL.replace("basic-auth.html", "resources/basic-auth/basic-auth.php?uid=async7").replace("http://", "http://async7:incorrect@"), true, undefined, "123"); 101 101 req.send(""); 102 102 } else if (asyncStep == 7) { -
trunk/LayoutTests/imported/w3c/ChangeLog
r235625 r235631 1 2018-09-04 Rob Buis <rbuis@igalia.com> 2 3 Adjust XMLHttpRequest username/password precedence rules 4 https://bugs.webkit.org/show_bug.cgi?id=184910 5 6 Reviewed by Chris Dumez. 7 8 Update test result. 9 10 * web-platform-tests/xhr/send-authentication-competing-names-passwords-expected.txt: 11 1 12 2018-09-04 Andy Estes <aestes@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/send-authentication-competing-names-passwords-expected.txt
r235354 r235631 6 6 PASS XMLHttpRequest user/pass options: pass in URL, user/pass in open() 7 7 PASS XMLHttpRequest user/pass options: user in URL 8 FAIL XMLHttpRequest user/pass options: user in URL, pass in open() assert_equals: responseText should contain the right user and password expected "a89b5bdc-8844-4e0c-8b67-bccb90cc5006\n8ae16e77-30e0-4758-8c85-ddbac8ff9923" but got "a89b5bdc-8844-4e0c-8b67-bccb90cc5006\n" 8 PASS XMLHttpRequest user/pass options: user in URL, pass in open() 9 9 PASS XMLHttpRequest user/pass options: user/pass in URL 10 10 PASS XMLHttpRequest user/pass options: user in URL and open() 11 11 PASS XMLHttpRequest user/pass options: user in URL; user/pass in open() 12 12 PASS XMLHttpRequest user/pass options: user/pass in URL; user in open() 13 FAIL XMLHttpRequest user/pass options: user/pass in URL; pass in open() assert_equals: responseText should contain the right user and password expected "7add18d7-4945-4a7c-b1d3-e50eff2f65c8\nbce2a8d7-ce76-48be-8c8f-ff29647b78ff" but got "7add18d7-4945-4a7c-b1d3-e50eff2f65c8\nbcf673a4-b893-48cd-95ec-3bd4c0d72a84" 13 PASS XMLHttpRequest user/pass options: user/pass in URL; pass in open() 14 14 PASS XMLHttpRequest user/pass options: user/pass in URL and open() 15 15 -
trunk/Source/WebCore/ChangeLog
r235630 r235631 1 2018-09-04 Rob Buis <rbuis@igalia.com> 2 3 Adjust XMLHttpRequest username/password precedence rules 4 https://bugs.webkit.org/show_bug.cgi?id=184910 5 6 Reviewed by Chris Dumez. 7 8 Steps 9.1 and 9.2 in the XMLHTTPRequest::open [1] algorithm 9 specify that non null user or non null password ought 10 to be set on the URL, so implement this. 11 12 Behavior matches Firefox and Chrome. 13 14 [1] https://xhr.spec.whatwg.org/#dom-xmlhttprequest-open 15 16 Test: xhr/send-authentication-competing-names-passwords.htm 17 18 * xml/XMLHttpRequest.cpp: 19 (WebCore::XMLHttpRequest::open): 20 1 21 2018-09-04 Simon Fraser <simon.fraser@apple.com> 2 22 -
trunk/Source/WebCore/xml/XMLHttpRequest.cpp
r235360 r235631 390 390 { 391 391 URL urlWithCredentials = scriptExecutionContext()->completeURL(url); 392 if (!user.isNull()) {392 if (!user.isNull()) 393 393 urlWithCredentials.setUser(user); 394 if (!password.isNull()) 395 urlWithCredentials.setPass(password); 396 } 394 if (!password.isNull()) 395 urlWithCredentials.setPass(password); 397 396 398 397 return open(method, urlWithCredentials, async);
Note:
See TracChangeset
for help on using the changeset viewer.