mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/cgi/core.rb (CGI::parse): ignore illegal query params.
[ruby-dev:36618] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f2aabd1802
commit
5958f6af19
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Sep 28 22:44:26 2008 Takeyuki Fujioka <xibbar@ruby-lang.org>
|
||||
|
||||
* lib/cgi/core.rb (CGI::parse): ignore illegal query params.
|
||||
[ruby-dev:36618]
|
||||
|
||||
Sun Sep 28 22:05:07 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* compile.c (iseq_set_sequence): check duplicated when clause.
|
||||
|
|
|
@ -337,7 +337,9 @@ class CGI
|
|||
params = {}
|
||||
query.split(/[&;]/).each do |pairs|
|
||||
key, value = pairs.split('=',2).collect{|v| CGI::unescape(v) }
|
||||
params.has_key?(key) ? params[key].push(value) : params[key] = [value]
|
||||
if key && value
|
||||
params.has_key?(key) ? params[key].push(value) : params[key] = [value]
|
||||
end
|
||||
end
|
||||
params.default=[].freeze
|
||||
params
|
||||
|
|
Loading…
Reference in a new issue