-
Notifications
You must be signed in to change notification settings - Fork 358
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
Sanitization not applied recursively #29
Comments
Well, crappity. This appears to be a bug upstream in htmlparser2: I will examine whether I can solve it with recursion without busting the rest of my test suite. That will be slow of course, but necessary for now. |
I published a fix based on recursion and opened an issue to get this fixed upstream. Thanks! |
This issue has been resolved better through the use of the decodeEntities: true option of htmlparser2. Recursive invocation is no longer required to pass the test suite. |
Sanitization is not applied recursively, leading to a vulnerability to certain masking attacks. Example:
I am not harmless: <<img src="csrf-attack"/>img src="csrf-attack"/>
is sanitized toI am not harmless: <img src="csrf-attack"/>
Mitigation: Run sanitization recursively until the input html matches the output html.
The text was updated successfully, but these errors were encountered: