summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2023-07-12 13:00:32 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2023-07-18 19:18:59 +0200
commit90af40ccd07fda57f966107c5fd8ffcbd955b384 (patch)
treec00cc867eb0f35013274217512cfef6b4ca2d217
parent31da99954282908fc896989344c4be104ae6e62f (diff)
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 <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp3
1 files changed, 2 insertions, 1 deletions
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;