in reply to (jeffa) Re: Tag-Stripper is Insecure
in thread Tag-Stripper is Insecure

Note that this does not fix everything. For example some older browsers actually saw \x8b and \x9b as < and > respectively, and rendered HTML tags if you used these characters. This is covered in CERT's XSS Vulnerability document.

Luckily it's hard to find a browser vulnerable to this any more. But it's still something to watch for when trying to catch XSS vulnerabilities (the important thing here is to send the character set (encoding) along with the content-type header).

Also it's naive at best to suggest just allowing text. Most systems want to accept some form of HTML. The thing to do is make sure you do allowed tags, not disallowed tags. And never allow attributes. That's just asking for trouble.

  • Comment on Re: (jeffa) Re: Tag-Stripper is Insecure