From 9ec61a84ce682399b4c39182887e488c99f1d87a Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 7 Jan 2019 10:41:01 +0100 Subject: [PATCH] Handle spaces in username properly in login flow Fixes #279 Signed-off-by: Roeland Jago Douma --- src/gui/wizard/webview.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/wizard/webview.cpp b/src/gui/wizard/webview.cpp index 1c6a74363..0abeae4e4 100644 --- a/src/gui/wizard/webview.cpp +++ b/src/gui/wizard/webview.cpp @@ -138,6 +138,13 @@ void WebViewPageUrlSchemeHandler::requestStarted(QWebEngineUrlRequestJob *reques password = part.mid(9); } } + + user = QUrl::fromPercentEncoding(user.toUtf8()); + password = QUrl::fromPercentEncoding(password.toUtf8()); + + user = user.replace(QChar('+'), QChar(' ')); + password = password.replace(QChar('+'), QChar(' ')); + if (!server.startsWith("http://") && !server.startsWith("https://")) { server = "https://" + server; }