-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Hello,
When there is a connection issue, e.g. server disconnected unexpectedly, an error log is printed out with State which includes username , password within connection_settings.
2024-05-28T08:39:44.109591+08:00 error: GenServer :gnat terminating, ** (stop) "connection closed", Last message: {:tcp_closed, #Port<0.12>}, State: %{socket: #Port<0.12>, parser: %Gnat.Parsec{partial: nil}, connection_settings: %{port: 4222, host: "localhost", password: "xxxxxxxxxxx", username: "xxxxxxxxxxx", tls: false, ssl_opts: [], auth_required: true, inbox_prefix: "_INBOX.", connection_timeout: 3000, no_responders: false, tcp_opts: [:binary]}, server_info: %{port: 4222, version: "2.10.14", host: "0.0.0.0", go: "go1.21.9", headers: true, client_id: 11, proto: 1, auth_required: true, git_commit: "31af767", cluster: "xxxxxxxxxxx", server_name: "xxxxxxxxxxx", server_id: "xxxxxxxxxxx", max_payload: 8388608, client_ip: "xxxxxxxxxxx", xkey: "xxxxxxxxxxx"}, receivers: %{0 => %{monitor_ref: nil, recipient: #PID<0.788.0>, unsub_after: :infinity}, 1 => %{monitor_ref: #Reference<0.230481281.3309043716.60743>, recipient: #PID<0.992.0>, unsub_after: :infinity}}, request_inbox_prefix: "_INBOX.9KSPZ08ScKIxaqcd.", next_sid: 2, request_receivers: %{}}
Would it be possible to remove connection_settings from State to avoid leaking credential information ?
Thank you very much!