Skip to content

Commit

Permalink
Verify form submissions for text/plain posts too.
Browse files Browse the repository at this point in the history
Some browsers can POST requests with text/plain encoding, allowing attackers to  potentially subvert the request forgery prevention.

http://pseudo-flaw.net/content/web-browsers/form-data-encoding-roundup/
  • Loading branch information
NZKoz committed Nov 18, 2008
1 parent 7ce3a59 commit 099a98e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/mime_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module Mime
# end
class Type
@@html_types = Set.new [:html, :all]
@@unverifiable_types = Set.new [:text, :json, :csv, :xml, :rss, :atom, :yaml]
@@unverifiable_types = Set.new [:json, :csv, :xml, :rss, :atom, :yaml]
cattr_reader :html_types, :unverifiable_types

# A simple helper class used in parsing the accept header
Expand Down

0 comments on commit 099a98e

Please sign in to comment.