News for hackers. Stuff that matters.
Re:Shopify's path to Rails 3 by speleding on Tuesday November 16, 2010 @06:09PM (#1912128)
I'm almost done with upgrading myself and the XSS stuff does take a lot of effort. I am very surprised the Shopify blog says they checked for XSS error manually though because it's very easy to add something to your test helper that checks every @response.body for sequences like "<" and runs the result through HTML tidy. That catches 95%.

By the way, a patch of mine is in rails 3.0.3 that just came out and now you can just do a global replace of <%= with <%== and be mostly done with it. But that would be cheating.

Re:Shopify's path to Rails 3 by xal on Tuesday November 16, 2010 @07:09PM (#1912318)
Man that's a nice idea. I wish we would have had it ourselves during the process.
Re:Shopify's path to Rails 3 by speleding on Wednesday November 17, 2010 @04:10AM (#1913563)
In case it helps anyone, this is the helper I used: https://gist.github.com/703175

The tidy lib is installed by default on the Mac. It's very fast (written in C) so it only adds a few seconds to my tests. (I'm leaving it in after the conversion.)

Another tip: it helps to put a lot of <&bad"> tags in your fixtures, that will trigger a bunch of errors in the above test if you are not doing your escaping properly.