summaryrefslogtreecommitdiffstats
path: root/src/network/kernel
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-05-04 11:33:10 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-05-04 17:38:40 +0200
commit0f7987f0c934b311bd39a5a496ffb0c6128eb8df (patch)
treedea392deb3c43e377a224271c4f450dcff3fc76f /src/network/kernel
parentea7d85457d30e915ad470919d2e74867cba9cad8 (diff)
parentf0ea852d4dd6b3139869a952ee92e74cd367866d (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts: src/corelib/text/qlocale.cpp src/network/access/qnetworkaccessmanager.cpp Regenerated tests/auto/testlib/selftests/float/CMakeLists.txt Change-Id: I5a8ae42511380ca49a38b13c6fa8a3c5df8bed01
Diffstat (limited to 'src/network/kernel')
-rw-r--r--src/network/kernel/qauthenticator.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp
index c95b1280b0..3ac54605e4 100644
--- a/src/network/kernel/qauthenticator.cpp
+++ b/src/network/kernel/qauthenticator.cpp
@@ -71,6 +71,7 @@ QT_BEGIN_NAMESPACE
static QByteArray qNtlmPhase1();
static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phase2data);
#if QT_CONFIG(sspi) // SSPI
+static bool q_SSPI_library_load();
static QByteArray qSspiStartup(QAuthenticatorPrivate *ctx, QAuthenticatorPrivate::Method method,
const QString& host);
static QByteArray qSspiContinue(QAuthenticatorPrivate *ctx, QAuthenticatorPrivate::Method method,
@@ -503,8 +504,13 @@ QByteArray QAuthenticatorPrivate::calculateResponse(const QByteArray &requestMet
if (challenge.isEmpty()) {
#if QT_CONFIG(sspi) // SSPI
QByteArray phase1Token;
- if (user.isEmpty()) // Only pull from system if no user was specified in authenticator
+ if (user.isEmpty()) { // Only pull from system if no user was specified in authenticator
phase1Token = qSspiStartup(this, method, host);
+ } else if (!q_SSPI_library_load()) {
+ // Since we're not running qSspiStartup we have to make sure the library is loaded
+ qWarning("Failed to load the SSPI libraries");
+ return "";
+ }
if (!phase1Token.isEmpty()) {
response = phase1Token.toBase64();
phase = Phase2;