|
|
@ -387,8 +387,17 @@ void Application::runExternalProgram(const BitTorrent::TorrentHandle *torrent) c |
|
|
|
// enable command injection via torrent name and other arguments
|
|
|
|
// enable command injection via torrent name and other arguments
|
|
|
|
// (especially when some automated download mechanism has been setup).
|
|
|
|
// (especially when some automated download mechanism has been setup).
|
|
|
|
// See: https://github.com/qbittorrent/qBittorrent/issues/10925
|
|
|
|
// See: https://github.com/qbittorrent/qBittorrent/issues/10925
|
|
|
|
|
|
|
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) |
|
|
|
|
|
|
|
QStringList args = QProcess::splitCommand(program); |
|
|
|
|
|
|
|
if (args.isEmpty()) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const QString command = args.takeFirst(); |
|
|
|
|
|
|
|
QProcess::startDetached(command, args); |
|
|
|
|
|
|
|
#else |
|
|
|
QProcess::startDetached(program); |
|
|
|
QProcess::startDetached(program); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void Application::sendNotificationEmail(const BitTorrent::TorrentHandle *torrent) |
|
|
|
void Application::sendNotificationEmail(const BitTorrent::TorrentHandle *torrent) |
|
|
|