feat: add trailing slash to meta URL if it is missing

This commit is contained in:
Sefa Eyeoglu 2022-05-22 13:55:19 +02:00
parent b181f4bc30
commit f2e2053134
No known key found for this signature in database
GPG Key ID: C10411294912A422

View File

@ -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")
{