-
Notifications
You must be signed in to change notification settings - Fork 83
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
experiment: use loofah attribute scrubber to explore functional drift #136
base: main
Are you sure you want to change the base?
Conversation
Test failures:
Since your commit flavorjones/loofah@78c7e74 in 2013, Loofah has allowed HTML5
This has to do with the target scrubber inverting the sense of allowed/disallowed, and can be ignored for the purposes of this experiment.
These failures reflect the fact that Loofah removes empty attributes (with the exception of |
Really I'm primarily asking about:
|
Yes.
In combination with rails-ujs or jquery-ujs, having control to data attributes can allow attackers to make XSS requests or even escape CSRF protection. I sent you details about this vulnerability. |
For posterity, the |
Interesting note: flavorjones/loofah#242 points out that empty HTML5 attributes are valid and probably shouldn't be removed by Loofah (if they're in the safelist). When I come back to this I'll try to figure out why this functionality was originally added in flavorjones/loofah#51 |
@rafaelfranca After seeing #135 I got a little concerned about the drift between Loofah and the RHS attribute scrubber.
I posted a branch of Loofah that accepts an optional set of allowed attributes, and have modified RHS in this PR to use it. There are a few failures that I think we should discuss. (See thread below.)