diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp index db3561663..f4c170eb8 100644 --- a/launcher/ui/MainWindow.cpp +++ b/launcher/ui/MainWindow.cpp @@ -947,10 +947,20 @@ void MainWindow::processURLs(QList urls) (url.path().startsWith("/import", Qt::CaseInsensitive)); QUrl dl_url; - if (url.scheme() == "curseforge") { + if (url.scheme() == "curseforge" || (url.scheme() == BuildConfig.LAUNCHER_APP_BINARY_NAME && url.host() == "install")) { // need to find the download link for the modpack / resource // format of url curseforge://install?addonId=IDHERE&fileId=IDHERE + // format of url binaryname://install?platform=curseforge&addonId=IDHERE&fileId=IDHERE QUrlQuery query(url); + + // check if this is a binaryname:// url + if (url.scheme() == BuildConfig.LAUNCHER_APP_BINARY_NAME) { + // check this is an curseforge platform request + if (query.queryItemValue("platform").toLower() != "curseforge") { + qDebug() << "Invalid mod distribution platform:" << query.queryItemValue("platform"); + continue; + } + } if (query.allQueryItemValues("addonId").isEmpty() || query.allQueryItemValues("fileId").isEmpty()) { qDebug() << "Invalid curseforge link:" << url;