diff options
author | Robert Hogan <robert@roberthogan.net> | 2011-08-15 08:43:43 (GMT) |
---|---|---|
committer | Qt Commercial Integration <QtCommercial@digia.com> | 2012-01-31 10:25:05 (GMT) |
commit | d9d5ad2302a4a9add88bf4e4108e27ab342c81fa (patch) | |
tree | 9a67266ccc6b8222099888209d7781409391ae00 /src/network/kernel | |
parent | 385044b086bea85afba0bd489cad03faff47023c (diff) | |
download | Qt-d9d5ad2302a4a9add88bf4e4108e27ab342c81fa.zip Qt-d9d5ad2302a4a9add88bf4e4108e27ab342c81fa.tar.gz Qt-d9d5ad2302a4a9add88bf4e4108e27ab342c81fa.tar.bz2 |
HTTP internals: send password even if no username is set
Setting only a password (no username) for HTTP requests does not
result in the password being sent.
Only cancel authentication if neither a username nor a password is set.
Requiring a username was preventing user-less logins.
Merge-request: 1250
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Task-number: QTBUG-15566
Diffstat (limited to 'src/network/kernel')
-rw-r--r-- | src/network/kernel/qauthenticator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp index 4f7f4ed..0423e22 100644 --- a/src/network/kernel/qauthenticator.cpp +++ b/src/network/kernel/qauthenticator.cpp @@ -395,7 +395,7 @@ void QAuthenticatorPrivate::parseHttpResponse(const QList<QPair<QByteArray, QByt case Basic: if(realm.isEmpty()) this->options[QLatin1String("realm")] = realm = QString::fromLatin1(options.value("realm")); - if (user.isEmpty()) + if (user.isEmpty() && password.isEmpty()) phase = Done; break; case Ntlm: @@ -406,7 +406,7 @@ void QAuthenticatorPrivate::parseHttpResponse(const QList<QPair<QByteArray, QByt this->options[QLatin1String("realm")] = realm = QString::fromLatin1(options.value("realm")); if (options.value("stale").toLower() == "true") phase = Start; - if (user.isEmpty()) + if (user.isEmpty() && password.isEmpty()) phase = Done; break; } |