summaryrefslogtreecommitdiff
path: root/test/cgi/test_cgi_cookie.rb
diff options
context:
space:
mode:
authorNAKAMURA Usaku <usa@ruby-lang.org>2021-11-24 20:21:17 +0900
committerNAKAMURA Usaku <usa@ruby-lang.org>2021-11-24 20:21:17 +0900
commitf69aeb83146be640995753667fdd6c6f157527f5 (patch)
treec1c61407f77b0f3ef859d3d46b77bdb5e361a549 /test/cgi/test_cgi_cookie.rb
parentb1985629565c3c54b1a64d6faf213e8144857515 (diff)
merge some parts of CGI 0.1.1v2_7_5
Fix integer overflow Make use of the check in rb_alloc_tmp_buffer2. When parsing cookies, only decode the values Bump version
Diffstat (limited to 'test/cgi/test_cgi_cookie.rb')
-rw-r--r--test/cgi/test_cgi_cookie.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/cgi/test_cgi_cookie.rb b/test/cgi/test_cgi_cookie.rb
index 115a57e4a1..985cc0d7a1 100644
--- a/test/cgi/test_cgi_cookie.rb
+++ b/test/cgi/test_cgi_cookie.rb
@@ -101,6 +101,11 @@ class CGICookieTest < Test::Unit::TestCase
end
end
+ def test_cgi_cookie_parse_not_decode_name
+ cookie_str = "%66oo=baz;foo=bar"
+ cookies = CGI::Cookie.parse(cookie_str)
+ assert_equal({"%66oo" => ["baz"], "foo" => ["bar"]}, cookies)
+ end
def test_cgi_cookie_arrayinterface
cookie = CGI::Cookie.new('name1', 'a', 'b', 'c')