experiment: use loofah attribute scrubber to explore functional drift#136
experiment: use loofah attribute scrubber to explore functional drift#136flavorjones wants to merge 2 commits intomainfrom
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.)