From 5fe63a4d9a7a38c4963486dff115e71edca82cb3 Mon Sep 17 00:00:00 2001 From: Kevin Ottens Date: Tue, 5 Oct 2021 23:13:27 +0200 Subject: [PATCH] Display the right endpoint in the warning in case of error At that point in time _pollEndpoint isn't set yet. All the checks are against pollEndpoint so display that one in the warning. Otherwise one always end up with an empty URL in the logs which is not very useful for debugging purposes. Signed-off-by: Kevin Ottens --- src/gui/creds/flow2auth.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/creds/flow2auth.cpp b/src/gui/creds/flow2auth.cpp index b94de0afd..54b7b28a8 100644 --- a/src/gui/creds/flow2auth.cpp +++ b/src/gui/creds/flow2auth.cpp @@ -100,7 +100,7 @@ void Flow2Auth::fetchNewToken(const TokenAction action) pollToken = json.value("poll").toObject().value("token").toString(); pollEndpoint = json.value("poll").toObject().value("endpoint").toString(); if (_enforceHttps && QUrl(pollEndpoint).scheme() != QStringLiteral("https")) { - qCWarning(lcFlow2auth) << "Can not poll endpoint because the returned url" << _pollEndpoint << "does not start with https"; + qCWarning(lcFlow2auth) << "Can not poll endpoint because the returned url" << pollEndpoint << "does not start with https"; emit result(Error, tr("The polling URL does not start with HTTPS despite the login URL started with HTTPS. Login will not be possible because this might be a security issue. Please contact your administrator.")); return; } -- 2.30.2