Monday, December 3rd, 2007
Filtering JavaScript From HTML Content with AntiSammy
<p>Jason Harwig has posted about AntiSamy, the Java 1.5 compatible library that sanitizes away:I gave a JavaScript security talk last month, and one of the topics was HTML filtering. I gave examples of how MySpace tried to filter executable code, while still allowing HTML tags for formatting. MySpace, of course, failed to foresee every attack vector, and the Samy worm was born.
HTML filtering was never recommended because it was so difficult to get right, and with no proven libraries, trying to build a solution would almost certainly contain security holes.
Related Content:











This is truely a tough nut to crack. I’ll be looking forward to the PHP implementation.
Kudos to getting this reliably working, but I have to wonder why? Presumably you would never rely on client-side validation before submitting to a database or some-such mechanism, I would hope…
Ok, ignore me, I completely mis-intepretted the post. It’s server-side in Java, excellent. Carry on… :)