Skip to content

Connection credential is printed out in error log #160

@aadchy

Description

@aadchy

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions