[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
ariya at webkit.org
ariya at webkit.org
Fri Jan 21 14:39:58 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit e2166ecef45efe788405213b73d2a3abe57254f3
Author: ariya at webkit.org <ariya at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Dec 24 04:06:26 2010 +0000
[Qt] User name/password stripped from URLs
https://bugs.webkit.org/show_bug.cgi?id=36232
Patch by Jan Erik Hanssen <jhanssen at sencha.com> on 2010-12-23
Reviewed by Adam Barth.
WebCore:
If a username but no password or no username but a password is present
in a URL, QtWebKit won't send any authentication information down to Qt
as it should.
Tests: http/tests/xmlhttprequest/basic-auth-nopassword.html
http/tests/xmlhttprequest/basic-auth-nouser.html
* platform/network/qt/ResourceHandleQt.cpp:
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::loadResourceSynchronously):
LayoutTests:
Test authentication cases where a username but no password and
no username but a password is present.
* http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt: Added.
* http/tests/xmlhttprequest/basic-auth-nopassword.html: Added.
* http/tests/xmlhttprequest/basic-auth-nouser-expected.txt: Added.
* http/tests/xmlhttprequest/basic-auth-nouser.html: Added.
* http/tests/xmlhttprequest/resources/basic-auth-nouserpass/basic-auth-nouserpass.php: Added.
* platform/gtk/Skipped:
* platform/mac-leopard/http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt: Added.
* platform/mac-snowleopard/http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt: Added.
* platform/mac-tiger/http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt: Added.
* platform/qt/Skipped:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index bbb5e21..f666c50 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,24 @@
+2010-12-23 Jan Erik Hanssen <jhanssen at sencha.com>
+
+ Reviewed by Adam Barth.
+
+ [Qt] User name/password stripped from URLs
+ https://bugs.webkit.org/show_bug.cgi?id=36232
+
+ Test authentication cases where a username but no password and
+ no username but a password is present.
+
+ * http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt: Added.
+ * http/tests/xmlhttprequest/basic-auth-nopassword.html: Added.
+ * http/tests/xmlhttprequest/basic-auth-nouser-expected.txt: Added.
+ * http/tests/xmlhttprequest/basic-auth-nouser.html: Added.
+ * http/tests/xmlhttprequest/resources/basic-auth-nouserpass/basic-auth-nouserpass.php: Added.
+ * platform/gtk/Skipped:
+ * platform/mac-leopard/http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt: Added.
+ * platform/mac-snowleopard/http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt: Added.
+ * platform/mac-tiger/http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt: Added.
+ * platform/qt/Skipped:
+
2010-12-23 Ryosuke Niwa <rniwa at webkit.org>
Unreviewed Qt rebaseline for r74593.
diff --git a/LayoutTests/http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt b/LayoutTests/http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt
new file mode 100644
index 0000000..65a8f58
--- /dev/null
+++ b/LayoutTests/http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt
@@ -0,0 +1 @@
+User: user, password: .
diff --git a/LayoutTests/http/tests/xmlhttprequest/basic-auth-nopassword.html b/LayoutTests/http/tests/xmlhttprequest/basic-auth-nopassword.html
new file mode 100644
index 0000000..2a3ad44
--- /dev/null
+++ b/LayoutTests/http/tests/xmlhttprequest/basic-auth-nopassword.html
@@ -0,0 +1,16 @@
+<html>
+<body>
+<p>Tests for XMLHttpRequest authentication with only username or password set
+<script>
+ if (window.layoutTestController) {
+ if (window.layoutTestController.setHandlesAuthenticationChallenges && window.layoutTestController.setAuthenticationUsername) {
+ layoutTestController.setHandlesAuthenticationChallenges(true);
+ layoutTestController.setAuthenticationUsername("user");
+ }
+ layoutTestController.dumpAsText();
+ layoutTestController.queueLoad("http://user:@localhost:8000/xmlhttprequest/resources/basic-auth-nouserpass/basic-auth-nouserpass.php");
+ }
+
+</script>
+</body>
+</html>
diff --git a/LayoutTests/http/tests/xmlhttprequest/basic-auth-nouser-expected.txt b/LayoutTests/http/tests/xmlhttprequest/basic-auth-nouser-expected.txt
new file mode 100644
index 0000000..22dc0d2
--- /dev/null
+++ b/LayoutTests/http/tests/xmlhttprequest/basic-auth-nouser-expected.txt
@@ -0,0 +1 @@
+User: , password: password.
diff --git a/LayoutTests/http/tests/xmlhttprequest/basic-auth-nouser.html b/LayoutTests/http/tests/xmlhttprequest/basic-auth-nouser.html
new file mode 100644
index 0000000..5dd2ca3
--- /dev/null
+++ b/LayoutTests/http/tests/xmlhttprequest/basic-auth-nouser.html
@@ -0,0 +1,16 @@
+<html>
+<body>
+<p>Tests for XMLHttpRequest authentication with only username or password set
+<script>
+ if (window.layoutTestController) {
+ if (window.layoutTestController.setHandlesAuthenticationChallenges && window.layoutTestController.setAuthenticationPassword) {
+ layoutTestController.setHandlesAuthenticationChallenges(true);
+ layoutTestController.setAuthenticationPassword("password");
+ }
+ layoutTestController.dumpAsText();
+ layoutTestController.queueLoad("http://:password@localhost:8000/xmlhttprequest/resources/basic-auth-nouserpass/basic-auth-nouserpass.php");
+ }
+
+</script>
+</body>
+</html>
diff --git a/LayoutTests/http/tests/xmlhttprequest/resources/basic-auth-nouserpass/basic-auth-nouserpass.php b/LayoutTests/http/tests/xmlhttprequest/resources/basic-auth-nouserpass/basic-auth-nouserpass.php
new file mode 100644
index 0000000..7da6f61
--- /dev/null
+++ b/LayoutTests/http/tests/xmlhttprequest/resources/basic-auth-nouserpass/basic-auth-nouserpass.php
@@ -0,0 +1,10 @@
+<?php
+ if (!isset($_SERVER['PHP_AUTH_USER']) && !isset($_SERVER['PHP_AUTH_PW'])) {
+ header('WWW-Authenticate: Basic realm="WebKit Test Realm"');
+ header('HTTP/1.0 401 Unauthorized');
+ echo 'Authentication canceled';
+ exit;
+ } else {
+ echo "User: {$_SERVER['PHP_AUTH_USER']}, password: {$_SERVER['PHP_AUTH_PW']}.";
+ }
+?>
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 8e89054..8febb89 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5585,3 +5585,8 @@ http/tests/local/link-stylesheet-load-order-preload.html
# https://bugs.webkit.org/show_bug.cgi?id=51380
http/tests/inspector/console-websocket-error.html
+
+# Passing just a username or just a password to
+# layoutTestController.queueLoad() does not work
+http/tests/xmlhttprequest/basic-auth-nouser.html
+http/tests/xmlhttprequest/basic-auth-password.html
diff --git a/LayoutTests/platform/mac-leopard/http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt b/LayoutTests/platform/mac-leopard/http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt
new file mode 100644
index 0000000..7851694
--- /dev/null
+++ b/LayoutTests/platform/mac-leopard/http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt
@@ -0,0 +1,2 @@
+<unknown> - didReceiveAuthenticationChallenge - Responding with user:
+User: user, password: .
diff --git a/LayoutTests/platform/mac-snowleopard/http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt b/LayoutTests/platform/mac-snowleopard/http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt
new file mode 100644
index 0000000..7851694
--- /dev/null
+++ b/LayoutTests/platform/mac-snowleopard/http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt
@@ -0,0 +1,2 @@
+<unknown> - didReceiveAuthenticationChallenge - Responding with user:
+User: user, password: .
diff --git a/LayoutTests/platform/mac-tiger/http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt b/LayoutTests/platform/mac-tiger/http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt
new file mode 100644
index 0000000..7851694
--- /dev/null
+++ b/LayoutTests/platform/mac-tiger/http/tests/xmlhttprequest/basic-auth-nopassword-expected.txt
@@ -0,0 +1,2 @@
+<unknown> - didReceiveAuthenticationChallenge - Responding with user:
+User: user, password: .
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index b0ceb62..c2e8797 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -275,6 +275,9 @@ editing/inserting/5803706-1.html
editing/inserting/5994480-2.html
editing/inserting/insert-bg-font.html
+# http://bugreports.qt.nokia.com/browse/QTBUG-15566
+http/tests/xmlhttprequest/basic-auth-nouser.html
+
# =========================================================================== #
# Failing pasteboard tests. #
# =========================================================================== #
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0058759..24f3ca1 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-12-23 Jan Erik Hanssen <jhanssen at sencha.com>
+
+ Reviewed by Adam Barth.
+
+ [Qt] User name/password stripped from URLs
+ https://bugs.webkit.org/show_bug.cgi?id=36232
+
+ If a username but no password or no username but a password is present
+ in a URL, QtWebKit won't send any authentication information down to Qt
+ as it should.
+
+ Tests: http/tests/xmlhttprequest/basic-auth-nopassword.html
+ http/tests/xmlhttprequest/basic-auth-nouser.html
+
+ * platform/network/qt/ResourceHandleQt.cpp:
+ (WebCore::ResourceHandle::start):
+ (WebCore::ResourceHandle::loadResourceSynchronously):
+
2010-12-23 Ryosuke Niwa <rniwa at webkit.org>
Reviewed by Darin Adler.
diff --git a/WebCore/platform/network/qt/ResourceHandleQt.cpp b/WebCore/platform/network/qt/ResourceHandleQt.cpp
index f40b828..56125b7 100644
--- a/WebCore/platform/network/qt/ResourceHandleQt.cpp
+++ b/WebCore/platform/network/qt/ResourceHandleQt.cpp
@@ -124,7 +124,7 @@ bool ResourceHandle::start(NetworkingContext* context)
if (context && !context->isValid())
return false;
- if (!(d->m_user.isEmpty() || d->m_pass.isEmpty())) {
+ if (!d->m_user.isEmpty() || !d->m_pass.isEmpty()) {
// If credentials were specified for this request, add them to the url,
// so that they will be passed to QNetworkRequest.
KURL urlWithCredentials(firstRequest().url());
@@ -186,7 +186,7 @@ void ResourceHandle::loadResourceSynchronously(NetworkingContext* context, const
RefPtr<ResourceHandle> handle = adoptRef(new ResourceHandle(request, &syncLoader, true, false));
ResourceHandleInternal* d = handle->getInternal();
- if (!(d->m_user.isEmpty() || d->m_pass.isEmpty())) {
+ if (!d->m_user.isEmpty() || !d->m_pass.isEmpty()) {
// If credentials were specified for this request, add them to the url,
// so that they will be passed to QNetworkRequest.
KURL urlWithCredentials(d->m_firstRequest.url());
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list