cgi_multipart_eof_fix 2.2 → 2.3
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.
- data/CHANGELOG +5 -4
- data/LICENSE +55 -0
- data/Manifest +3 -5
- data/README +3 -3
- data/cgi_multipart_eof_fix.gemspec +48 -0
- data/lib/cgi_multipart_eof_fix.rb +8 -4
- data/test/cgi_multipart_eof_fix_test.rb +48 -20
- metadata +9 -10
- data/AFL3-LICENSE +0 -184
- data/RUBY-LICENSE +0 -58
- data/Rakefile +0 -27
data/CHANGELOG
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
|
2
|
-
v2.
|
2
|
+
v2.3. Use STDERR, not $stderr, just like Mongrel; tests now use Test::Unit; moving to the mongrel project on RubyForge.
|
3
3
|
|
4
|
-
v2.
|
4
|
+
v2.2. Don't load on Ruby > 1.8.5; copyright correction.
|
5
5
|
|
6
|
-
v2.
|
6
|
+
v2.1. License change due to no provision for use in original Ruby license (prevents installation in Florida).
|
7
7
|
|
8
|
-
|
8
|
+
v2.0. Updated for second cgi.rb vulnerability.
|
9
9
|
|
10
|
+
v1.0.0. Original single-patch release by Zed Shaw, et. al.
|
data/LICENSE
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
Mongrel Web Server (Mongrel) is copyrighted free software by Zed A. Shaw
|
2
|
+
<zedshaw at zedshaw dot com> You can redistribute it and/or modify it under
|
3
|
+
either the terms of the GPL or the conditions below:
|
4
|
+
|
5
|
+
1. You may make and give away verbatim copies of the source form of the
|
6
|
+
software without restriction, provided that you duplicate all of the
|
7
|
+
original copyright notices and associated disclaimers.
|
8
|
+
|
9
|
+
2. You may modify your copy of the software in any way, provided that
|
10
|
+
you do at least ONE of the following:
|
11
|
+
|
12
|
+
a) place your modifications in the Public Domain or otherwise make them
|
13
|
+
Freely Available, such as by posting said modifications to Usenet or an
|
14
|
+
equivalent medium, or by allowing the author to include your
|
15
|
+
modifications in the software.
|
16
|
+
|
17
|
+
b) use the modified software only within your corporation or
|
18
|
+
organization.
|
19
|
+
|
20
|
+
c) rename any non-standard executables so the names do not conflict with
|
21
|
+
standard executables, which must also be provided.
|
22
|
+
|
23
|
+
d) make other distribution arrangements with the author.
|
24
|
+
|
25
|
+
3. You may distribute the software in object code or executable
|
26
|
+
form, provided that you do at least ONE of the following:
|
27
|
+
|
28
|
+
a) distribute the executables and library files of the software,
|
29
|
+
together with instructions (in the manual page or equivalent) on where
|
30
|
+
to get the original distribution.
|
31
|
+
|
32
|
+
b) accompany the distribution with the machine-readable source of the
|
33
|
+
software.
|
34
|
+
|
35
|
+
c) give non-standard executables non-standard names, with
|
36
|
+
instructions on where to get the original software distribution.
|
37
|
+
|
38
|
+
d) make other distribution arrangements with the author.
|
39
|
+
|
40
|
+
4. You may modify and include the part of the software into any other
|
41
|
+
software (possibly commercial). But some files in the distribution
|
42
|
+
are not written by the author, so that they are not under this terms.
|
43
|
+
|
44
|
+
5. The scripts and library files supplied as input to or produced as
|
45
|
+
output from the software do not automatically fall under the
|
46
|
+
copyright of the software, but belong to whomever generated them,
|
47
|
+
and may be sold commercially, and may be aggregated with this
|
48
|
+
software.
|
49
|
+
|
50
|
+
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
51
|
+
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
52
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
53
|
+
PURPOSE.
|
54
|
+
|
55
|
+
|
data/Manifest
CHANGED
data/README
CHANGED
@@ -5,7 +5,7 @@ Fix an exploitable bug in CGI multipart parsing.
|
|
5
5
|
|
6
6
|
== License
|
7
7
|
|
8
|
-
Copyright 2006, 2007 Cloudburst, LLC. Portions copyright 2006 Jeremy Kemper, Jamis Buck, Zed A. Shaw, and Yukihiro Matsumoto, and used with permission.
|
8
|
+
Copyright 2006, 2007 Cloudburst, LLC. Portions copyright 2006 Jeremy Kemper, Jamis Buck, Zed A. Shaw, and Yukihiro Matsumoto, and used with permission. See the included LICENSE file.
|
9
9
|
|
10
10
|
== Description
|
11
11
|
|
@@ -32,10 +32,10 @@ Run the included test to verify that the patch works as intended. Then, <tt>requ
|
|
32
32
|
require 'rubygems'
|
33
33
|
require 'cgi_multipart_eof_fix'
|
34
34
|
|
35
|
-
Currently
|
35
|
+
Currently <tt>mongrel_rails</tt> requires this gem automatically. However, Mongrel may change in the future.
|
36
36
|
|
37
37
|
== Further resources
|
38
38
|
|
39
39
|
* http://blog.evanweaver.com/pages/code#cgi_multipart_eof_fix
|
40
|
-
* http://rubyforge.org/
|
40
|
+
* http://rubyforge.org/mailman/listinfo/mongrel-users
|
41
41
|
* http://www.ruby-lang.org/en/news/2006/12/04/another-dos-vulnerability-in-cgi-library/
|
@@ -0,0 +1,48 @@
|
|
1
|
+
|
2
|
+
# Gem::Specification for Cgi_multipart_eof_fix-2.3
|
3
|
+
# Originally generated by Echoe
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = %q{cgi_multipart_eof_fix}
|
7
|
+
s.version = "2.3"
|
8
|
+
s.date = %q{2007-08-14}
|
9
|
+
s.summary = %q{Fix an exploitable bug in CGI multipart parsing.}
|
10
|
+
s.email = %q{}
|
11
|
+
s.homepage = %q{http://blog.evanweaver.com/pages/code#cgi_multipart_eof_fix}
|
12
|
+
s.rubyforge_project = %q{mongrel}
|
13
|
+
s.description = %q{Fix an exploitable bug in CGI multipart parsing.}
|
14
|
+
s.has_rdoc = true
|
15
|
+
s.authors = ["Evan Weaver"]
|
16
|
+
s.files = ["test/cgi_multipart_eof_fix_test.rb", "README", "Manifest", "LICENSE", "lib/rake_task_redefine_task.rb", "lib/cgi_multipart_eof_fix.rb", "CHANGELOG", "cgi_multipart_eof_fix.gemspec"]
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
# # Original Rakefile source (requires the Echoe gem):
|
21
|
+
#
|
22
|
+
#
|
23
|
+
# require 'rubygems'
|
24
|
+
# require 'lib/rake_task_redefine_task.rb'
|
25
|
+
#
|
26
|
+
# begin
|
27
|
+
# gem 'echoe', '>=2.3'
|
28
|
+
# require 'echoe'
|
29
|
+
#
|
30
|
+
# echoe = Echoe.new("cgi_multipart_eof_fix") do |p|
|
31
|
+
# p.author = "Evan Weaver"
|
32
|
+
# p.rubyforge_name = "mongrel"
|
33
|
+
# p.summary = p.description = "Fix an exploitable bug in CGI multipart parsing."
|
34
|
+
# p.url = "http://blog.evanweaver.com/pages/code#cgi_multipart_eof_fix"
|
35
|
+
# p.docs_host = "blog.evanweaver.com:~/www/snax/public/files/doc/"
|
36
|
+
# p.rdoc_pattern = /CHANGELOG|LICENSE|README|lib\/cgi_multipart_eof_fix/
|
37
|
+
# p.need_tar_gz = false
|
38
|
+
# p.need_tgz = true
|
39
|
+
# end
|
40
|
+
#
|
41
|
+
# rescue LoadError
|
42
|
+
# desc 'Run the default tasks'
|
43
|
+
# task :default => :test
|
44
|
+
# end
|
45
|
+
#
|
46
|
+
# Rake::Task.redefine_task("test") do
|
47
|
+
# system "ruby -Ibin:lib:test test/cgi_multipart_eof_fix_test.rb"
|
48
|
+
# end
|
@@ -1,9 +1,13 @@
|
|
1
1
|
|
2
|
-
|
2
|
+
# unfortunately:
|
3
|
+
# >> "1.8.6" < "1.8.10"
|
4
|
+
# => false
|
3
5
|
|
4
|
-
|
6
|
+
version = RUBY_VERSION.split(".").map {|i| i.to_i }
|
5
7
|
|
6
|
-
|
8
|
+
if version [0] < 2 and version [1] < 9 and version [2] < 6
|
9
|
+
|
10
|
+
STDERR.puts "** Ruby version is not up-to-date; loading cgi_multipart_eof_fix"
|
7
11
|
|
8
12
|
require 'cgi'
|
9
13
|
|
@@ -119,5 +123,5 @@ if version[0] < 2 and version[1] < 9 and version[2] < 6
|
|
119
123
|
end
|
120
124
|
|
121
125
|
else
|
122
|
-
|
126
|
+
# Ruby version is up-to-date; cgi_multipart_eof_fix was not loaded
|
123
127
|
end
|
@@ -1,31 +1,59 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'test/unit'
|
2
4
|
require 'cgi'
|
3
5
|
require 'stringio'
|
4
6
|
require 'timeout'
|
5
7
|
|
6
|
-
|
7
|
-
|
8
|
-
|
8
|
+
BOUNDARY = '%?%(\w*)\\((\w*)\\)'
|
9
|
+
PAYLOAD = "--#{BOUNDARY}\r\nContent-Disposition: form-data; name=\"a_field\"\r\n\r\nBang!\r\n--#{BOUNDARY}--\r\n"
|
10
|
+
ENV['REQUEST_METHOD'] = "POST"
|
11
|
+
ENV['CONTENT_TYPE'] = "multipart/form-data; boundary=\"#{BOUNDARY}\""
|
12
|
+
ENV['CONTENT_LENGTH'] = PAYLOAD.length.to_s
|
9
13
|
|
10
|
-
|
11
|
-
|
12
|
-
ENV['CONTENT_LENGTH'] = data.length.to_s
|
14
|
+
Object.send(:remove_const, :STDERR)
|
15
|
+
STDERR = StringIO.new # hide the multipart load warnings
|
13
16
|
|
14
|
-
|
17
|
+
version = RUBY_VERSION.split(".").map {|i| i.to_i }
|
18
|
+
IS_VULNERABLE = (version [0] < 2 and version [1] < 9 and version [2] < 6)
|
15
19
|
|
16
|
-
|
17
|
-
Timeout.timeout(3) { CGI.new }
|
18
|
-
$stderr.puts ' => CGI is safe: read_multipart does not hang on malicious multipart requests.'
|
19
|
-
rescue TimeoutError
|
20
|
-
$stderr.puts ' => CGI is exploitable: read_multipart hangs on malicious multipart requests.'
|
21
|
-
end
|
20
|
+
class CgiMultipartTestError < StandardError
|
22
21
|
end
|
23
22
|
|
24
|
-
|
25
|
-
test_read_multipart_eof_fix
|
26
|
-
|
27
|
-
$stderr.puts 'Patching CGI::QueryExtension.read_multipart'
|
28
|
-
require 'rubygems'
|
29
|
-
require 'cgi_multipart_eof_fix'
|
23
|
+
class CgiMultipartEofFixTest < Test::Unit::TestCase
|
30
24
|
|
31
|
-
|
25
|
+
def read_multipart
|
26
|
+
# can't use STDIN because of the dynamic constant assignment rule
|
27
|
+
$stdin = StringIO.new(PAYLOAD)
|
28
|
+
|
29
|
+
begin
|
30
|
+
Timeout.timeout(3) do
|
31
|
+
CGI.new
|
32
|
+
end
|
33
|
+
"CGI is safe: read_multipart does not hang on malicious multipart requests."
|
34
|
+
rescue TimeoutError
|
35
|
+
raise CgiMultipartTestError, "CGI is exploitable: read_multipart hangs on malicious multipart requests."
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def test_exploitable
|
40
|
+
if IS_VULNERABLE
|
41
|
+
assert_raises CgiMultipartTestError do
|
42
|
+
read_multipart
|
43
|
+
end
|
44
|
+
else
|
45
|
+
# we're on 1.8.6 or higher already
|
46
|
+
assert_nothing_raised do
|
47
|
+
read_multipart
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_fixed
|
53
|
+
assert_nothing_raised do
|
54
|
+
load "#{File.dirname(__FILE__)}/../lib/cgi_multipart_eof_fix.rb"
|
55
|
+
read_multipart
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
metadata
CHANGED
@@ -3,15 +3,15 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: cgi_multipart_eof_fix
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: "2.
|
7
|
-
date: 2007-08-
|
8
|
-
summary: Fix an exploitable bug in CGI multipart parsing
|
6
|
+
version: "2.3"
|
7
|
+
date: 2007-08-14 00:00:00 -04:00
|
8
|
+
summary: Fix an exploitable bug in CGI multipart parsing.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
11
11
|
email: ""
|
12
12
|
homepage: http://blog.evanweaver.com/pages/code#cgi_multipart_eof_fix
|
13
|
-
rubyforge_project:
|
14
|
-
description: Fix an exploitable bug in CGI multipart parsing
|
13
|
+
rubyforge_project: mongrel
|
14
|
+
description: Fix an exploitable bug in CGI multipart parsing.
|
15
15
|
autorequire:
|
16
16
|
default_executable:
|
17
17
|
bindir: bin
|
@@ -30,14 +30,13 @@ authors:
|
|
30
30
|
- Evan Weaver
|
31
31
|
files:
|
32
32
|
- test/cgi_multipart_eof_fix_test.rb
|
33
|
-
- lib/rake_task_redefine_task.rb
|
34
|
-
- lib/cgi_multipart_eof_fix.rb
|
35
|
-
- Rakefile
|
36
|
-
- RUBY-LICENSE
|
37
33
|
- README
|
38
34
|
- Manifest
|
35
|
+
- LICENSE
|
36
|
+
- lib/rake_task_redefine_task.rb
|
37
|
+
- lib/cgi_multipart_eof_fix.rb
|
39
38
|
- CHANGELOG
|
40
|
-
-
|
39
|
+
- cgi_multipart_eof_fix.gemspec
|
41
40
|
test_files: []
|
42
41
|
|
43
42
|
rdoc_options: []
|
data/AFL3-LICENSE
DELETED
@@ -1,184 +0,0 @@
|
|
1
|
-
Academic Free License (AFL) v. 3.0
|
2
|
-
|
3
|
-
This Academic Free License (the "License") applies to any original work
|
4
|
-
of authorship (the "Original Work") whose owner (the "Licensor") has
|
5
|
-
placed the following licensing notice adjacent to the copyright notice
|
6
|
-
for the Original Work:
|
7
|
-
|
8
|
-
Licensed under the Academic Free License version 3.0
|
9
|
-
|
10
|
-
1) Grant of Copyright License. Licensor grants You a worldwide,
|
11
|
-
royalty-free, non-exclusive, sublicensable license, for the duration of
|
12
|
-
the copyright, to do the following:
|
13
|
-
|
14
|
-
a) to reproduce the Original Work in copies, either alone or as part of
|
15
|
-
a collective work;
|
16
|
-
|
17
|
-
b) to translate, adapt, alter, transform, modify, or arrange the
|
18
|
-
Original Work, thereby creating derivative works ("Derivative Works")
|
19
|
-
based upon the Original Work;
|
20
|
-
|
21
|
-
c) to distribute or communicate copies of the Original Work and
|
22
|
-
Derivative Works to the public, under any license of your choice that
|
23
|
-
does not contradict the terms and conditions, including Licensor's
|
24
|
-
reserved rights and remedies, in this Academic Free License;
|
25
|
-
|
26
|
-
d) to perform the Original Work publicly; and
|
27
|
-
|
28
|
-
e) to display the Original Work publicly.
|
29
|
-
|
30
|
-
2) Grant of Patent License. Licensor grants You a worldwide,
|
31
|
-
royalty-free, non-exclusive, sublicensable license, under patent claims
|
32
|
-
owned or controlled by the Licensor that are embodied in the Original
|
33
|
-
Work as furnished by the Licensor, for the duration of the patents, to
|
34
|
-
make, use, sell, offer for sale, have made, and import the Original Work
|
35
|
-
and Derivative Works.
|
36
|
-
|
37
|
-
3) Grant of Source Code License. The term "Source Code" means the
|
38
|
-
preferred form of the Original Work for making modifications to it and
|
39
|
-
all available documentation describing how to modify the Original Work.
|
40
|
-
Licensor agrees to provide a machine-readable copy of the Source Code of
|
41
|
-
the Original Work along with each copy of the Original Work that
|
42
|
-
Licensor distributes. Licensor reserves the right to satisfy this
|
43
|
-
obligation by placing a machine-readable copy of the Source Code in an
|
44
|
-
information repository reasonably calculated to permit inexpensive and
|
45
|
-
convenient access by You for as long as Licensor continues to distribute
|
46
|
-
the Original Work.
|
47
|
-
|
48
|
-
4) Exclusions From License Grant. Neither the names of Licensor, nor the
|
49
|
-
names of any contributors to the Original Work, nor any of their
|
50
|
-
trademarks or service marks, may be used to endorse or promote products
|
51
|
-
derived from this Original Work without express prior permission of the
|
52
|
-
Licensor. Except as expressly stated herein, nothing in this License
|
53
|
-
grants any license to Licensor's trademarks, copyrights, patents, trade
|
54
|
-
secrets or any other intellectual property. No patent license is granted
|
55
|
-
to make, use, sell, offer for sale, have made, or import embodiments of
|
56
|
-
any patent claims other than the licensed claims defined in Section 2.
|
57
|
-
No license is granted to the trademarks of Licensor even if such marks
|
58
|
-
are included in the Original Work. Nothing in this License shall be
|
59
|
-
interpreted to prohibit Licensor from licensing under terms different
|
60
|
-
from this License any Original Work that Licensor otherwise would have a
|
61
|
-
right to license.
|
62
|
-
|
63
|
-
5) External Deployment. The term "External Deployment" means the use,
|
64
|
-
distribution, or communication of the Original Work or Derivative Works
|
65
|
-
in any way such that the Original Work or Derivative Works may be used
|
66
|
-
by anyone other than You, whether those works are distributed or
|
67
|
-
communicated to those persons or made available as an application
|
68
|
-
intended for use over a network. As an express condition for the grants
|
69
|
-
of license hereunder, You must treat any External Deployment by You of
|
70
|
-
the Original Work or a Derivative Work as a distribution under section
|
71
|
-
1(c).
|
72
|
-
|
73
|
-
6) Attribution Rights. You must retain, in the Source Code of any
|
74
|
-
Derivative Works that You create, all copyright, patent, or trademark
|
75
|
-
notices from the Source Code of the Original Work, as well as any
|
76
|
-
notices of licensing and any descriptive text identified therein as an
|
77
|
-
"Attribution Notice." You must cause the Source Code for any Derivative
|
78
|
-
Works that You create to carry a prominent Attribution Notice reasonably
|
79
|
-
calculated to inform recipients that You have modified the Original
|
80
|
-
Work.
|
81
|
-
|
82
|
-
7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants
|
83
|
-
that the copyright in and to the Original Work and the patent rights
|
84
|
-
granted herein by Licensor are owned by the Licensor or are sublicensed
|
85
|
-
to You under the terms of this License with the permission of the
|
86
|
-
contributor(s) of those copyrights and patent rights. Except as
|
87
|
-
expressly stated in the immediately preceding sentence, the Original
|
88
|
-
Work is provided under this License on an "AS IS" BASIS and WITHOUT
|
89
|
-
WARRANTY, either express or implied, including, without limitation, the
|
90
|
-
warranties of non-infringement, merchantability or fitness for a
|
91
|
-
particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL
|
92
|
-
WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential
|
93
|
-
part of this License. No license to the Original Work is granted by this
|
94
|
-
License except under this disclaimer.
|
95
|
-
|
96
|
-
8) Limitation of Liability. Under no circumstances and under no legal
|
97
|
-
theory, whether in tort (including negligence), contract, or otherwise,
|
98
|
-
shall the Licensor be liable to anyone for any indirect, special,
|
99
|
-
incidental, or consequential damages of any character arising as a
|
100
|
-
result of this License or the use of the Original Work including,
|
101
|
-
without limitation, damages for loss of goodwill, work stoppage,
|
102
|
-
computer failure or malfunction, or any and all other commercial damages
|
103
|
-
or losses. This limitation of liability shall not apply to the extent
|
104
|
-
applicable law prohibits such limitation.
|
105
|
-
|
106
|
-
9) Acceptance and Termination. If, at any time, You expressly assented
|
107
|
-
to this License, that assent indicates your clear and irrevocable
|
108
|
-
acceptance of this License and all of its terms and conditions. If You
|
109
|
-
distribute or communicate copies of the Original Work or a Derivative
|
110
|
-
Work, You must make a reasonable effort under the circumstances to
|
111
|
-
obtain the express assent of recipients to the terms of this License.
|
112
|
-
This License conditions your rights to undertake the activities listed
|
113
|
-
in Section 1, including your right to create Derivative Works based upon
|
114
|
-
the Original Work, and doing so without honoring these terms and
|
115
|
-
conditions is prohibited by copyright law and international treaty.
|
116
|
-
Nothing in this License is intended to affect copyright exceptions and
|
117
|
-
limitations (including "fair use" or "fair dealing"). This License shall
|
118
|
-
terminate immediately and You may no longer exercise any of the rights
|
119
|
-
granted to You by this License upon your failure to honor the conditions
|
120
|
-
in Section 1(c).
|
121
|
-
|
122
|
-
10) Termination for Patent Action. This License shall terminate
|
123
|
-
automatically and You may no longer exercise any of the rights granted
|
124
|
-
to You by this License as of the date You commence an action, including
|
125
|
-
a cross-claim or counterclaim, against Licensor or any licensee alleging
|
126
|
-
that the Original Work infringes a patent. This termination provision
|
127
|
-
shall not apply for an action alleging patent infringement by
|
128
|
-
combinations of the Original Work with other software or hardware.
|
129
|
-
|
130
|
-
11) Jurisdiction, Venue and Governing Law. Any action or suit relating
|
131
|
-
to this License may be brought only in the courts of a jurisdiction
|
132
|
-
wherein the Licensor resides or in which Licensor conducts its primary
|
133
|
-
business, and under the laws of that jurisdiction excluding its
|
134
|
-
conflict-of-law provisions. The application of the United Nations
|
135
|
-
Convention on Contracts for the International Sale of Goods is expressly
|
136
|
-
excluded. Any use of the Original Work outside the scope of this License
|
137
|
-
or after its termination shall be subject to the requirements and
|
138
|
-
penalties of copyright or patent law in the appropriate jurisdiction.
|
139
|
-
This section shall survive the termination of this License.
|
140
|
-
|
141
|
-
12) Attorneys' Fees. In any action to enforce the terms of this License
|
142
|
-
or seeking damages relating thereto, the prevailing party shall be
|
143
|
-
entitled to recover its costs and expenses, including, without
|
144
|
-
limitation, reasonable attorneys' fees and costs incurred in connection
|
145
|
-
with such action, including any appeal of such action. This section
|
146
|
-
shall survive the termination of this License.
|
147
|
-
|
148
|
-
13) Miscellaneous. If any provision of this License is held to be
|
149
|
-
unenforceable, such provision shall be reformed only to the extent
|
150
|
-
necessary to make it enforceable.
|
151
|
-
|
152
|
-
14) Definition of "You" in This License. "You" throughout this License,
|
153
|
-
whether in upper or lower case, means an individual or a legal entity
|
154
|
-
exercising rights under, and complying with all of the terms of, this
|
155
|
-
License. For legal entities, "You" includes any entity that controls, is
|
156
|
-
controlled by, or is under common control with you. For purposes of this
|
157
|
-
definition, "control" means (i) the power, direct or indirect, to cause
|
158
|
-
the direction or management of such entity, whether by contract or
|
159
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
160
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
161
|
-
|
162
|
-
15) Right to Use. You may use the Original Work in all ways not
|
163
|
-
otherwise restricted or conditioned by this License or by law, and
|
164
|
-
Licensor promises not to interfere with or be responsible for such uses
|
165
|
-
by You.
|
166
|
-
|
167
|
-
16) Modification of This License. This License is Copyright (c) 2005
|
168
|
-
Lawrence Rosen. Permission is granted to copy, distribute, or
|
169
|
-
communicate this License without modification. Nothing in this License
|
170
|
-
permits You to modify this License as applied to the Original Work or to
|
171
|
-
Derivative Works. However, You may modify the text of this License and
|
172
|
-
copy, distribute or communicate your modified version (the "Modified
|
173
|
-
License") and apply it to other original works of authorship subject to
|
174
|
-
the following conditions: (i) You may not indicate in any way that your
|
175
|
-
Modified License is the "Academic Free License" or "AFL" and you may not
|
176
|
-
use those names in the name of your Modified License; (ii) You must
|
177
|
-
replace the notice specified in the first paragraph above with the
|
178
|
-
notice "Licensed under <insert your license name here>" or with a notice
|
179
|
-
of your own that is not confusingly similar to the notice in this
|
180
|
-
License; and (iii) You may not claim that your original works are open
|
181
|
-
source software unless your Modified License has been approved by Open
|
182
|
-
Source Initiative (OSI) and You comply with its license review and
|
183
|
-
certification process.
|
184
|
-
|
data/RUBY-LICENSE
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.co.jp>.
|
2
|
-
You can redistribute it and/or modify it under either the terms of the GPL
|
3
|
-
(see COPYING.txt file), or the conditions below:
|
4
|
-
|
5
|
-
1. You may make and give away verbatim copies of the source form of the
|
6
|
-
software without restriction, provided that you duplicate all of the
|
7
|
-
original copyright notices and associated disclaimers.
|
8
|
-
|
9
|
-
2. You may modify your copy of the software in any way, provided that
|
10
|
-
you do at least ONE of the following:
|
11
|
-
|
12
|
-
a) place your modifications in the Public Domain or otherwise
|
13
|
-
make them Freely Available, such as by posting said
|
14
|
-
modifications to Usenet or an equivalent medium, or by allowing
|
15
|
-
the author to include your modifications in the software.
|
16
|
-
|
17
|
-
b) use the modified software only within your corporation or
|
18
|
-
organization.
|
19
|
-
|
20
|
-
c) rename any non-standard executables so the names do not conflict
|
21
|
-
with standard executables, which must also be provided.
|
22
|
-
|
23
|
-
d) make other distribution arrangements with the author.
|
24
|
-
|
25
|
-
3. You may distribute the software in object code or executable
|
26
|
-
form, provided that you do at least ONE of the following:
|
27
|
-
|
28
|
-
a) distribute the executables and library files of the software,
|
29
|
-
together with instructions (in the manual page or equivalent)
|
30
|
-
on where to get the original distribution.
|
31
|
-
|
32
|
-
b) accompany the distribution with the machine-readable source of
|
33
|
-
the software.
|
34
|
-
|
35
|
-
c) give non-standard executables non-standard names, with
|
36
|
-
instructions on where to get the original software distribution.
|
37
|
-
|
38
|
-
d) make other distribution arrangements with the author.
|
39
|
-
|
40
|
-
4. You may modify and include the part of the software into any other
|
41
|
-
software (possibly commercial). But some files in the distribution
|
42
|
-
are not written by the author, so that they are not under this terms.
|
43
|
-
|
44
|
-
They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some
|
45
|
-
files under the ./missing directory. See each file for the copying
|
46
|
-
condition.
|
47
|
-
|
48
|
-
5. The scripts and library files supplied as input to or produced as
|
49
|
-
output from the software do not automatically fall under the
|
50
|
-
copyright of the software, but belong to whomever generated them,
|
51
|
-
and may be sold commercially, and may be aggregated with this
|
52
|
-
software.
|
53
|
-
|
54
|
-
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
55
|
-
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
56
|
-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
57
|
-
PURPOSE.
|
58
|
-
|
data/Rakefile
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
|
2
|
-
require 'rubygems'
|
3
|
-
require 'rake'
|
4
|
-
require 'lib/rake_task_redefine_task.rb'
|
5
|
-
|
6
|
-
begin
|
7
|
-
require 'rake/clean'
|
8
|
-
require 'echoe'
|
9
|
-
|
10
|
-
echoe = Echoe.new("cgi_multipart_eof_fix") do |p|
|
11
|
-
p.author = "Evan Weaver"
|
12
|
-
p.rubyforge_name = "fauna"
|
13
|
-
p.summary = p.description = "Fix an exploitable bug in CGI multipart parsing which affects Ruby <= 1.8.5 when multipart boundary attribute contains a non-halting regular expression string."
|
14
|
-
p.url = "http://blog.evanweaver.com/pages/code#cgi_multipart_eof_fix"
|
15
|
-
p.docs_host = "blog.evanweaver.com:~/www/snax/public/files/doc/"
|
16
|
-
p.rdoc_pattern = /CHANGELOG|LICENSE|README|lib\/cgi_multipart_eof_fix/
|
17
|
-
end
|
18
|
-
|
19
|
-
rescue LoadError
|
20
|
-
desc 'Run the default tasks'
|
21
|
-
task :default => :test
|
22
|
-
end
|
23
|
-
|
24
|
-
Rake::Task.redefine_task("test") do
|
25
|
-
system "ruby -Ibin:lib:test test/cgi_multipart_eof_fix_test.rb"
|
26
|
-
end
|
27
|
-
|