-
Sanitize your output in Ruby on Rails
Posted on October 30th, 2008 1 commentWe all know about the holy h() method that escapes your output when you do <%=h blah %>. But how many of us can claim we remember to use it where it’s appropriate during development 100% of the time? Can you swear you’ve never missed one? Moreover, it’s such a mental distraction to think logic and h() at the same time. And when you take over a Rails project in the middle, how can you ensure the previous developers use h()?
Here’s the rescue.
I don’t think I need to explain more. Just use it and you will find all those places where you should sanitize your output with h(), sanitize(), and untaint(), …etc.
One response to “Sanitize your output in Ruby on Rails”
-
Alexwebmaster March 3rd, 2009 at 11:32
Hello webmaster
I would like to share with you a link to your site
write me here preonrelt@mail.ru
Leave a reply
-



Recent Comments