From 20e305950e9fb53e1b1cb338f9b04b1be43fd7bb Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 17 Jul 1998 00:53:50 +0000 Subject: substr() taint git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/cgi-lib.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/cgi-lib.rb') diff --git a/lib/cgi-lib.rb b/lib/cgi-lib.rb index c6c1caa98b..7033f0f8c1 100644 --- a/lib/cgi-lib.rb +++ b/lib/cgi-lib.rb @@ -53,18 +53,16 @@ class CGI < SimpleDelegator when "GET" # exception messages should be printed to stdout. STDERR.reopen(STDOUT) - ENV['QUERY_STRING'] or "" when "POST" # exception messages should be printed to stdout. STDERR.reopen(STDOUT) - - input.read ENV['CONTENT_LENGTH'].to_i + input.read Integer(ENV['CONTENT_LENGTH']) else read_from_cmdline end.split(/&/).each do |x| key, val = x.split(/=/,2).collect{|x|unescape(x)} - if @inputs.include?('key') + if @inputs.include?(key) @inputs[key] += "\0" + (val or "") else @inputs[key] = (val or "") -- cgit v1.2.3