You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (reply->error() == QNetworkReply::NoError && jsonParseError.error == QJsonParseError::NoError
213
-
&& !json.isEmpty()) {
210
+
if (!json.isEmpty()) {
214
211
serverUrl = json["server"].toString();
215
-
if (_enforceHttps && serverUrl.scheme() != QStringLiteral("https")) {
216
-
qCWarning(lcFlow2auth) << "Returned server url" << serverUrl << "does not start with https";
217
-
emit result(Error, tr("The returned server 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."));
218
-
return;
219
-
}
220
212
loginName = json["loginName"].toString();
221
213
appPassword = json["appPassword"].toString();
222
214
}
223
215
224
-
if (reply->error() != QNetworkReply::NoError || jsonParseError.error != QJsonParseError::NoError
if (reply->error() == QNetworkReply::NoError && jsonParseError.error == QJsonParseError::NoError
256
+
&& !json.isEmpty()) {
257
+
const QUrl serverUrl = json["server"].toString();
258
+
if (_enforceHttps && serverUrl.scheme() != QStringLiteral("https")) {
259
+
qCWarning(lcFlow2auth) << "Returned server url" << serverUrl << "does not start with https";
260
+
emit result(Error, tr("The returned server 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."));
261
+
return {};
262
+
}
263
+
}
264
+
265
+
if (reply->error() != QNetworkReply::NoError || jsonParseError.error != QJsonParseError::NoError) {
266
+
QString errorReason;
267
+
if (const QString errorFromJson = json["error"].toString();
268
+
!errorFromJson.isEmpty()) {
269
+
errorReason = tr("Error returned from the server: <em>%1</em>")
0 commit comments