cgi 0.1.1 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of cgi might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +22 -0
- data/Rakefile +7 -0
- data/cgi.gemspec +16 -10
- data/ext/cgi/escape/escape.c +4 -2
- data/lib/cgi/cookie.rb +4 -10
- data/lib/cgi/core.rb +10 -9
- data/lib/cgi/html.rb +3 -3
- data/lib/cgi/session/pstore.rb +0 -1
- data/lib/cgi/session.rb +2 -2
- data/lib/cgi/util.rb +28 -32
- data/lib/cgi.rb +2 -1
- metadata +6 -6
- data/.travis.yml +0 -7
- data/lib/cgi/version.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90a6a863562fc49b43b4b3363838cfc00cd4080df4fa1a4939e505d651115ad2
|
4
|
+
data.tar.gz: 5eeb77d5c5e4a42c8683e6953174483d4c5d7c5c9a61dc78590df100a716985f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc300664978f5278e2e366c85acf2ec7929505369c7abaa0ef3d0658e5de556d3eb1c8e66d497c6f8b88efeabcfa57c2871bfbd325dd1e1b72fdcc4edf03defd
|
7
|
+
data.tar.gz: 7f82863adb49bd898c376d16a5d8ade52c0ada8d5994a22a858e7b47f467a69c755f22d8f691fcc891df222b176d472c167ac3e4b6896b104353fb04da867a56
|
@@ -0,0 +1,22 @@
|
|
1
|
+
name: test
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
name: build (${{ matrix.ruby }} / ${{ matrix.os }})
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
ruby: [ '3.0', 2.7, 2.6, 2.5, head ]
|
11
|
+
os: [ ubuntu-latest, macos-latest ]
|
12
|
+
runs-on: ${{ matrix.os }}
|
13
|
+
steps:
|
14
|
+
- uses: actions/checkout@v2
|
15
|
+
- name: Set up Ruby
|
16
|
+
uses: ruby/setup-ruby@v1
|
17
|
+
with:
|
18
|
+
ruby-version: ${{ matrix.ruby }}
|
19
|
+
- name: Install dependencies
|
20
|
+
run: bundle install
|
21
|
+
- name: Run test
|
22
|
+
run: rake test
|
data/Rakefile
CHANGED
@@ -10,4 +10,11 @@ end
|
|
10
10
|
require 'rake/extensiontask'
|
11
11
|
Rake::ExtensionTask.new("cgi/escape")
|
12
12
|
|
13
|
+
task :sync_tool do
|
14
|
+
require 'fileutils'
|
15
|
+
FileUtils.cp "../ruby/tool/lib/core_assertions.rb", "./test/lib"
|
16
|
+
FileUtils.cp "../ruby/tool/lib/envutil.rb", "./test/lib"
|
17
|
+
FileUtils.cp "../ruby/tool/lib/find_executable.rb", "./test/lib"
|
18
|
+
end
|
19
|
+
|
13
20
|
task :default => :test
|
data/cgi.gemspec
CHANGED
@@ -1,25 +1,31 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
name = File.basename(__FILE__, ".gemspec")
|
4
|
+
version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir|
|
5
|
+
break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
|
6
|
+
/^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
|
7
|
+
end rescue nil
|
8
|
+
end
|
4
9
|
|
5
10
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name =
|
7
|
-
spec.version =
|
8
|
-
spec.authors = ["
|
9
|
-
spec.email = ["
|
11
|
+
spec.name = name
|
12
|
+
spec.version = version
|
13
|
+
spec.authors = ["Yukihiro Matsumoto"]
|
14
|
+
spec.email = ["matz@ruby-lang.org"]
|
10
15
|
|
11
16
|
spec.summary = %q{Support for the Common Gateway Interface protocol.}
|
12
17
|
spec.description = %q{Support for the Common Gateway Interface protocol.}
|
13
18
|
spec.homepage = "https://github.com/ruby/cgi"
|
19
|
+
spec.licenses = ["Ruby", "BSD-2-Clause"]
|
20
|
+
spec.required_ruby_version = ">= 2.5.0"
|
14
21
|
|
15
22
|
spec.metadata["homepage_uri"] = spec.homepage
|
16
23
|
spec.metadata["source_code_uri"] = spec.homepage
|
17
24
|
|
18
25
|
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
19
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
+
`git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
27
|
end
|
21
28
|
spec.bindir = "exe"
|
22
|
-
spec.executables =
|
29
|
+
spec.executables = []
|
23
30
|
spec.require_paths = ["lib"]
|
24
|
-
spec.license = "BSD-2-Clause"
|
25
31
|
end
|
data/ext/cgi/escape/escape.c
CHANGED
@@ -30,8 +30,6 @@ static inline void
|
|
30
30
|
preserve_original_state(VALUE orig, VALUE dest)
|
31
31
|
{
|
32
32
|
rb_enc_associate(dest, rb_enc_get(orig));
|
33
|
-
|
34
|
-
RB_OBJ_INFECT_RAW(dest, orig);
|
35
33
|
}
|
36
34
|
|
37
35
|
static VALUE
|
@@ -391,6 +389,10 @@ cgiesc_unescape(int argc, VALUE *argv, VALUE self)
|
|
391
389
|
void
|
392
390
|
Init_escape(void)
|
393
391
|
{
|
392
|
+
#ifdef HAVE_RB_EXT_RACTOR_SAFE
|
393
|
+
rb_ext_ractor_safe(true);
|
394
|
+
#endif
|
395
|
+
|
394
396
|
id_accept_charset = rb_intern_const("@@accept_charset");
|
395
397
|
InitVM(escape);
|
396
398
|
}
|
data/lib/cgi/cookie.rb
CHANGED
@@ -57,7 +57,7 @@ class CGI
|
|
57
57
|
#
|
58
58
|
# name:: the name of the cookie. Required.
|
59
59
|
# value:: the cookie's value or list of values.
|
60
|
-
# path:: the path for which this cookie applies. Defaults to
|
60
|
+
# path:: the path for which this cookie applies. Defaults to
|
61
61
|
# the value of the +SCRIPT_NAME+ environment variable.
|
62
62
|
# domain:: the domain for which this cookie applies.
|
63
63
|
# expires:: the time at which this cookie expires, as a +Time+ object.
|
@@ -73,8 +73,7 @@ class CGI
|
|
73
73
|
@expires = nil
|
74
74
|
if name.kind_of?(String)
|
75
75
|
@name = name
|
76
|
-
%r
|
77
|
-
@path = ($1 or "")
|
76
|
+
@path = (%r|\A(.*/)| =~ ENV["SCRIPT_NAME"] ? $1 : "")
|
78
77
|
@secure = false
|
79
78
|
@httponly = false
|
80
79
|
return super(value)
|
@@ -88,12 +87,7 @@ class CGI
|
|
88
87
|
@name = options["name"]
|
89
88
|
value = Array(options["value"])
|
90
89
|
# simple support for IE
|
91
|
-
|
92
|
-
@path = options["path"]
|
93
|
-
else
|
94
|
-
%r|^(.*/)|.match(ENV["SCRIPT_NAME"])
|
95
|
-
@path = ($1 or "")
|
96
|
-
end
|
90
|
+
@path = options["path"] || (%r|\A(.*/)| =~ ENV["SCRIPT_NAME"] ? $1 : "")
|
97
91
|
@domain = options["domain"]
|
98
92
|
@expires = options["expires"]
|
99
93
|
@secure = options["secure"] == true
|
@@ -146,7 +140,7 @@ class CGI
|
|
146
140
|
buf = "#{@name}=#{val}".dup
|
147
141
|
buf << "; domain=#{@domain}" if @domain
|
148
142
|
buf << "; path=#{@path}" if @path
|
149
|
-
buf << "; expires=#{CGI
|
143
|
+
buf << "; expires=#{CGI.rfc1123_date(@expires)}" if @expires
|
150
144
|
buf << "; secure" if @secure
|
151
145
|
buf << "; HttpOnly" if @httponly
|
152
146
|
buf
|
data/lib/cgi/core.rb
CHANGED
@@ -261,7 +261,7 @@ class CGI
|
|
261
261
|
private :_header_for_hash
|
262
262
|
|
263
263
|
def nph? #:nodoc:
|
264
|
-
return /IIS\/(\d+)
|
264
|
+
return /IIS\/(\d+)/ =~ $CGI_ENV['SERVER_SOFTWARE'] && $1.to_i < 5
|
265
265
|
end
|
266
266
|
|
267
267
|
def _header_for_modruby(buf) #:nodoc:
|
@@ -375,14 +375,14 @@ class CGI
|
|
375
375
|
|
376
376
|
# Parse an HTTP query string into a hash of key=>value pairs.
|
377
377
|
#
|
378
|
-
# params = CGI
|
378
|
+
# params = CGI.parse("query_string")
|
379
379
|
# # {"name1" => ["value1", "value2", ...],
|
380
380
|
# # "name2" => ["value1", "value2", ...], ... }
|
381
381
|
#
|
382
|
-
def
|
382
|
+
def self.parse(query)
|
383
383
|
params = {}
|
384
384
|
query.split(/[&;]/).each do |pairs|
|
385
|
-
key, value = pairs.split('=',2).collect{|v| CGI
|
385
|
+
key, value = pairs.split('=',2).collect{|v| CGI.unescape(v) }
|
386
386
|
|
387
387
|
next unless key
|
388
388
|
|
@@ -544,11 +544,11 @@ class CGI
|
|
544
544
|
/Content-Disposition:.* filename=(?:"(.*?)"|([^;\r\n]*))/i.match(head)
|
545
545
|
filename = $1 || $2 || ''.dup
|
546
546
|
filename = CGI.unescape(filename) if unescape_filename?()
|
547
|
-
body.instance_variable_set(:@original_filename, filename
|
547
|
+
body.instance_variable_set(:@original_filename, filename)
|
548
548
|
## content type
|
549
549
|
/Content-Type: (.*)/i.match(head)
|
550
550
|
(content_type = $1 || ''.dup).chomp!
|
551
|
-
body.instance_variable_set(:@content_type, content_type
|
551
|
+
body.instance_variable_set(:@content_type, content_type)
|
552
552
|
## query parameter name
|
553
553
|
/Content-Disposition:.* name=(?:"(.*?)"|([^;\r\n]*))/i.match(head)
|
554
554
|
name = $1 || $2 || ''
|
@@ -607,6 +607,7 @@ class CGI
|
|
607
607
|
end
|
608
608
|
def unescape_filename? #:nodoc:
|
609
609
|
user_agent = $CGI_ENV['HTTP_USER_AGENT']
|
610
|
+
return false unless user_agent
|
610
611
|
return /Mac/i.match(user_agent) && /Mozilla/i.match(user_agent) && !/MSIE/i.match(user_agent)
|
611
612
|
end
|
612
613
|
|
@@ -648,7 +649,7 @@ class CGI
|
|
648
649
|
# Reads query parameters in the @params field, and cookies into @cookies.
|
649
650
|
def initialize_query()
|
650
651
|
if ("POST" == env_table['REQUEST_METHOD']) and
|
651
|
-
%r|\Amultipart/form-data.*boundary=\"?([^\";,]+)\"
|
652
|
+
%r|\Amultipart/form-data.*boundary=\"?([^\";,]+)\"?| =~ env_table['CONTENT_TYPE']
|
652
653
|
current_max_multipart_length = @max_multipart_length.respond_to?(:call) ? @max_multipart_length.call : @max_multipart_length
|
653
654
|
raise StandardError.new("too large multipart data.") if env_table['CONTENT_LENGTH'].to_i > current_max_multipart_length
|
654
655
|
boundary = $1.dup
|
@@ -656,7 +657,7 @@ class CGI
|
|
656
657
|
@params = read_multipart(boundary, Integer(env_table['CONTENT_LENGTH']))
|
657
658
|
else
|
658
659
|
@multipart = false
|
659
|
-
@params = CGI
|
660
|
+
@params = CGI.parse(
|
660
661
|
case env_table['REQUEST_METHOD']
|
661
662
|
when "GET", "HEAD"
|
662
663
|
if defined?(MOD_RUBY)
|
@@ -686,7 +687,7 @@ class CGI
|
|
686
687
|
end
|
687
688
|
end
|
688
689
|
|
689
|
-
@cookies = CGI::Cookie
|
690
|
+
@cookies = CGI::Cookie.parse((env_table['HTTP_COOKIE'] or env_table['COOKIE']))
|
690
691
|
end
|
691
692
|
private :initialize_query
|
692
693
|
|
data/lib/cgi/html.rb
CHANGED
@@ -30,10 +30,10 @@ class CGI
|
|
30
30
|
attributes.each do|name, value|
|
31
31
|
next unless value
|
32
32
|
s << " "
|
33
|
-
s << CGI
|
33
|
+
s << CGI.escapeHTML(name.to_s)
|
34
34
|
if value != true
|
35
35
|
s << '="'
|
36
|
-
s << CGI
|
36
|
+
s << CGI.escapeHTML(value.to_s)
|
37
37
|
s << '"'
|
38
38
|
end
|
39
39
|
end
|
@@ -423,7 +423,7 @@ class CGI
|
|
423
423
|
buf << super(attributes)
|
424
424
|
|
425
425
|
if pretty
|
426
|
-
CGI
|
426
|
+
CGI.pretty(buf, pretty)
|
427
427
|
else
|
428
428
|
buf
|
429
429
|
end
|
data/lib/cgi/session/pstore.rb
CHANGED
data/lib/cgi/session.rb
CHANGED
@@ -403,7 +403,7 @@ class CGI
|
|
403
403
|
for line in f
|
404
404
|
line.chomp!
|
405
405
|
k, v = line.split('=',2)
|
406
|
-
@hash[CGI
|
406
|
+
@hash[CGI.unescape(k)] = Marshal.restore(CGI.unescape(v))
|
407
407
|
end
|
408
408
|
ensure
|
409
409
|
f&.close
|
@@ -421,7 +421,7 @@ class CGI
|
|
421
421
|
lockf.flock File::LOCK_EX
|
422
422
|
f = File.open(@path+".new", File::CREAT|File::TRUNC|File::WRONLY, 0600)
|
423
423
|
for k,v in @hash
|
424
|
-
f.printf "%s=%s\n", CGI
|
424
|
+
f.printf "%s=%s\n", CGI.escape(k), CGI.escape(String(Marshal.dump(v)))
|
425
425
|
end
|
426
426
|
f.close
|
427
427
|
File.rename @path+".new", @path
|
data/lib/cgi/util.rb
CHANGED
@@ -7,7 +7,7 @@ end
|
|
7
7
|
module CGI::Util
|
8
8
|
@@accept_charset="UTF-8" unless defined?(@@accept_charset)
|
9
9
|
# URL-encode a string.
|
10
|
-
# url_encoded_string = CGI
|
10
|
+
# url_encoded_string = CGI.escape("'Stop!' said Fred")
|
11
11
|
# # => "%27Stop%21%27+said+Fred"
|
12
12
|
def escape(string)
|
13
13
|
encoding = string.encoding
|
@@ -17,7 +17,7 @@ module CGI::Util
|
|
17
17
|
end
|
18
18
|
|
19
19
|
# URL-decode a string with encoding(optional).
|
20
|
-
# string = CGI
|
20
|
+
# string = CGI.unescape("%27Stop%21%27+said+Fred")
|
21
21
|
# # => "'Stop!' said Fred"
|
22
22
|
def unescape(string,encoding=@@accept_charset)
|
23
23
|
str=string.tr('+', ' ').b.gsub(/((?:%[0-9a-fA-F]{2})+)/) do |m|
|
@@ -36,7 +36,7 @@ module CGI::Util
|
|
36
36
|
}
|
37
37
|
|
38
38
|
# Escape special characters in HTML, namely '&\"<>
|
39
|
-
# CGI
|
39
|
+
# CGI.escapeHTML('Usage: foo "bar" <baz>')
|
40
40
|
# # => "Usage: foo "bar" <baz>"
|
41
41
|
def escapeHTML(string)
|
42
42
|
enc = string.encoding
|
@@ -49,9 +49,12 @@ module CGI::Util
|
|
49
49
|
table = Hash[TABLE_FOR_ESCAPE_HTML__.map {|pair|pair.map {|s|s.encode(enc)}}]
|
50
50
|
string = string.gsub(/#{"['&\"<>]".encode(enc)}/, table)
|
51
51
|
string.encode!(origenc) if origenc
|
52
|
-
|
52
|
+
string
|
53
|
+
else
|
54
|
+
string = string.b
|
55
|
+
string.gsub!(/['&\"<>]/, TABLE_FOR_ESCAPE_HTML__)
|
56
|
+
string.force_encoding(enc)
|
53
57
|
end
|
54
|
-
string.gsub(/['&\"<>]/, TABLE_FOR_ESCAPE_HTML__)
|
55
58
|
end
|
56
59
|
|
57
60
|
begin
|
@@ -60,7 +63,7 @@ module CGI::Util
|
|
60
63
|
end
|
61
64
|
|
62
65
|
# Unescape a string that has been HTML-escaped
|
63
|
-
# CGI
|
66
|
+
# CGI.unescapeHTML("Usage: foo "bar" <baz>")
|
64
67
|
# # => "Usage: foo \"bar\" <baz>"
|
65
68
|
def unescapeHTML(string)
|
66
69
|
enc = string.encoding
|
@@ -90,7 +93,8 @@ module CGI::Util
|
|
90
93
|
when Encoding::ISO_8859_1; 256
|
91
94
|
else 128
|
92
95
|
end
|
93
|
-
string.
|
96
|
+
string = string.b
|
97
|
+
string.gsub!(/&(apos|amp|quot|gt|lt|\#[0-9]+|\#[xX][0-9A-Fa-f]+);/) do
|
94
98
|
match = $1.dup
|
95
99
|
case match
|
96
100
|
when 'apos' then "'"
|
@@ -116,12 +120,13 @@ module CGI::Util
|
|
116
120
|
"&#{match};"
|
117
121
|
end
|
118
122
|
end
|
123
|
+
string.force_encoding enc
|
119
124
|
end
|
120
125
|
|
121
|
-
# Synonym for CGI
|
126
|
+
# Synonym for CGI.escapeHTML(str)
|
122
127
|
alias escape_html escapeHTML
|
123
128
|
|
124
|
-
# Synonym for CGI
|
129
|
+
# Synonym for CGI.unescapeHTML(str)
|
125
130
|
alias unescape_html unescapeHTML
|
126
131
|
|
127
132
|
# Escape only the tags of certain HTML elements in +string+.
|
@@ -132,30 +137,30 @@ module CGI::Util
|
|
132
137
|
# The attribute list of the open tag will also be escaped (for
|
133
138
|
# instance, the double-quotes surrounding attribute values).
|
134
139
|
#
|
135
|
-
# print CGI
|
140
|
+
# print CGI.escapeElement('<BR><A HREF="url"></A>', "A", "IMG")
|
136
141
|
# # "<BR><A HREF="url"></A>"
|
137
142
|
#
|
138
|
-
# print CGI
|
143
|
+
# print CGI.escapeElement('<BR><A HREF="url"></A>', ["A", "IMG"])
|
139
144
|
# # "<BR><A HREF="url"></A>"
|
140
145
|
def escapeElement(string, *elements)
|
141
146
|
elements = elements[0] if elements[0].kind_of?(Array)
|
142
147
|
unless elements.empty?
|
143
148
|
string.gsub(/<\/?(?:#{elements.join("|")})(?!\w)(?:.|\n)*?>/i) do
|
144
|
-
CGI
|
149
|
+
CGI.escapeHTML($&)
|
145
150
|
end
|
146
151
|
else
|
147
152
|
string
|
148
153
|
end
|
149
154
|
end
|
150
155
|
|
151
|
-
# Undo escaping such as that done by CGI
|
156
|
+
# Undo escaping such as that done by CGI.escapeElement()
|
152
157
|
#
|
153
|
-
# print CGI
|
154
|
-
# CGI
|
158
|
+
# print CGI.unescapeElement(
|
159
|
+
# CGI.escapeHTML('<BR><A HREF="url"></A>'), "A", "IMG")
|
155
160
|
# # "<BR><A HREF="url"></A>"
|
156
161
|
#
|
157
|
-
# print CGI
|
158
|
-
# CGI
|
162
|
+
# print CGI.unescapeElement(
|
163
|
+
# CGI.escapeHTML('<BR><A HREF="url"></A>'), ["A", "IMG"])
|
159
164
|
# # "<BR><A HREF="url"></A>"
|
160
165
|
def unescapeElement(string, *elements)
|
161
166
|
elements = elements[0] if elements[0].kind_of?(Array)
|
@@ -168,27 +173,18 @@ module CGI::Util
|
|
168
173
|
end
|
169
174
|
end
|
170
175
|
|
171
|
-
# Synonym for CGI
|
176
|
+
# Synonym for CGI.escapeElement(str)
|
172
177
|
alias escape_element escapeElement
|
173
178
|
|
174
|
-
# Synonym for CGI
|
179
|
+
# Synonym for CGI.unescapeElement(str)
|
175
180
|
alias unescape_element unescapeElement
|
176
181
|
|
177
|
-
# Abbreviated day-of-week names specified by RFC 822
|
178
|
-
RFC822_DAYS = %w[ Sun Mon Tue Wed Thu Fri Sat ]
|
179
|
-
|
180
|
-
# Abbreviated month names specified by RFC 822
|
181
|
-
RFC822_MONTHS = %w[ Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ]
|
182
|
-
|
183
182
|
# Format a +Time+ object as a String using the format specified by RFC 1123.
|
184
183
|
#
|
185
|
-
# CGI
|
184
|
+
# CGI.rfc1123_date(Time.now)
|
186
185
|
# # Sat, 01 Jan 2000 00:00:00 GMT
|
187
186
|
def rfc1123_date(time)
|
188
|
-
|
189
|
-
return format("%s, %.2d %s %.4d %.2d:%.2d:%.2d GMT",
|
190
|
-
RFC822_DAYS[t.wday], t.day, RFC822_MONTHS[t.month-1], t.year,
|
191
|
-
t.hour, t.min, t.sec)
|
187
|
+
time.getgm.strftime("%a, %d %b %Y %T GMT")
|
192
188
|
end
|
193
189
|
|
194
190
|
# Prettify (indent) an HTML string.
|
@@ -196,13 +192,13 @@ module CGI::Util
|
|
196
192
|
# +string+ is the HTML string to indent. +shift+ is the indentation
|
197
193
|
# unit to use; it defaults to two spaces.
|
198
194
|
#
|
199
|
-
# print CGI
|
195
|
+
# print CGI.pretty("<HTML><BODY></BODY></HTML>")
|
200
196
|
# # <HTML>
|
201
197
|
# # <BODY>
|
202
198
|
# # </BODY>
|
203
199
|
# # </HTML>
|
204
200
|
#
|
205
|
-
# print CGI
|
201
|
+
# print CGI.pretty("<HTML><BODY></BODY></HTML>", "\t")
|
206
202
|
# # <HTML>
|
207
203
|
# # <BODY>
|
208
204
|
# # </BODY>
|
data/lib/cgi.rb
CHANGED
@@ -253,7 +253,7 @@
|
|
253
253
|
# end
|
254
254
|
# end +
|
255
255
|
# cgi.pre do
|
256
|
-
# CGI
|
256
|
+
# CGI.escapeHTML(
|
257
257
|
# "params: #{cgi.params.inspect}\n" +
|
258
258
|
# "cookies: #{cgi.cookies.inspect}\n" +
|
259
259
|
# ENV.collect do |key, value|
|
@@ -288,6 +288,7 @@
|
|
288
288
|
#
|
289
289
|
|
290
290
|
class CGI
|
291
|
+
VERSION = "0.3.1"
|
291
292
|
end
|
292
293
|
|
293
294
|
require 'cgi/core'
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cgi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Yukihiro Matsumoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
@@ -12,13 +12,13 @@ date: 2021-11-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
13
13
|
description: Support for the Common Gateway Interface protocol.
|
14
14
|
email:
|
15
|
-
-
|
15
|
+
- matz@ruby-lang.org
|
16
16
|
executables: []
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
+
- ".github/workflows/test.yml"
|
20
21
|
- ".gitignore"
|
21
|
-
- ".travis.yml"
|
22
22
|
- Gemfile
|
23
23
|
- LICENSE.txt
|
24
24
|
- README.md
|
@@ -36,9 +36,9 @@ files:
|
|
36
36
|
- lib/cgi/session.rb
|
37
37
|
- lib/cgi/session/pstore.rb
|
38
38
|
- lib/cgi/util.rb
|
39
|
-
- lib/cgi/version.rb
|
40
39
|
homepage: https://github.com/ruby/cgi
|
41
40
|
licenses:
|
41
|
+
- Ruby
|
42
42
|
- BSD-2-Clause
|
43
43
|
metadata:
|
44
44
|
homepage_uri: https://github.com/ruby/cgi
|
@@ -51,7 +51,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 2.5.0
|
55
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
57
|
- - ">="
|
data/.travis.yml
DELETED
data/lib/cgi/version.rb
DELETED