Remove extra information from std.ssh action
The ssh error message can lead to information leak.
Removing the extra ssh message effects only the CLI call,
the full message is still being logged
Change-Id: I0b28e1cb17d4ce3ae711a25b6eaffb4ebf00ccd6
Closes-Bug: 1783708
(cherry picked from commit c93b45a61f
)
This commit is contained in:
parent
2640c73d4a
commit
2309e5265a
|
@ -397,8 +397,11 @@ class SSHAction(actions.Action):
|
|||
def raise_exc(parent_exc=None):
|
||||
message = ("Failed to execute ssh cmd "
|
||||
"'%s' on %s" % (self.cmd, self.host))
|
||||
# We suppress the actual parent error messages in favor of
|
||||
# more generic ones as we might be leaking information to the CLI
|
||||
if parent_exc:
|
||||
message += "\nException: %s" % str(parent_exc)
|
||||
# The full error message needs to be logged regardless
|
||||
LOG.exception(message + " Exception: %s", str(parent_exc))
|
||||
raise exc.ActionException(message)
|
||||
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue