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
This commit is contained in:
parent
39ab428f0c
commit
68cf1efd6b
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue