Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Rails(on rack) customize reqeust parameters raise error

#5587

If some people customeize request parameters for example: (?id=1&id[]=1), rails will raise error and make error log file larger.

Reported by elvuel · September 9th, 2010 @ 04:59 AM

State: invalid
Milestone: 3.0.2
Assigned to: Santiago Pastorino Santiago Pastorino
Importance: Low

Activity

  1. Jeff Kreeftmeijer
    Jeff Kreeftmeijer

    Could you give us a little more information about what you did and which error message you got? That'd make it easier to fix the problem. ;)

    Let's mark this one as incomplete until we get more info.

    September 9th, 2010 @ 05:16 PM

  2. elvuel
    elvuel

    Error message:

    Processing WelcomeController#index (for 127.0.0.1 at 2010-09-10 11:06:21) [GET]
    Parameters: {"action"=>"index", "id"=>"[]", "controller"=>"welcome"} Completed in 457ms (View: 453, DB: 114) | 200 OK [http://localhost/?id=1&id=[]]
    SQL (0.2ms) SET NAMES 'utf8' SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 /!\ FAILSAFE /!\ Fri Sep 10 11:06:42 +0800 2010 Status: 500 Internal Server Error undefined method each_pair' for nil:NilClass

    /rails/comemap/vendor/rails/activesupport/lib/active_support/whiny_nil.rb:52:in `method_missing'
    /rails/comemap/vendor/rails/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb:46:in `update'
    /rails/comemap/vendor/rails/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb:91:in `merge'
    /rails/comemap/vendor/rails/actionpack/lib/action_controller/request.rb:385:in `parameters'
    /rails/comemap/vendor/rails/actionpack/lib/action_controller/base.rb:1288:in `assign_shortcuts'
    /rails/comemap/vendor/rails/actionpack/lib/action_controller/base.rb:527:in `process_without_filters'
    /rails/comemap/vendor/rails/actionpack/lib/action_controller/filters.rb:606:in `process_without_compass'
    /rails/comemap/vendor/gems/compass-0.10.3/lib/compass/app_integration/rails/actionpack2/action_controller.rb:7:in `process'
    /rails/comemap/vendor/rails/actionpack/lib/action_controller/rescue.rb:65:in `call_with_exception'
    /rails/comemap/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:90:in `dispatch'
    /rails/comemap/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:121:in `_call'
    /rails/comemap/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
    /rails/comemap/vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in `call'
    /rails/comemap/vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in `call'
    /rails/comemap/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
    /rails/comemap/vendor/rails/activerecord/lib/active_record/query_cache.rb:9:in `cache'
    /rails/comemap/vendor/rails/activerecord/lib/active_record/query_cache.rb:28:in `call'
    /rails/comemap/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/haml-3.0.15/rails/../lib/sass/plugin/rack.rb:41:in `call'
    /rails/comemap/vendor/rails/actionpack/lib/action_controller/string_coercion.rb:25:in `call'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/rack-1.1.0/lib/rack/head.rb:9:in `call'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in `call'
    /rails/comemap/vendor/rails/actionpack/lib/action_controller/params_parser.rb:15:in `call'
    /rails/comemap/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:99:in `call'
    /rails/comemap/vendor/rails/actionpack/lib/action_controller/failsafe.rb:26:in `call'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/rack-1.1.0/lib/rack/lock.rb:11:in `call'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/rack-1.1.0/lib/rack/lock.rb:11:in `synchronize'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/rack-1.1.0/lib/rack/lock.rb:11:in `call'
    /rails/comemap/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:114:in `call'
    /rails/comemap/vendor/rails/actionpack/lib/action_controller/reloader.rb:34:in `run'
    /rails/comemap/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:108:in `call'
    /rails/comemap/vendor/rails/railties/lib/rails/rack/static.rb:31:in `call'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/rack-1.1.0/lib/rack/urlmap.rb:47:in `call'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `each'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `call'
    /rails/comemap/vendor/rails/railties/lib/rails/rack/log_tailer.rb:17:in `call'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/rack-1.1.0/lib/rack/content_length.rb:13:in `call'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/rack-1.1.0/lib/rack/chunked.rb:15:in `call'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/rack-1.1.0/lib/rack/handler/mongrel.rb:67:in `process'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
    /Users/dev2x/.rvm/gems/ruby-1.8.7-p299/gems/rack-1.1.0/lib/rack/handler/mongrel.rb:38:in `run'
    /rails/comemap/vendor/rails/railties/lib/commands/server.rb:111
    /Users/dev2x/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    /Users/dev2x/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    ./script/server:3
    

    September 10th, 2010 @ 04:15 AM

  3. Rohit Arondekar
    Rohit Arondekar
    • Milestone cleared.
    • State changed from new to open
    • Assigned user set to Santiago Pastorino
    • Importance changed from to Low

    September 10th, 2010 @ 09:21 AM

  4. Jeremy Kemper
  5. Ryan Bigg
    Ryan Bigg
    • Tag cleared.

    Automatic cleanup of spam.

    October 16th, 2010 @ 02:32 AM

  6. Ryan Bigg
    Ryan Bigg

    Automatic cleanup of spam.

    October 16th, 2010 @ 02:32 AM

  7. Ryan Bigg
    Ryan Bigg

    Automatic cleanup of spam.

    October 19th, 2010 @ 08:36 AM

  8. Santiago Pastorino
    Santiago Pastorino
    • State changed from open to invalid

    If you put invalid input it's ok to get an error

    November 7th, 2010 @ 10:41 PM

  9. Ryan Bigg
    Ryan Bigg

    Automatic cleanup of spam.

    November 8th, 2010 @ 01:50 AM