From f706263856085df62507414ff0bcbadeca6dcfe5 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 19 Oct 2010 16:07:21 +0200 Subject: 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 --- src/network/access/qhttpnetworkconnection.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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) { -- cgit v0.12