lib.ec.ssh.AsyncSSH: Actually hide password #87
Loading…
Reference in a new issue
No description provided.
Delete branch "jan/fix/20260905-lib-ec-ssh-asyncssh-actually-hide-password"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
lib.ec.ssh.AsyncSSH: Actually hide password
_connect_kwargs(hide_secrets = True) is used to log the connection parameters when a connection fails, without leaking the password. The filtered dictionary is built before the password is replaced with '', and the replacement is applied to the local kwargs dictionary afterwards, after the filtered copy has already been made. The dictionary that ends up in the log therefore still contains the real password.
Hide the password before building the filtered dictionary.