1
0
Fork 0
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:
xibbar 2008-09-28 13:54:28 +00:00
parent f2aabd1802
commit 5958f6af19
2 changed files with 8 additions and 1 deletions

View file

@ -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.

View file

@ -337,8 +337,10 @@ class CGI
params = {}
query.split(/[&;]/).each do |pairs|
key, value = pairs.split('=',2).collect{|v| CGI::unescape(v) }
if key && value
params.has_key?(key) ? params[key].push(value) : params[key] = [value]
end
end
params.default=[].freeze
params
end