IndexError in normalize_params
Reported by Rob Anderton | March 18th, 2009 @ 01:44 PM | in 1.0
The normalize_params method of Rack::Utils throws an IndexError exception on params of the form "foo[bar]=value1&foo[bar]roo=value2". My original thought was to silently discard these parameters (I'm using Rails and its what it used to do pre-rack) however looking at the code it seems that raising a TypeError exception is more appropriate.
Attached is a patch that fixes this problem. It also adds messages to the exceptions which should be helpful when debugging and it adds an extra test case for part of the normalize_params method that wasn't previously covered.
Comments and changes to this ticket
-
manveru March 23rd, 2009 @ 02:50 AM
- Milestone set to 1.0
- State changed from new to open
- Assigned user set to manveru
Second that. +1
-
manveru March 26th, 2009 @ 05:59 AM
- State changed from open to resolved
I pushed the patch to master branch
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป