Skip to content

[Improvement] Errors from connection::parse contain full/partial url in plain text that might contain sensitive data (user, pass) #1592

@gheorghitamutu

Description

@gheorghitamutu

Hello,

Looking at https://github.com/mongodb/mongo-rust-driver/blob/main/driver/src/client/options.rs#L309 I see that here (and in some other places) at least part of the URL is used as message argument.

While this is straightforward I think it might become an issue in production environments if an URL is invalid (not encoded properly or at all, for example) logging secrets/logins/passwords/accounts.

The error can always be handled by the developer (and avoid logging the URL) but I was wondering if a better choice would be not to embed the URL at all into the error message.

Thank you!

Metadata

Metadata

Assignees

Labels

tracked-in-jiraTicket filed in Mongo's Jira system

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions