diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2010-10-19 14:07:21 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2010-10-27 12:40:27 (GMT) |
commit | f706263856085df62507414ff0bcbadeca6dcfe5 (patch) | |
tree | bb9a61dfc70924b4425dfdbf871e2e2f6a345fee /src/network/access | |
parent | 9bc5a32b875b812c3a706034c8c27614f86bd138 (diff) | |
download | Qt-f706263856085df62507414ff0bcbadeca6dcfe5.zip Qt-f706263856085df62507414ff0bcbadeca6dcfe5.tar.gz Qt-f706263856085df62507414ff0bcbadeca6dcfe5.tar.bz2 |
QNAM HTTP: Do not copy around credentials when using NTLM
Copying the username and password messes up the state inside
the QAuthenticator. Do not do it.
Reviewed-by: Prasanth
Task-Number: QTBUG-13234
Diffstat (limited to 'src/network/access')
-rw-r--r-- | src/network/access/qhttpnetworkconnection.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 54a7548..32881b2 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -257,6 +257,13 @@ void QHttpNetworkConnectionPrivate::copyCredentials(int fromChannel, QAuthentica { Q_ASSERT(auth); + // NTLM is a multi phase authentication. Copying credentials between authenticators would mess things up. + if (!isProxy && channels[fromChannel].authMehtod == QAuthenticatorPrivate::Ntlm) + return; + if (isProxy && channels[fromChannel].proxyAuthMehtod == QAuthenticatorPrivate::Ntlm) + return; + + // select another channel QAuthenticator* otherAuth = 0; for (int i = 0; i < channelCount; ++i) { |