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

Add MASK_URL for url sanitization #1850

Merged
merged 2 commits into from
Jun 12, 2023
Merged

Add MASK_URL for url sanitization #1850

merged 2 commits into from
Jun 12, 2023

Conversation

basepi
Copy link
Contributor

@basepi basepi commented Jun 11, 2023

Python 3.11.4 added more strict URL checking when calling urllib.parse.urlsplit. This caused the url sanitization to fail when the url contained brackets, as with [REDACTED] when redacting passwords in URLs.

I've added a new constants.MASK_URL for use in URL masking, without the square brackets.

Python 3.11.4 added more strict URL checking when calling
`urllib.parse.urlparse`. This caused the url sanitization to fail
when the url contained brackets, as with `[REDACTED]` when redacting
passwords in URLs
@basepi basepi added this to the 8.9 milestone Jun 11, 2023
@basepi basepi requested a review from beniwohli June 11, 2023 17:35
@basepi basepi self-assigned this Jun 11, 2023
Copy link
Contributor

@beniwohli beniwohli left a comment

Choose a reason for hiding this comment

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

Good catch and nice fix!

@basepi basepi merged commit ea579ee into elastic:main Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants