How to disable XML parsing in Rails 3

I want to disable automatic parsing of XML XML parameters. But I found commands only for Rails 2.x, none of them work for 3.0:

config.action_controller.param_parsers.delete Mime::XML (application.rb)
ActionController::Base.param_parsers.delete Mime::XML

What is equivalent in Rails 3.0?

+5
source share
1 answer

According to the latest security bulletin for CVE-2013-0156, you can use this for Rails 3.0. 3.1 and 3.2

ActionDispatch::ParamsParser::DEFAULT_PARSERS.delete(Mime::XML)
+14
source

All Articles