cgi_multipart_eof_fix 2.3 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ a�R�U��㡏�Ҿ����x���v�Up!�s�ݯo����r��QE���i&O�+�v�6��grM��됿S�/W�ԮS'���v�^���DXL�tӻ�:���K����U��op �~�� ��X 6)T�q�x雡;�����l�GH����[F�o@�WP�lj�����;�sa޵�i����]]ܻ��=iZl:Po��R�#6A+�x��ء�9�(�9��/Ūx�����aVv�r
2
+ �˭�5�Wp
data/CHANGELOG CHANGED
@@ -1,10 +1,14 @@
1
1
 
2
- v2.3. Use STDERR, not $stderr, just like Mongrel; tests now use Test::Unit; moving to the mongrel project on RubyForge.
2
+ v2.5.0. Not required for JRuby.
3
3
 
4
- v2.2. Don't load on Ruby > 1.8.5; copyright correction.
4
+ v2.4.0. Signed gem.
5
5
 
6
- v2.1. License change due to no provision for use in original Ruby license (prevents installation in Florida).
6
+ v2.3.0. Use STDERR, not $stderr, just like Mongrel; tests now use Test::Unit; moving to the mongrel project on RubyForge.
7
7
 
8
- v2.0. Updated for second cgi.rb vulnerability.
8
+ v2.2.0. Don't load on Ruby > 1.8.5; copyright correction.
9
+
10
+ v2.1.0. License change due to no provision for use in original Ruby license (prevents installation in Florida).
11
+
12
+ v2.0.0. Updated for second cgi.rb vulnerability.
9
13
 
10
14
  v1.0.0. Original single-patch release by Zed Shaw, et. al.
data/Manifest CHANGED
@@ -1,7 +1,6 @@
1
- test/cgi_multipart_eof_fix_test.rb
2
- README
3
- Manifest
4
- LICENSE
5
- lib/rake_task_redefine_task.rb
6
- lib/cgi_multipart_eof_fix.rb
7
1
  CHANGELOG
2
+ lib/cgi_multipart_eof_fix.rb
3
+ LICENSE
4
+ Manifest
5
+ README
6
+ test/test_cgi_multipart_eof_fix.rb
data/README CHANGED
@@ -11,22 +11,17 @@ Copyright 2006, 2007 Cloudburst, LLC. Portions copyright 2006 Jeremy Kemper, Jam
11
11
 
12
12
  Fixes an exploitable bug in CGI multipart parsing which affects Ruby <= 1.8.5. When multipart boundary attributes contain non-halting regular expression strings, the boundary searcher in the CGI module does not properly escape the parameter and will execute arbitrary regular expressions. This fix adds escaping for the user data.
13
13
 
14
- This is fix is cumulative with previous CGI multipart vulnerability fixes; see version 1.0.0 of the gem by Jamis Buck et. al.
15
-
16
- == Installation
17
-
18
- sudo gem install cgi_multipart_eof_fix
19
-
20
- == Scope
21
-
22
- * Affected: standalone CGI, Mongrel, WEBrick
14
+ * Affected application servers: standalone CGI, Mongrel, WEBrick
23
15
  * Unaffected: FastCGI, Ruby 1.8.6 (all servers)
24
16
  * Unknown: mod_ruby
25
17
 
26
- This library will not modify versions of Ruby greater than 1.8.5.
18
+ This fix will not modify versions of Ruby greater than 1.8.5, and is cumulative with previous CGI multipart vulnerability fixes.
27
19
 
28
20
  == Usage
29
21
 
22
+ Install the gem:
23
+ sudo gem install cgi_multipart_eof_fix
24
+
30
25
  Run the included test to verify that the patch works as intended. Then, <tt>require</tt> the gem in every affected application, as follows:
31
26
 
32
27
  require 'rubygems'
@@ -34,8 +29,12 @@ Run the included test to verify that the patch works as intended. Then, <tt>requ
34
29
 
35
30
  Currently <tt>mongrel_rails</tt> requires this gem automatically. However, Mongrel may change in the future.
36
31
 
32
+ == Reporting problems
33
+
34
+ * http://rubyforge.org/tracker/?group_id=1306
35
+
37
36
  == Further resources
38
37
 
39
- * http://blog.evanweaver.com/pages/code#cgi_multipart_eof_fix
40
38
  * http://rubyforge.org/mailman/listinfo/mongrel-users
39
+ * http://blog.evanweaver.com/articles/2006/12/05/cgi-rb-vulnerability-hotfix
41
40
  * http://www.ruby-lang.org/en/news/2006/12/04/another-dos-vulnerability-in-cgi-library/
@@ -1,48 +1,44 @@
1
1
 
2
- # Gem::Specification for Cgi_multipart_eof_fix-2.3
2
+ # Gem::Specification for Cgi_multipart_eof_fix-2.5.0
3
3
  # Originally generated by Echoe
