From 68cf1efd6b4693e8fceaad962331ad97f0a6ba6e Mon Sep 17 00:00:00 2001 From: Shubham Jangra Date: Thu, 30 May 2019 22:36:06 +0530 Subject: [PATCH] Notify user when they enter non whitelisted command Reviewers: stikonas, cjlcarvalho Reviewed By: stikonas Subscribers: #kde_partition_manager Tags: #kde_partition_manager Differential Revision: https://phabricator.kde.org/D21504 --- src/util/externalcommandhelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/externalcommandhelper.cpp b/src/util/externalcommandhelper.cpp index 6b35482..1877e8d 100644 --- a/src/util/externalcommandhelper.cpp +++ b/src/util/externalcommandhelper.cpp @@ -247,7 +247,7 @@ QVariantMap ExternalCommandHelper::start(const QString& command, const QStringLi // Compare with command whitelist QString basename = command.mid(command.lastIndexOf(QLatin1Char('/')) + 1); if (std::find(std::begin(allowedCommands), std::end(allowedCommands), basename) == std::end(allowedCommands)) { - // TODO: notify the user + qInfo() << command <<" command is not one of the whitelisted command"; m_loop->exit(); reply[QStringLiteral("success")] = false; return reply;