This project is archived and is in readonly mode.
[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
-
Steven Luscher April 7th, 2009 @ 04:54 AM
- Tag changed from action_controller, integration_test to action_controller, integration_test, patch
-
Mike Enriquez May 10th, 2009 @ 01:56 AM
- Assigned user cleared.
I think there's something funky with the patch. You probably meant this
k = first ? key.to_s : "[#{key.to_s}]"
instead of
k = first ? key.to_s : "[key.to_s}]"
-
Steven Luscher May 10th, 2009 @ 03:59 AM
- Assigned user set to Michael Koziarski
Beautiful typo. Patched patch attached!
-
Michael Koziarski June 9th, 2009 @ 09:15 AM
- Milestone cleared.
Applied to 2-3-stable, moving to 3.0.
This patch doesn't apply cleanly to master, is it no longer needed or?
-
Dan Pickett April 21st, 2010 @ 02:31 AM
We've added the test cases to Rails 3 to verify that this errant behavior does not exist on master
Patch attached
-
Dan Pickett May 9th, 2010 @ 06:17 PM
- Tag changed from action_controller, integration_test, patch to action_controller, bugmash, integration_test, patch
-
Jeremy Kemper August 30th, 2010 @ 04:10 AM
- Milestone cleared.
- Importance changed from to Low
-
Santiago Pastorino February 27th, 2011 @ 03:15 AM
- Milestone changed from 3.0.5 to 3.0.6
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>