This project is archived and is in readonly mode.

#2439 new
Steven Luscher

[PATCH] ActionController::Integration::Session no longer mangles multiparameter attribute params when processing multipart requests

Reported by Steven Luscher | April 7th, 2009 @ 04:46 AM | in 3.0.6

Fixed what I thought was a bug in Webrat, but turned out to be a bug in Rails.

Turns out, if you try:


post :update, :"foo(1i)" => 1980, :"foo(2i)" => 2, :"foo(3i)" => 27

…everything works as you would expect. The moment you make that post multipart, though, by adding a file to the mix:


post :update, :"foo(1i)" => 1980, :"foo(2i)" => 2, :"foo(3i)" => 27, :file => fixture_file_upload("birthday_suit.jpg", "image/jpg")

params[:"foo(1i)"] unexpectedly becomes params[:"foo%281i%29"] as the curved brackets get escaped.

Patch attached!

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages