Skip to content

Commit

Permalink
Handle spaces in username properly in login flow
Browse files Browse the repository at this point in the history
Fixes nextcloud#279

Signed-off-by: Roeland Jago Douma <[email protected]>
  • Loading branch information
rullzer committed Jan 7, 2019
1 parent dc993d3 commit 9ec61a8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gui/wizard/webview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9ec61a8

Please sign in to comment.