Browse Source

Prevent command injection via "Run external program" function

Closes #10925.
adaptive-webui-19844
Chocobo1 5 years ago
parent
commit
a610c8567e
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 6
      src/app/application.cpp

6
src/app/application.cpp

@ -335,7 +335,11 @@ void Application::runExternalProgram(const BitTorrent::TorrentHandle *torrent) c
::LocalFree(args); ::LocalFree(args);
#else #else
QProcess::startDetached(QLatin1String("/bin/sh"), {QLatin1String("-c"), program}); // Cannot give users shell environment by default, as doing so could
// enable command injection via torrent name and other arguments
// (especially when some automated download mechanism has been setup).
// See: https://github.com/qbittorrent/qBittorrent/issues/10925
QProcess::startDetached(program);
#endif #endif
} }

Loading…
Cancel
Save