You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: ConnectionProfile Debug prints the password #882
ConnectionProfile and SSHConfig derive Debug, so {:?} prints password, the SSH password and the passphrase in plain text.
Nothing leaks today: every #[tracing::instrument] that takes a profile skips it. #875 confirmed this while auditing logging sites. But an instrument attribute records every argument it doesn't skip, so one future ?profile, or one missed skip, writes the password to the DEBUG file log.
Where
src-tauri/crates/mas-core/src/models/connection.rs: #[derive(Debug, …)] pub struct ConnectionProfile (line 34, password at 44) and SSHConfig (password and passphrase around lines 127–130).
Fix
Replace the derive with a hand-written Debug that prints <redacted> for those fields when they're non-empty, and "" when they're empty, so empty-vs-set stays visible for debugging. Add a unit test that format!("{:?}", profile) contains no password. Check whether ConnectionProfileInput or any other type carrying a password derives Debug too.
Activity
fix: keep passwords out of ConnectionProfile Debug