Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Mixed parameter types trigger unhandled condition [Patch provided] #331

Closed
lukejahnke opened this Issue · 0 comments

2 participants

@lukejahnke

URIs such as /?a=1&a[]=1 triggered an unhandled condition. It would only be a problem with rack except Sinatra includes it's own "showexceptions.rb". This file closely follows rack's version which has the same issue. I tested the issue against get/post/cookies and only get and post triggered the problem (which makes sense).

Unfortunately I haven't included any tests in the patch because I couldn't find any existing tests that were suitable to base one off. Any help with this would be appreciated. I haven't provided a patch for rack, but if anybody has the time, feel free to do so.

Version:
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]

Error:
ERROR NoMethodError: undefined method `empty?' for nil:NilClass
(erb):201:in `pretty'
/usr/lib/ruby/1.9.1/erb.rb:753:in `eval'
/usr/lib/ruby/1.9.1/erb.rb:753:in `result'
/usr/lib/ruby/gems/1.9.1/gems/rack-1.3.2/lib/rack/showexceptions.rb:90:in `pretty'

Patch located at: https://github.com/lukejahnke/sinatra/tree/mixed_parameter_type_patch

@rkh rkh closed this in b484618
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.