Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Disable to upload 477 over image file (exceeded available parameter key space) #563

Closed
Nobuaki opened this Issue · 1 comment

2 participants

@Nobuaki

Hello,

I got the error, not to upload the over 477 images on my web site.

Version
Linux Nginx(1.0.5) + Ruby 1.8.7 + Rails 2.3.17
$ gem list
*** LOCAL GEMS ***

actionmailer (2.3.17, 2.3.16)
actionpack (2.3.17, 2.3.16)
activerecord (2.3.17, 2.3.16)
activeresource (2.3.17, 2.3.16)
activesupport (3.2.12, 2.3.17, 2.3.16)
aws-sdk (1.8.3.1)
aws-ses (0.4.4)
barcode (0.2)
builder (3.2.0)
daemons (1.0.10)
delayed_job (2.0.7)
exifr (1.1.3)
fastercsv (1.5.5)
gbarcode (0.98.20)
i18n (0.6.2)
json (1.7.7)
kgio (2.8.0)
mail (2.5.3)
mime-types (1.21)
multi_json (1.6.1)
mysql (2.9.1)
nokogiri (1.5.6)
polyglot (0.3.3)
rack (1.1.6)
rails (2.3.17, 2.3.16)
raindrops (0.10.0)
rake (0.8.7)
rmagick (2.13.2)
rubygems-update (1.6.2)
treetop (1.4.12)
unicorn (4.6.2)
uuidtools (2.1.3)
xml-simple (1.1.2)

Error Log

Status: 500 Internal Server Error
exceeded available parameter key space
/usr/lib64/ruby/gems/1.8/gems/rack-1.1.6/lib/rack/utils.rb:87:in parse_nested_query'
/usr/lib64/ruby/gems/1.8/gems/rack-1.1.6/lib/rack/utils.rb:81:in
each'
/usr/lib64/ruby/gems/1.8/gems/rack-1.1.6/lib/rack/utils.rb:81:in parse_nested_query'
/usr/lib64/ruby/gems/1.8/gems/rack-1.1.6/lib/rack/request.rb:264:in
parse_query'
/usr/lib64/ruby/gems/1.8/gems/rack-1.1.6/lib/rack/request.rb:153:in POST'
/usr/lib64/ruby/gems/1.8/gems/rack-1.1.6/lib/rack/methodoverride.rb:15:in
call'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.17/lib/action_controller/params_parser.rb:15:in call'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.17/lib/action_controller/session/cookie_store.rb:99:in
call'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.17/lib/action_controller/failsafe.rb:26:in call'
/usr/lib64/ruby/gems/1.8/gems/rack-1.1.6/lib/rack/lock.rb:11:in
call'
/usr/lib64/ruby/gems/1.8/gems/rack-1.1.6/lib/rack/lock.rb:11:in synchronize'
/usr/lib64/ruby/gems/1.8/gems/rack-1.1.6/lib/rack/lock.rb:11:in
call'
/usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.17/lib/action_controller/dispatcher.rb:106:in call'
/usr/lib64/ruby/gems/1.8/gems/rails-2.3.17/lib/rails/rack/static.rb:31:in
call'
/usr/lib64/ruby/gems/1.8/gems/rack-1.1.6/lib/rack/urlmap.rb:47:in call'
/usr/lib64/ruby/gems/1.8/gems/rack-1.1.6/lib/rack/urlmap.rb:41:in
each'
/usr/lib64/ruby/gems/1.8/gems/rack-1.1.6/lib/rack/urlmap.rb:41:in call'
/usr/lib64/ruby/gems/1.8/gems/unicorn-4.6.1/lib/unicorn/http_server.rb:552:in
process_client'
/usr/lib64/ruby/gems/1.8/gems/unicorn-4.6.1/lib/unicorn/http_server.rb:632:in worker_loop'
/usr/lib64/ruby/gems/1.8/gems/unicorn-4.6.1/lib/unicorn/http_server.rb:500:in
spawn_missing_workers'
/usr/lib64/ruby/gems/1.8/gems/unicorn-4.6.1/lib/unicorn/http_server.rb:142:in start'
/usr/lib64/ruby/gems/1.8/gems/unicorn-4.6.1/bin/unicorn_rails:209
/usr/bin/unicorn_rails:19:in
load'
/usr/bin/unicorn_rails:19

Please help me!

Regards,
Nobu

@raggi
Owner

This is the fix to protect against the keyspace attacks. You need to increase the size of the keyspace, here: https://github.com/rack/rack/blob/master/lib/rack/utils.rb#L53-L59

e.g.

Rack::Utils.keyspace_limit = 131072
@raggi raggi closed this
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.