Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider redact password included in jump-connect exception #65

Open
buenoguilherme opened this issue Jun 7, 2023 · 1 comment · May be fixed by #66
Open

Consider redact password included in jump-connect exception #65

buenoguilherme opened this issue Jun 7, 2023 · 1 comment · May be fixed by #66

Comments

@buenoguilherme
Copy link

buenoguilherme commented Jun 7, 2023

If an error occurs during connection, the exception thrown includes the entire hosts list, which in turn may have passwords and those passwords will be present in the stacktrace.

(fn [e s]
  (throw
   (ex-info
    (str "Failed to connect "
         (.getUserName s) "@"
         (.getHost s) ":"
         (.getPort s)
         " " (pr-str (into [] (.getIdentityNames agent)))
         " " (pr-str hosts))
    {:hosts hosts}
    e)))

The password could be removed from the exception message and data.

@buenoguilherme buenoguilherme linked a pull request Jun 7, 2023 that will close this issue
@tiagomlalves
Copy link
Contributor

@buenoguilherme Did you consider just sanitizing the password instead of removing it? Or in other words, isn't it important to distinguish cases where a password is set from when a password is not set at all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants