Httpcreds: Fix double slash in the Request App Password url
authorOlivier Goffart <ogoffart@woboq.com>
Fri, 22 Sep 2017 16:59:48 +0000 (18:59 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Thu, 5 Oct 2017 20:01:36 +0000 (22:01 +0200)
Issue #6044

src/gui/creds/httpcredentialsgui.cpp

index bc533db86fb8ebffc0095b171c9ceb1d620ec663..366cbe1619e3caac919776bd74323ef328ad9dae 100644 (file)
@@ -148,7 +148,10 @@ QString HttpCredentialsGui::requestAppPasswordText(const Account *account)
         return QString();
     }
 
+    auto baseUrl = account->url().toString();
+    if (baseUrl.endsWith('/'))
+        baseUrl.chop(1);
     return tr("<a href=\"%1\">Click here</a> to request an app password from the web interface.")
-        .arg(account->url().toString() + path);
+        .arg(baseUrl + path);
 }
 } // namespace OCC