On a non-Windows OS, the quote_this function calls shlex.quote(this) on the provided password. Later , the bcp_command_log is modified to redact the password, but because the password has been wrapped in single quotes this does not work.
bcp_command_log = [c if c != creds.password else "[REDACTED]" for c in bcp_command]
A likely fix is to reassign the quoted value back to the creds object after quoting the values. This section is included below. Another option would be to handle the quote_this logic directly in the creds object.
On a non-Windows OS, the
quote_this
function callsshlex.quote(this)
on the provided password. Later , thebcp_command_log
is modified to redact the password, but because the password has been wrapped in single quotes this does not work.A likely fix is to reassign the quoted value back to the creds object after quoting the values. This section is included below. Another option would be to handle the
quote_this
logic directly in the creds object.