From b059095f3f23f5632d2707402f0ff23e83f720e9 Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Wed, 10 Jun 2020 16:51:17 +0200 Subject: [PATCH] Don't pass full command line to exitMessage() Amends 00b692e67e5 SynchronousProcessResponse::exitMessage() takes only the executable as first parameter. Passing a whole command line there has two disadvantages: 1. Sensible data (like passwords) that needs to be obfuscated is shown as plain text in the output pane. 2. Forward slashes like in "refs/for/master" are converted to backslashes on Windows. While the second case could be fixed with an overload of CommandLine to exitMessage, the first point probably needs more work at several places. So let's just remove the arguments, like it was in Creator versions before 00b692e67e5 Fixes: QTCREATORBUG-24153 Change-Id: I546f7238347466eac089ba3e7f74201c2be40d39 Reviewed-by: Orgad Shaneh --- src/libs/utils/shellcommand.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/utils/shellcommand.cpp b/src/libs/utils/shellcommand.cpp index b6e26a8a47d..6742858aa00 100644 --- a/src/libs/utils/shellcommand.cpp +++ b/src/libs/utils/shellcommand.cpp @@ -347,9 +347,9 @@ SynchronousProcessResponse ShellCommand::runCommand(const CommandLine &command, // Success/Fail message in appropriate window? if (response.result == SynchronousProcessResponse::Finished) { if (d->m_flags & ShowSuccessMessage) - emit proxy->appendMessage(response.exitMessage(command.toUserOutput(), timeoutS)); + emit proxy->appendMessage(response.exitMessage(command.executable().toUserOutput(), timeoutS)); } else if (!(d->m_flags & SuppressFailMessage)) { - emit proxy->appendError(response.exitMessage(command.toUserOutput(), timeoutS)); + emit proxy->appendError(response.exitMessage(command.executable().toUserOutput(), timeoutS)); } }