From 90af40ccd07fda57f966107c5fd8ffcbd955b384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Wed, 12 Jul 2023 13:00:32 +0200 Subject: [PATCH] Handle authenticate challenge for Negotiate Because we didn't handle Negotiate in the "Start" phase during handleAuthenticateChallenge, we would not emit the auth signal before our second attempt, assuming the server prompts us for one. Emitting the authenticationRequired signal is needed for users to be able to set the Service Principal Name (SPN) option. Alternatively, username and password if not relying on Single sign-on. Done-by: Emil Wipplinger <> Pick-to: 6.6 6.5 Fixes: QTBUG-114559 Change-Id: I833c08dfeda36a6548c5ad6b8af4b8aa9d644c45 Reviewed-by: Edward Welbourne Reviewed-by: Timur Pocheptsov --- src/network/access/qhttpnetworkconnection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 55ac13d759..46baaa3745 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -432,7 +432,8 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket if (priv->phase == QAuthenticatorPrivate::Done || (priv->phase == QAuthenticatorPrivate::Start - && priv->method == QAuthenticatorPrivate::Ntlm)) { + && (priv->method == QAuthenticatorPrivate::Ntlm + || priv->method == QAuthenticatorPrivate::Negotiate))) { if (priv->phase == QAuthenticatorPrivate::Start) priv->phase = QAuthenticatorPrivate::Phase1;