Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #2295 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

[PATCH] CGIMethods.parse_query_parameters does not accept '&a=1&&b=2'

Reported by: darashi@gmail.com Assigned to: David
Priority: normal Milestone:
Component: ActionPack Version: 0.13.1
Severity: normal Keywords: query string
Cc:

Description

parse_query_parameters() fails if the query_string has an ampersand at the head or two or more consecutive ampersands.

I need this patch to support TypeKey authentication. It redirects us to 'http://my_web_site/?&ts=...'

Attachments

parse_query_parameters_double_ampersands.diff (1.5 kB) - added by darashi@gmail.com on 09/25/05 05:47:26.

Change History

09/25/05 05:47:26 changed by darashi@gmail.com

  • attachment parse_query_parameters_double_ampersands.diff added.

09/27/05 22:23:56 changed by bitsweat

  • status changed from new to closed.
  • resolution set to fixed.

Changeset [2375].

04/18/06 11:28:48 changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

Is this still fixed?

Here's what I get with a query string: 'hostname/?asd&&asd' This is using rails 1.1.2

You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occured while evaluating nil.include? /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/cgi_ext/cgi_methods.rb:49:in `parse_request_parameters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/cgi_ext/cgi_methods.rb:47:in `parse_request_parameters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/cgi_process.rb:70:in `request_parameters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/request.rb:12:in `parameters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:122:in `set_session_options' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/components.rb:178:in `set_session_options_with_components' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:116:in `process_with_session_management_support' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in `dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:150:in `process_request' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:54:in `process!' /usr/lib/ruby/site_ruby/1.8/fcgi.rb:600:in `each_cgi' /usr/lib/ruby/site_ruby/1.8/fcgi.rb:117:in `session' /usr/lib/ruby/site_ruby/1.8/fcgi.rb:104:in `each_request' /usr/lib/ruby/site_ruby/1.8/fcgi.rb:36:in `each' /usr/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:53:in `process!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:23:in `process!' /rails/test1/public/dispatch.fcgi:25

05/24/06 17:43:21 changed by darashi@gmail.com

  • status changed from reopened to closed.
  • resolution set to fixed.

I reproduced the problem with rails 1.1.2, but now it seems to be fixed on edge rails(R4365).