aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/global/APIPage.cpp
diff options
context:
space:
mode:
authordada513 <dada513@protonmail.com>2022-04-13 23:00:32 +0200
committerSefa Eyeoglu <contact@scrumplex.net>2022-05-22 21:35:20 +0200
commitf00dbdc215c2de3b6906d8182388c27bbc657e24 (patch)
tree08e8eda1091d4d41f5db0b0c662153cbbc760ee2 /launcher/ui/pages/global/APIPage.cpp
parent7d91db607f4dff3c398af85b999344db8338e729 (diff)
downloadPrismLauncher-f00dbdc215c2de3b6906d8182388c27bbc657e24.tar.gz
PrismLauncher-f00dbdc215c2de3b6906d8182388c27bbc657e24.tar.bz2
PrismLauncher-f00dbdc215c2de3b6906d8182388c27bbc657e24.zip
Make Metaserver changable in settings
Co-authored-by: Sefa Eyeoglu <contact@scrumplex.net> Co-authored-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/ui/pages/global/APIPage.cpp')
-rw-r--r--launcher/ui/pages/global/APIPage.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/launcher/ui/pages/global/APIPage.cpp b/launcher/ui/pages/global/APIPage.cpp
index 2841544f..af58b8cd 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,14 @@ void APIPage::applySettings()
QString msaClientID = ui->msaClientID->text();
s->set("MSAClientIDOverride", msaClientID);
+ QUrl metaURL = ui->metaURL->text();
+ // 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);
}