diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-05-22 13:55:19 +0200 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-05-22 21:36:31 +0200 |
commit | f2e205313485e458e2f5186f743d527d28609c5e (patch) | |
tree | 7ad71def60513c3e0601dce24e9d34c2eb1ccaa7 /launcher/ui/pages/global | |
parent | b181f4bc30f36778f9680eb54e6f3514739161e8 (diff) | |
download | PrismLauncher-f2e205313485e458e2f5186f743d527d28609c5e.tar.gz PrismLauncher-f2e205313485e458e2f5186f743d527d28609c5e.tar.bz2 PrismLauncher-f2e205313485e458e2f5186f743d527d28609c5e.zip |
feat: add trailing slash to meta URL if it is missing
Diffstat (limited to 'launcher/ui/pages/global')
-rw-r--r-- | launcher/ui/pages/global/APIPage.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/launcher/ui/pages/global/APIPage.cpp b/launcher/ui/pages/global/APIPage.cpp index af58b8cd..6ad243dd 100644 --- a/launcher/ui/pages/global/APIPage.cpp +++ b/launcher/ui/pages/global/APIPage.cpp @@ -148,6 +148,13 @@ void APIPage::applySettings() QString msaClientID = ui->msaClientID->text(); s->set("MSAClientIDOverride", msaClientID); QUrl metaURL = ui->metaURL->text(); + // Add required trailing slash + if (!metaURL.isEmpty() && !metaURL.path().endsWith('/')) + { + QString path = metaURL.path(); + path.append('/'); + metaURL.setPath(path); + } // Don't allow HTTP, since meta is basically RCE with all the jar files. if(!metaURL.isEmpty() && metaURL.scheme() == "http") { |