From 4fa91d75f314a5056c01d3ac386432497c87fc30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Thu, 26 Nov 2020 23:35:48 +0000 Subject: [PATCH] externalcommandhelper: Do not commit suicide when attempting to run non whitelisted command. Simply returning failure should be sufficient. --- src/util/externalcommandhelper.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/externalcommandhelper.cpp b/src/util/externalcommandhelper.cpp index 4093a58..ae5216a 100644 --- a/src/util/externalcommandhelper.cpp +++ b/src/util/externalcommandhelper.cpp @@ -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; }