aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/shellcommand.cpp
diff options
context:
space:
mode:
authorAndre Hartmann <aha_1980@gmx.de>2020-06-10 16:51:17 +0200
committerAndré Hartmann <aha_1980@gmx.de>2020-06-11 05:03:14 +0000
commitb059095f3f23f5632d2707402f0ff23e83f720e9 (patch)
tree3fe7cabdee5b7447ad980da1375165d56e341417 /src/libs/utils/shellcommand.cpp
parent5fcbc55c2cea7133e7b21649e44cff53d65fd048 (diff)
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 <orgads@gmail.com>
Diffstat (limited to 'src/libs/utils/shellcommand.cpp')
-rw-r--r--src/libs/utils/shellcommand.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/utils/shellcommand.cpp b/src/libs/utils/shellcommand.cpp
index b6e26a8a47..6742858aa0 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));
}
}