From c843c78d37c21f674433aad4c6e947bb9c83362f Mon Sep 17 00:00:00 2001 From: Roland Walker Date: Sat, 4 Apr 2026 11:35:26 -0400 Subject: [PATCH] avoid logging SSH passwords While the SSH support is both undocumented and deprecated, mycli should not log passwords in any situation. --- changelog.md | 1 + mycli/sqlexecute.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 43f014e6..c347dddd 100644 --- a/changelog.md +++ b/changelog.md @@ -19,6 +19,7 @@ Bug Fixes * Make multi-line detection and special cases more robust. * Run empty `--execute` arguments instead of ignoring the flag. * Exit with error when the `--batch` argument is an empty string. +* Avoid logging SSH passwords. Internal diff --git a/mycli/sqlexecute.py b/mycli/sqlexecute.py index d9fa108e..40b933a5 100644 --- a/mycli/sqlexecute.py +++ b/mycli/sqlexecute.py @@ -245,7 +245,7 @@ def connect( "\tssh_user: %r" "\tssh_host: %r" "\tssh_port: %r" - "\tssh_password: %r" + "\tssh_password: ***" "\tssh_key_filename: %r" "\tinit_command: %r" "\tunbuffered: %r", @@ -260,7 +260,6 @@ def connect( ssh_user, ssh_host, ssh_port, - ssh_password, ssh_key_filename, init_command, unbuffered,