fix for https://groups.google.com/forum/#!topic/rubyonrails-security/61bkgvnSGTQ/discussion