added check for valid query items in curse url install
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
fcb436f1f4
commit
c3d03f0c33
@ -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];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user