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

[WJ-1291] Fix unsanitized javascript in anchors #28

Merged
merged 4 commits into from
Dec 29, 2024
Merged

Conversation

emmiegit
Copy link
Member

The check for prohibiting dangerous schemes, like javascript:, could be bypassed by adding whitespace. Browsers would ignore the whitespace, but it would not match the verbatim dangerous scheme check. This PR patches this issue by adding a check that looks to see if there are weird characters (non-alphanumeric/underscore/dash) before the colon, which would indicate the input is potentially troublesome. In this case, it is rejected as a dangerous URL.

@emmiegit emmiegit requested a review from Zokhoi December 29, 2024 22:10
@emmiegit emmiegit self-assigned this Dec 29, 2024
@emmiegit emmiegit merged commit 996a380 into main Dec 29, 2024
6 checks passed
@emmiegit emmiegit deleted the WJ-1291-fix branch December 29, 2024 23:30
@emmiegit
Copy link
Member Author

thanks @Zokhoi

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