aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-08-21 22:20:33 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-08-21 22:20:33 +0300
commitc3d03f0c3392051a845be5afeef246d386e0ca18 (patch)
treed01a8bcab2940c2f141b448759de6d3c80534e31 /launcher/ui
parentfcb436f1f469d6de09a334f3e131b87b09c9821e (diff)
downloadPrismLauncher-c3d03f0c3392051a845be5afeef246d386e0ca18.tar.gz
PrismLauncher-c3d03f0c3392051a845be5afeef246d386e0ca18.tar.bz2
PrismLauncher-c3d03f0c3392051a845be5afeef246d386e0ca18.zip
added check for valid query items in curse url install
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/ui')
-rw-r--r--launcher/ui/MainWindow.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index 780147ef..cbfd4b9a 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -932,6 +932,11 @@ void MainWindow::processURLs(QList<QUrl> urls)
// format of url curseforge://install?addonId=IDHERE&fileId=IDHERE
QUrlQuery query(url);
+ if (query.allQueryItemValues("addonId").isEmpty() || query.allQueryItemValues("fileId").isEmpty()) {
+ qDebug() << "Invalid curseforge link:" << url;
+ continue;
+ }
+
auto addonId = query.allQueryItemValues("addonId")[0];
auto fileId = query.allQueryItemValues("fileId")[0];