cgi 0.3.7-java → 0.4.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cgi might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/cgi/cookie.rb +2 -3
- data/lib/cgi/escape.jar +0 -0
- data/lib/cgi/session.rb +1 -1
- data/lib/cgi/util.rb +10 -7
- data/lib/cgi.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 221b8ab214c47d37a5507712a9bdcc440b5d2fc07444e4ea22dfa903a706fdb9
|
4
|
+
data.tar.gz: 6e18d8445983f18b91757392d7ec5ae836426e9af343de0ab8bc5791609d47a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 693945d6fbd45ca538158c90d76d3e6dc3941ad5049909db745c95ed87b0ec499294ecc13bed13581353258fc49c607aa9008407cb6f70e01b73f1dd3b525d9b
|
7
|
+
data.tar.gz: d1f9dd7a8df8fec94fbef1824bd0bdf07e0a66d2f0cd4aac6a9a112b4f601a1731467a86c17d6c09a2f96ee8ce86462b71e5e2ec6a10fed04bef87dd59d25ea3
|
data/lib/cgi/cookie.rb
CHANGED
@@ -190,10 +190,9 @@ class CGI
|
|
190
190
|
values ||= ""
|
191
191
|
values = values.split('&').collect{|v| CGI.unescape(v,@@accept_charset) }
|
192
192
|
if cookies.has_key?(name)
|
193
|
-
cookies[name].
|
194
|
-
else
|
195
|
-
cookies[name] = Cookie.new(name, *values)
|
193
|
+
values = cookies[name].value + values
|
196
194
|
end
|
195
|
+
cookies[name] = Cookie.new(name, *values)
|
197
196
|
end
|
198
197
|
|
199
198
|
cookies
|
data/lib/cgi/escape.jar
CHANGED
Binary file
|
data/lib/cgi/session.rb
CHANGED
@@ -279,7 +279,7 @@ class CGI
|
|
279
279
|
# fields are surrounded by a <fieldset> tag in HTML 4 generation, which
|
280
280
|
# is _not_ invisible on many browsers; you may wish to disable the
|
281
281
|
# use of fieldsets with code similar to the following
|
282
|
-
# (see
|
282
|
+
# (see https://blade.ruby-lang.org/ruby-list/37805)
|
283
283
|
#
|
284
284
|
# cgi = CGI.new("html4")
|
285
285
|
# class << cgi
|
data/lib/cgi/util.rb
CHANGED
@@ -36,7 +36,7 @@ module CGI::Util
|
|
36
36
|
|
37
37
|
# URL-encode a string following RFC 3986
|
38
38
|
# Space characters (+" "+) are encoded with (+"%20"+)
|
39
|
-
# url_encoded_string = CGI.
|
39
|
+
# url_encoded_string = CGI.escapeURIComponent("'Stop!' said Fred")
|
40
40
|
# # => "%27Stop%21%27%20said%20Fred"
|
41
41
|
def escapeURIComponent(string)
|
42
42
|
encoding = string.encoding
|
@@ -48,7 +48,7 @@ module CGI::Util
|
|
48
48
|
end
|
49
49
|
|
50
50
|
# URL-decode a string following RFC 3986 with encoding(optional).
|
51
|
-
# string = CGI.
|
51
|
+
# string = CGI.unescapeURIComponent("%27Stop%21%27+said%20Fred")
|
52
52
|
# # => "'Stop!'+said Fred"
|
53
53
|
def unescapeURIComponent(string, encoding = @@accept_charset)
|
54
54
|
str = string.b
|
@@ -90,9 +90,12 @@ module CGI::Util
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
|
-
|
94
|
-
|
95
|
-
|
93
|
+
# TruffleRuby runs the pure-Ruby variant faster, do not use the C extension there
|
94
|
+
unless RUBY_ENGINE == 'truffleruby'
|
95
|
+
begin
|
96
|
+
require 'cgi/escape'
|
97
|
+
rescue LoadError
|
98
|
+
end
|
96
99
|
end
|
97
100
|
|
98
101
|
# Unescape a string that has been HTML-escaped
|
@@ -178,7 +181,7 @@ module CGI::Util
|
|
178
181
|
def escapeElement(string, *elements)
|
179
182
|
elements = elements[0] if elements[0].kind_of?(Array)
|
180
183
|
unless elements.empty?
|
181
|
-
string.gsub(/<\/?(?:#{elements.join("|")})
|
184
|
+
string.gsub(/<\/?(?:#{elements.join("|")})(?!\w)(?:.|\n)*?>/i) do
|
182
185
|
CGI.escapeHTML($&)
|
183
186
|
end
|
184
187
|
else
|
@@ -198,7 +201,7 @@ module CGI::Util
|
|
198
201
|
def unescapeElement(string, *elements)
|
199
202
|
elements = elements[0] if elements[0].kind_of?(Array)
|
200
203
|
unless elements.empty?
|
201
|
-
string.gsub(/<\/?(?:#{elements.join("|")})
|
204
|
+
string.gsub(/<\/?(?:#{elements.join("|")})(?!\w)(?:.|\n)*?>/i) do
|
202
205
|
unescapeHTML($&)
|
203
206
|
end
|
204
207
|
else
|
data/lib/cgi.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cgi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Yukihiro Matsumoto
|
8
|
+
autorequire:
|
8
9
|
bindir: bin
|
9
10
|
cert_chain: []
|
10
|
-
date:
|
11
|
+
date: 2023-11-07 00:00:00.000000000 Z
|
11
12
|
dependencies: []
|
12
13
|
description: Support for the Common Gateway Interface protocol.
|
13
14
|
email:
|
@@ -34,6 +35,7 @@ licenses:
|
|
34
35
|
metadata:
|
35
36
|
homepage_uri: https://github.com/ruby/cgi
|
36
37
|
source_code_uri: https://github.com/ruby/cgi
|
38
|
+
post_install_message:
|
37
39
|
rdoc_options: []
|
38
40
|
require_paths:
|
39
41
|
- lib
|
@@ -49,7 +51,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
49
51
|
- !ruby/object:Gem::Version
|
50
52
|
version: '0'
|
51
53
|
requirements: []
|
52
|
-
rubygems_version: 3.
|
54
|
+
rubygems_version: 3.3.26
|
55
|
+
signing_key:
|
53
56
|
specification_version: 4
|
54
57
|
summary: Support for the Common Gateway Interface protocol.
|
55
58
|
test_files: []
|