Commit 4fa91d75 authored by Andrius Štikonas's avatar Andrius Štikonas
Browse files

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

Simply returning failure should be sufficient.
parent 32d146ee
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment