Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable XML parsing in Rails 3

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?

like image 816
Julien Avatar asked May 11 '12 23:05

Julien


1 Answers

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)
like image 116
Meier Avatar answered Nov 01 '22 09:11

Meier