externalcommandhelper: Do not commit suicide when attempting to run non whitelisted command.

Simply returning failure should be sufficient.
This commit is contained in:
Andrius Štikonas 2020-11-26 23:35:48 +00:00
parent 32d146eed3
commit 4fa91d75f3
1 changed files with 0 additions and 1 deletions

View File

@ -288,7 +288,6 @@ QVariantMap ExternalCommandHelper::RunCommand(const QString& command, const QStr
QString basename = command.mid(command.lastIndexOf(QLatin1Char('/')) + 1);
if (std::find(std::begin(allowedCommands), std::end(allowedCommands), basename) == std::end(allowedCommands)) {
qInfo() << command <<" command is not one of the whitelisted command";
qApp->quit();
reply[QStringLiteral("success")] = false;
return reply;
}