Skip to content

Remove logging of full db url when the connection fails. - #4220

Open
MyPhonesAlex wants to merge 1 commit into
OpenSIPS:masterfrom
MyPhonesAlex:remove_logging_of_database_passwords
Open

Remove logging of full db url when the connection fails.#4220
MyPhonesAlex wants to merge 1 commit into
OpenSIPS:masterfrom
MyPhonesAlex:remove_logging_of_database_passwords

Conversation

@MyPhonesAlex

Copy link
Copy Markdown

Summary
Prevent logging of full connection string when a database connection fails to be established.

Logging the full connection string results in the password getting logged, which is a security concern.

Details
This Affects the sqlops module.

When a SQL database connection fails, the whole database URL is logged, which includes the password. This is a security issue.

Whilst it is important to log that the connection has failed, secrets should not be included/

Solution
This PR alters the log point to log out the index of the connection, as opposed to the full URL.

Compatibility
This should have no compatibility issues.

Closing issues
N/A

The full connection string contains the password and logging passwords is a security risk.
@razvancrainea razvancrainea self-assigned this Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants