Fix for CVE-2013-0156 and CVE-2013-0155.

See http://ronin-ruby.github.com/blog/2013/01/09/rails-pocs.html for more info.