Do not add double slash to login flow url

If the entered url ends with a slash we should not add another one.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2019-01-29 22:50:30 +01:00
parent 218ffd0cd8
commit 7c1401da1c
No known key found for this signature in database
GPG key ID: F941078878347C0C

View file

@ -35,7 +35,10 @@ void WebViewPage::initializePage() {
url = "https://nextcloud.com/register"; url = "https://nextcloud.com/register";
} else { } else {
url = _ocWizard->ocUrl(); url = _ocWizard->ocUrl();
url += "/index.php/login/flow"; if (!url.endsWith('/')) {
url += "/";
}
url += "index.php/login/flow";
} }
qCInfo(lcWizardWebiewPage()) << "Url to auth at: " << url; qCInfo(lcWizardWebiewPage()) << "Url to auth at: " << url;
_webView->setUrl(QUrl(url)); _webView->setUrl(QUrl(url));