Handle spaces in username properly in login flow

Fixes #279

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2019-01-07 10:41:01 +01:00
parent dc993d3ebe
commit 9ec61a84ce
No known key found for this signature in database
GPG key ID: F941078878347C0C

View file

@ -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;
}