Skip to content

bcpy exception message contains sensitive information #18

@yhf8377

Description

@yhf8377

When bcp command failed for any reason, bcpy throws an error like

Exception: Bcp command failed. Details:
CompletedProcess(args=['bcp', '<db_name>.dbo._csv_upload_oplf79ekgyuwgfkubyhi', 'IN', '/tmp/3RIe1BaQV7aSt80nVThsz', '-f', '/tmp/xytYaR1whpyB3SWXsfyTE', '-S', '<db_server>,1433', '-b', '50000', '-U', '<db_user>@<db_name>', '-P', '<db_password>', '-F', '2'], returncode=1, stderr=b'')

This message will be send to stdout/stderr so visible to any user who have access.

A more generic error message should be better, or at least hide those sensitve database user name and password.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions