News for hackers. Stuff that matters.
Re:Today's Email Incident by batiste on Wednesday March 20, 2013 @06:06AM (#5406354)
I was looking for the date when RoR changed their templating so it always output sanitized content and I found this:

http://stackoverflow.com/questions/698700/escaping-html-in-r...

Correct me if I am wrong but it seems to me that RoR still isn't shipped with a safe default?

Edit: RoR added auto-escaping around February 2010, Django had it since November 2007

http://yehudakatz.com/2010/02/01/safebuffers-and-rails-3-0/ https://code.djangoproject.com/wiki/AutoEscaping?x=52&y=...

Re:Today's Email Incident by grey-area on Wednesday March 20, 2013 @06:47AM (#5406476)
You're wrong. It has auto-escaped since Rails 3.

http://yehudakatz.com/2010/02/01/safebuffers-and-rails-3-0/

Re:Today's Email Incident by rscale on Wednesday March 20, 2013 @06:48AM (#5406480)
Rails changed the default to safe output about three years ago. 3.0 escaped output out of the gate, and 2.3 switched the default in the 2.3.6 neighborhood.

Prior before that, the standard way to sanitize html output was to write <%= h foo %> instead of <%= foo %> in your templates.