Skip to content

odbcconnection Trace emits Password #9

@theory

Description

@theory

While running diagnostics as requested for #8, I noticed that odbcconnection tracing emits the password in plain text. Example:

use DBD::ODBC;
DBI->trace(DBD::ODBC->parse_trace_flags('odbcconnection'));
my $dsn = 'dbi:ODBC:Server=example.snowflakecomputing.com;Driver=Snowflake';
my $dbh = DBI->connect($dsn, 'sqitch', 'HIDE ME!', {
    PrintError        => 0,
    RaiseError        => 1,
    AutoCommit        => 1,
    odbc_utf8_on      => 1,
});

The output:

non-Unicode login6_sv
dbd_db_login6
    SQLDriverConnect 'Server=example.snowflakecomputing.com;Driver=Snowflake;UID=sqitch;PWD=HIDE ME!', 'sqitch', 'xxxx'

So it does the right thing for the password argument to connect, but its inclusion in the ODBC DSN is unfortunate.

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