This project is archived and is in readonly mode.
Fix broken Rack params parser in Rails >= 2.3.6
-
Stephen Blackstone
+1 This is impacting my production application...
-
Michael Koziarski
For this one, could we perhaps simply update 2.3.11 to depend on 1.2? Would anything else misbehave?
The rack team have shown no interest in doing point releases for the 1.1. release
-
Michael Koziarski
- Assigned user set to Michael Koziarski
-
Neeraj Singh
I bumped up rack to 1.2 in actionpack and all the tests are passing. Not sure if that means all is good since I don't really know how many tests go through the full stack and how many bypasses rack.
-
Rob Anderton
As I said in the original ticket I looked at bumping to 1.2 but as these were also broken decided to stick with 1.1 and just patch this specific problem.
Running with Rack 1.2.0 gives 2 failures for me (this is using Ruby 1.8.6 p383):
-
CookieTest#test_multiple_cookies fails with an incorrect cookie string as it doesn't expect a trailing newline
-
MultipartParamsParsingTest#test_parses_mixed_files fails 500 error because Rack tries to call #rewind on a string
Rack 1.2.1 breaks immediately (the tests don't get to run at all) because Rack::Utils makes a call to the union method of Regexp which is ok with newer Ruby versions but not with 1.8.6.
So whichever version you choose it's gonna involve monkeys :)
-
-
Neeraj Singh
My bad.
I ran the tests again with rack 1.2 and I am getting the same error as reported by Rob.
I am using.
ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-darwin10.4.0], MBARI 0x6770, Ruby Enterprise Edition 2010.02.
-
Roel van der Hoorn
+1 for the attached patch; nasty bug.
If Rack 1.2 introduces other problems, it is clearly no way to go for a patch-release. Also, Rack's lack of willing to do a point release for 1.1 is really crappy.
-
Rob Anderton
I'm a little concerned that something that could cause major headaches for people has been assigned a low priority - it's nearly 7 months since the bug was introduced and 2 months since I submitted a patch.
I can only assume it hasn't created more of a furore because it's a silent killer most likely to be blamed on user error :)
What needs to be done to ensure this gets fixed?
-
Trung Lê
where's the love? +1
-
Andrew White
Doesn't the rack 1.1.1.pre release fix this - specifically:
https://github.com/rack/rack/commit/6fa19e3a268c05e24907ffe1b344b23... -
Rob Anderton
afaik 1.1.1 never made it to a 'proper' release. 1.2.x also includes the fix but as discussed above this introduces new problems - patching 1.1 seems like a sensible approach to fixing this problem until Rack sorts itself out.
Still surprised more people haven't complained about this.
-
Rob Anderton
Ah maybe Rack is finally going to sort itself out :)
http://groups.google.com/group/rack-devel/browse_thread/thread/b1c3... -
jrochkind
This is NOT fixed in 2.3.11, right? Alas. Still keeping me from updating to a later Rails 2.x than 2.3.6. It surprises me that this hasn't received more attention and is still marked priority=low, I guess few apps need to have quotes in http query strings?
-
Andrew White
If you use the Rack 1.1.1.pre gem with 2.3.11 it should be fixed.
-
Rob Anderton
I've just run through the tests with 1.1.1 installed and the good news is it now works.
I've attached an updated patch: same as last time although obviously no longer any need to monkey-patch rack. I have bumped the version to 1.1.1 so that people don't inadvertently run with 1.1.0 and kept the query string tests in case Rack ever goes off the rails again.
