diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2011-12-15 17:31:52 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2012-01-04 17:28:41 (GMT) |
commit | ddb295b7b5c68c0c34cc3c2ec26e0f8e3cc371c9 (patch) | |
tree | 949bec4e447737f93b344633eca7e3a29025f584 /src | |
parent | 5da61168e9f2eb3db9e4f6398eb784ab3ce21a50 (diff) | |
download | Qt-ddb295b7b5c68c0c34cc3c2ec26e0f8e3cc371c9.zip Qt-ddb295b7b5c68c0c34cc3c2ec26e0f8e3cc371c9.tar.gz Qt-ddb295b7b5c68c0c34cc3c2ec26e0f8e3cc371c9.tar.bz2 |
Fix for assertion failure
Change-Id: I97b9ecc37e938a3050793fc746288243a1cb40b7
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
(cherry picked from commit 96cda705dcbeb79429055c1acca91f149d318820)
Diffstat (limited to 'src')
-rw-r--r-- | src/network/access/qnetworkaccessauthenticationmanager.cpp | 5 | ||||
-rw-r--r-- | src/network/access/qnetworkaccessauthenticationmanager_p.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/network/access/qnetworkaccessauthenticationmanager.cpp b/src/network/access/qnetworkaccessauthenticationmanager.cpp index b618ccc..9551b76 100644 --- a/src/network/access/qnetworkaccessauthenticationmanager.cpp +++ b/src/network/access/qnetworkaccessauthenticationmanager.cpp @@ -159,6 +159,11 @@ void QNetworkAccessAuthenticationManager::cacheProxyCredentials(const QNetworkPr QString realm = authenticator->realm(); QNetworkProxy proxy = p; proxy.setUser(authenticator->user()); + + // don't cache null passwords, empty password may be valid though + if (authenticator->password().isNull()) + return; + // Set two credentials: one with the username and one without do { // Set two credentials actually: one with and one without the realm diff --git a/src/network/access/qnetworkaccessauthenticationmanager_p.h b/src/network/access/qnetworkaccessauthenticationmanager_p.h index ddfc116..718c58f 100644 --- a/src/network/access/qnetworkaccessauthenticationmanager_p.h +++ b/src/network/access/qnetworkaccessauthenticationmanager_p.h @@ -73,7 +73,7 @@ public: QString user; QString password; bool isNull() { - return domain.isNull(); + return domain.isNull() && user.isNull() && password.isNull(); } }; Q_DECLARE_TYPEINFO(QNetworkAuthenticationCredential, Q_MOVABLE_TYPE); |