4
4
 
5
5
  Gem::Specification.new do |s|
6
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.}
7
+ s.version = "2.5.0"
8
+
9
+ s.specification_version = 2 if s.respond_to? :specification_version=
10
+
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
+ s.authors = ["Evan Weaver"]
13
+ s.date = %q{2007-10-26}
14
+ s.description = %q{Fix an exploitable bug in CGI multipart parsing.}
10
15
  s.email = %q{}
16
+ s.files = ["CHANGELOG", "lib/cgi_multipart_eof_fix.rb", "LICENSE", "Manifest", "README", "test/test_cgi_multipart_eof_fix.rb", "cgi_multipart_eof_fix.gemspec"]
17
+ s.has_rdoc = true
11
18
  s.homepage = %q{http://blog.evanweaver.com/pages/code#cgi_multipart_eof_fix}
19
+ s.require_paths = ["lib"]
12
20
  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"]
21
+ s.rubygems_version = %q{0.9.4.6}
22
+ s.summary = %q{Fix an exploitable bug in CGI multipart parsing.}
23
+ s.test_files = ["test/test_cgi_multipart_eof_fix.rb"]
17
24
  end
18
25
 
19
26
 
20
27
  # # Original Rakefile source (requires the Echoe gem):
21
28
  #
22
29
  #
23
- # require 'rubygems'
24
- # require 'lib/rake_task_redefine_task.rb'
30
+ # require 'echoe'
25
31
  #
26
- # begin
27
- # gem 'echoe', '>=2.3'
28
- # require 'echoe'
32
+ # Echoe.new("cgi_multipart_eof_fix") do |p|
33
+ # p.author = "Evan Weaver"
34
+ # p.rubyforge_name = "mongrel"
35
+ # p.summary = p.description = "Fix an exploitable bug in CGI multipart parsing."
36
+ # p.url = "http://blog.evanweaver.com/pages/code#cgi_multipart_eof_fix"
37
+ # p.docs_host = "blog.evanweaver.com:~/www/bax/public/files/doc/"
38
+ # p.rdoc_pattern = /CHANGELOG|LICENSE|README|lib\/cgi_multipart_eof_fix/
29
39
  #
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
40
+ # p.need_tar_gz = false
41
+ # p.need_tgz = true
42
+ # p.require_signed = true
44
43
  # end
45
44
  #
46
- # Rake::Task.redefine_task("test") do
47
- # system "ruby -Ibin:lib:test test/cgi_multipart_eof_fix_test.rb"
48
- # end
@@ -5,7 +5,7 @@
5
5
 
6
6
  version = RUBY_VERSION.split(".").map {|i| i.to_i }
7
7
 
8
- if version [0] < 2 and version [1] < 9 and version [2] < 6
8
+ if version [0] < 2 and version [1] < 9 and version [2] < 6 and RUBY_PLATFORM !~ /java/
9
9
 
10
10
  STDERR.puts "** Ruby version is not up-to-date; loading cgi_multipart_eof_fix"
11
11
 
@@ -15,7 +15,7 @@ Object.send(:remove_const, :STDERR)
15
15
  STDERR = StringIO.new # hide the multipart load warnings
16
16
 
17
17
  version = RUBY_VERSION.split(".").map {|i| i.to_i }
18
- IS_VULNERABLE = (version [0] < 2 and version [1] < 9 and version [2] < 6)
18
+ IS_VULNERABLE = (version [0] < 2 and version [1] < 9 and version [2] < 6 and RUBY_PLATFORM !~ /java/)
19
19
 
20
20
  class CgiMultipartTestError < StandardError
21
21
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
3
- specification_version: 1
2
+ rubygems_version: 0.9.4.6
3
+ specification_version: 2
4
4
  name: cgi_multipart_eof_fix
5
5
  version: !ruby/object:Gem::Version
6
- version: "2.3"
7
- date: 2007-08-14 00:00:00 -04:00
6
+ version: 2.5.0
7
+ date: 2007-10-26 00:00:00 -04:00
8
8
  summary: Fix an exploitable bug in CGI multipart parsing.
9
9
  require_paths:
10
10
  - lib
@@ -16,29 +16,78 @@ autorequire:
16
16
  default_executable:
17
17
  bindir: bin
18
18
  has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
19
+ required_ruby_version: !ruby/object:Gem::Requirement
20
20
  requirements:
21
- - - ">"
21
+ - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.0.0
23
+ version: "0"
24
+ version:
25
+ required_rubygems_version: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: "0"
24
30
  version:
25
31
  platform: ruby
26
32
  signing_key:
27
33
  cert_chain:
34
+ - |
35
+ -----BEGIN CERTIFICATE-----
36
+ MIIDUDCCAjigAwIBAgIBADANBgkqhkiG9w0BAQUFADBOMRwwGgYDVQQDDBNtb25n
37
+ cmVsLWRldmVsb3BtZW50MRkwFwYKCZImiZPyLGQBGRYJcnVieWZvcmdlMRMwEQYK
38
+ CZImiZPyLGQBGRYDb3JnMB4XDTA3MDkxNjEwMzI0OVoXDTA4MDkxNTEwMzI0OVow
39
+ TjEcMBoGA1UEAwwTbW9uZ3JlbC1kZXZlbG9wbWVudDEZMBcGCgmSJomT8ixkARkW
40
+ CXJ1Ynlmb3JnZTETMBEGCgmSJomT8ixkARkWA29yZzCCASIwDQYJKoZIhvcNAQEB
41
+ BQADggEPADCCAQoCggEBAMb9v3B01eOHk3FyypbQgKXzJplUE5P6dXoG+xpPm0Lv
42
+ P7BQmeMncOwqQ7zXpVQU+lTpXtQFTsOE3vL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MBYGCgmSJomT8ixkARkWCGNsb3VkYnVyMRIwEAYK
62
+ CZImiZPyLGQBGRYCc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDk
63
+ LQijz2fICmev4+9s0WB71WzJFYCUYFQQxqGlenbxWut9dlPSsBbskGjg+UITeOXi
64
+ cTh3MTqAB0i1LJyNOiyvDsAivn7GjKXhVvflp2/npMhBBe83P4HOWqeQBjkk3QJI
65
+ FFNBvqbFLeEXIP+HiqAOiyNHZEVXMepLEJLzGrg3Ly7M7A6L5fK7jDrt8jkm+c+8
66
+ zGquVHV5ohAebGd/vpHMLjpA7lCG5+MBgYZd33rRfNtCxDJMNRgnOu9PsB05+LJn
67
+ MpDKQq3x0SkOf5A+MVOcadNCaAkFflYk3SUcXaXWxu/eCHgqfW1m76RNSp5djpKE
68
+ CgNPK9lGIWpB3CHzDaVNAgMBAAGjOTA3MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSw
69
+ MB0GA1UdDgQWBBT5aonPfFBdJ5rWFG+8dZwgyB54LjANBgkqhkiG9w0BAQUFAAOC
70
+ AQEAiKbzWgMcvZs/TPwJxr8tJ+7mSGz7+zDkWcbBl8FpQq1DtRcATh1oyTkQT7t+
71
+ rFEBYMmb0FxbbUnojQp8hIFgFkUwFpStwWBL/okLSehntzI2iwjuEtfj4ac9Q3Y2
72
+ uSdbmZqsQTuu+lEUc5C4qLK7YKwToaul+cx7vWxyk1YendcVwRlFLIBqA5cPrwo3
73
+ yyGLTHlRYn2c9PSbM1B63Yg+LqSSAa4QSU3Wv9pNdffVpvwHPVEQpO7ZDo5slQFL
74
+ Gf6+gbD/eZAvhpvmn8JlXb+LxKaFVMs2Yvrk1xOuT76SsPjEGWxkr7jZCIpsYfgQ
75
+ ALN3mi/9z0Mf1YroliUgF0v5Yw==
76
+ -----END CERTIFICATE-----
77
+
28
78
  post_install_message:
29
79
  authors:
30
80
  - Evan Weaver
31
81
  files:
32
- - test/cgi_multipart_eof_fix_test.rb
33
- - README
34
- - Manifest
35
- - LICENSE
36
- - lib/rake_task_redefine_task.rb
37
- - lib/cgi_multipart_eof_fix.rb
38
82
  - CHANGELOG
83
+ - lib/cgi_multipart_eof_fix.rb
84
+ - LICENSE
85
+ - Manifest
86
+ - README
87
+ - test/test_cgi_multipart_eof_fix.rb
39
88
  - cgi_multipart_eof_fix.gemspec
40
- test_files: []
41
-
89
+ test_files:
90
+ - test/test_cgi_multipart_eof_fix.rb
42
91
  rdoc_options: []
43
92
 
44
93
  extra_rdoc_files: []
Binary file
@@ -1,25 +0,0 @@
1
-
2
- # http://www.bigbold.com/snippets/posts/show/2032
3
- module Rake
4
- module TaskManager
5
- def redefine_task(task_class, args, &block)
6
- task_name, deps = resolve_args(args)
7
- task_name = task_class.scope_name(@scope, task_name)
8
- deps = [deps] unless deps.respond_to?(:to_ary)
9
- deps = deps.collect {|d| d.to_s }
10
- task = @tasks[task_name.to_s] = task_class.new(task_name, self)
11
- task.application = self
12
- task.add_comment(@last_comment)
13
- @last_comment = nil
14
- task.enhance(deps, &block)
15
- task
16
- end
17
- end
18
- class Task
19
- class << self
20
- def redefine_task(args, &block)
21
- Rake.application.redefine_task(self, args, &block)
22
- end
23
- end
24
- end
25
- end