From a8b0b7798e0408a0b1fef89f33e95a5932e8a507 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 <> Fixes: QTBUG-114559 Change-Id: I833c08dfeda36a6548c5ad6b8af4b8aa9d644c45 Reviewed-by: Edward Welbourne Reviewed-by: Timur Pocheptsov (cherry picked from commit 90af40ccd07fda57f966107c5fd8ffcbd955b384) Reviewed-by: Qt Cherry-pick Bot --- 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 55ac13d759f..46baaa37456 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;