diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-05-22 22:47:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-22 22:47:00 +0200 |
commit | f24cdd6564c0abf39b10b31d3896b939b4dbd7d3 (patch) | |
tree | 7ad71def60513c3e0601dce24e9d34c2eb1ccaa7 /launcher/ui/pages/global/APIPage.cpp | |
parent | 7d91db607f4dff3c398af85b999344db8338e729 (diff) | |
parent | f2e205313485e458e2f5186f743d527d28609c5e (diff) | |
download | PrismLauncher-f24cdd6564c0abf39b10b31d3896b939b4dbd7d3.tar.gz PrismLauncher-f24cdd6564c0abf39b10b31d3896b939b4dbd7d3.tar.bz2 PrismLauncher-f24cdd6564c0abf39b10b31d3896b939b4dbd7d3.zip |
Merge pull request #425 from dada513/dynamic_meta
Diffstat (limited to 'launcher/ui/pages/global/APIPage.cpp')
-rw-r--r-- | launcher/ui/pages/global/APIPage.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/launcher/ui/pages/global/APIPage.cpp b/launcher/ui/pages/global/APIPage.cpp index 2841544f..6ad243dd 100644 --- a/launcher/ui/pages/global/APIPage.cpp +++ b/launcher/ui/pages/global/APIPage.cpp @@ -132,6 +132,8 @@ void APIPage::loadSettings() QString msaClientID = s->get("MSAClientIDOverride").toString(); ui->msaClientID->setText(msaClientID); + QString metaURL = s->get("MetaURLOverride").toString(); + ui->metaURL->setText(metaURL); QString curseKey = s->get("CFKeyOverride").toString(); ui->curseKey->setText(curseKey); } @@ -145,6 +147,21 @@ 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") + { + metaURL.setScheme("https"); + } + + s->set("MetaURLOverride", metaURL); QString curseKey = ui->curseKey->text(); s->set("CFKeyOverride", curseKey); } |