How to disable XML parsing in Rails 3

ruby, ruby-on-rails

Solution

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)

Problem

I want to disable the automatic XML parsing of HTTP parameters. But I've found commands for Rails 2.x only, none of them works for 3.0: ``` config.action_controller.param_parsers.delete Mime::XML (application.rb) ActionController::Base.param_parsers.delete Mime::XML ``` What is the equivalent in Rails 3.0?

Original source

Related problems