Someone forgot to h()
We’ve been having fun with the fact that our friends at 37signals forgot to escape HTML in the lobby of Campfire.
Comments
Add your comment
In order to fight spam on this blog, posting comments from a browser without javascript is currently not supported.
Subscribe
Mischa about 1 hour later: (delete | show email)
Hahaha ¶
Dr Nic about 2 hours later: (delete | show email)
Hehehe. ¶
Dan Kubb about 7 hours later: (delete | show email)
That's one of the reasons I switched to using Erubis for my erb views. It has a library called Erubis::EscapedEruby which escapes everything automatically. The difference is that you have to tell it what *not* to escape, which I think catches more mistakes than having to remember to use h() everywhere. ¶
Christian H 1 day later: (delete | show email)
BaseCamp's todo lists had the same problem last time I checked... ¶
Thijs van der Vossen 1 day later: (delete)
The Basecamp todo's are escaped now which is a shame in my opinion; I used this 'feature' to include links in todo items. ¶
rick 5 days later: (delete)
So, is this really a big deal? Just don't invite javascript hackers into your campfire, unless you are a group of javascript hackers. Trust no one!
Seriously though, I suppose a hacker could add malicious logic to your chatroom screen through some sort of CSRF attack... ¶
Manfred Stienstra 5 days later: (delete)
No, and I never said it was. I thought it was funny that you can do stuff like this. I think there might even be a real use-case for this. ¶