externalcommandhelper: Do not commit suicide when attempting to run non whitelisted command.
Simply returning failure should be sufficient.
This commit is contained in:
parent
32d146eed3
commit
4fa91d75f3
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue