Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CC-8750: Changed the dialects to sanitize all URL properties that case-insensitively contain “password” #866

Merged
merged 2 commits into from Jun 9, 2020

Conversation

rhauch
Copy link
Member

@rhauch rhauch commented Jun 8, 2020

Now sanitizing any URL property that case-insensitively contains (and not just equal to) password. Also added a few dialect-specific tests to ensure that different dialects are sanitizing DBMS-specific properties.

Applying to 5.0.x and newer.

…e-insensitively contain “password”

Now sanitizing any URL property that case-insensitively contains (and not just equal to) `password`.
Also added a few dialect-specific tests to ensure that different dialects are sanitizing DBMS-specific properties.
@rhauch rhauch requested a review from gharris1727 June 8, 2020 15:46
Copy link
Contributor

@gharris1727 gharris1727 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the user forgets an equals and provides a query string like ?passwordmy-password&something=blah the next option will get sanitized: ?passwordmy-password&something-else=****.

This is probably not an edge case worth considering, and it wasn't covered by the previous regex at all.

LGTM, thanks @rhauch!

@rhauch
Copy link
Member Author

rhauch commented Jun 8, 2020

Thanks, @gharris1727. I've updated the regex to account for property names that contain password but end in other characters, by restricting the suffix to not contain the & or = characters. This way, passwordmy-password&something-else=foo... will not sanitize something-else. I've added this case in the unit test.

Copy link
Contributor

@gharris1727 gharris1727 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@rhauch rhauch merged commit bd860e4 into confluentinc:5.0.x Jun 9, 2020
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.

None yet

2 participants