From bf4f952440af693e3d289de0027e1a927a0875b3 Mon Sep 17 00:00:00 2001 From: Jeroen van Meeuwen Date: Thu, 21 Jan 2010 00:15:48 +0000 Subject: [PATCH] 1.8.6.388-6 --- .cvsignore | 2 +- import.log | 1 + noautobuild | 1 - ruby-1.8.6.x-CVE-2009-4492.patch | 134 ------------------------------- ruby.spec | 5 +- sources | 2 +- 6 files changed, 4 insertions(+), 141 deletions(-) delete mode 100644 noautobuild delete mode 100644 ruby-1.8.6.x-CVE-2009-4492.patch diff --git a/.cvsignore b/.cvsignore index dd58fe3..abc7fa1 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +1,4 @@ ruby-refm-rdp-1.8.2-ja-html.tar.gz rubyfaq-990927.tar.gz rubyfaq-jp-990927.tar.gz -ruby-1.8.6-p383.tar.bz2 +ruby-1.8.6-p388.tar.bz2 diff --git a/import.log b/import.log index 47636a0..2f16979 100644 --- a/import.log +++ b/import.log @@ -4,3 +4,4 @@ ruby-1_8_6_287-7_fc11:HEAD:ruby-1.8.6.287-7.fc11.src.rpm:1237351812 ruby-1_8_6_368-1_fc11:HEAD:ruby-1.8.6.368-1.fc11.src.rpm:1243759307 ruby-1_8_6_368-2_fc11:HEAD:ruby-1.8.6.368-2.fc11.src.rpm:1245520186 ruby-1_8_6_369-1_fc11:HEAD:ruby-1.8.6.369-1.fc11.src.rpm:1245760717 +ruby-1_8_6_388-6_fc12:HEAD:ruby-1.8.6.388-6.fc12.src.rpm:1264032880 diff --git a/noautobuild b/noautobuild deleted file mode 100644 index 7d5a48a..0000000 --- a/noautobuild +++ /dev/null @@ -1 +0,0 @@ -wait until tk 8.5.7 is rebuilt diff --git a/ruby-1.8.6.x-CVE-2009-4492.patch b/ruby-1.8.6.x-CVE-2009-4492.patch deleted file mode 100644 index 00fa053..0000000 --- a/ruby-1.8.6.x-CVE-2009-4492.patch +++ /dev/null @@ -1,134 +0,0 @@ -Index: lib/webrick/httpstatus.rb -=================================================================== ---- lib/webrick/httpstatus.rb (revision 26273) -+++ lib/webrick/httpstatus.rb (revision 26274) -@@ -12,7 +12,17 @@ - - module HTTPStatus - -- class Status < StandardError; end -+ class Status < StandardError -+ def initialize(message=self.class, *rest) -+ super(AccessLog.escape(message), *rest) -+ end -+ class << self -+ attr_reader :code, :reason_phrase -+ end -+ def code() self::class::code end -+ def reason_phrase() self::class::reason_phrase end -+ alias to_i code -+ end - class Info < Status; end - class Success < Status; end - class Redirect < Status; end -@@ -68,6 +78,7 @@ - CodeToError = {} - - StatusMessage.each{|code, message| -+ message.freeze - var_name = message.gsub(/[ \-]/,'_').upcase - err_name = message.gsub(/[ \-]/,'') - -@@ -79,18 +90,12 @@ - when 500...600; parent = ServerError - end - -- eval %- -- RC_#{var_name} = #{code} -- class #{err_name} < #{parent} -- def self.code() RC_#{var_name} end -- def self.reason_phrase() StatusMessage[code] end -- def code() self::class::code end -- def reason_phrase() self::class::reason_phrase end -- alias to_i code -- end -- - -- -- CodeToError[code] = const_get(err_name) -+ const_set("RC_#{var_name}", code) -+ err_class = Class.new(parent) -+ err_class.instance_variable_set(:@code, code) -+ err_class.instance_variable_set(:@reason_phrase, message) -+ const_set(err_name, err_class) -+ CodeToError[code] = err_class - } - - def reason_phrase(code) -Index: lib/webrick/httprequest.rb -=================================================================== ---- lib/webrick/httprequest.rb (revision 26273) -+++ lib/webrick/httprequest.rb (revision 26274) -@@ -242,11 +242,7 @@ - @raw_header << line - end - end -- begin -- @header = HTTPUtils::parse_header(@raw_header) -- rescue => ex -- raise HTTPStatus::BadRequest, ex.message -- end -+ @header = HTTPUtils::parse_header(@raw_header.join) - end - - def parse_uri(str, scheme="http") -Index: lib/webrick/httpresponse.rb -=================================================================== ---- lib/webrick/httpresponse.rb (revision 26273) -+++ lib/webrick/httpresponse.rb (revision 26274) -@@ -132,7 +132,7 @@ - end - end - -- # Determin the message length (RFC2616 -- 4.4 Message Length) -+ # Determine the message length (RFC2616 -- 4.4 Message Length) - if @status == 304 || @status == 204 || HTTPStatus::info?(@status) - @header.delete('content-length') - @body = "" -Index: lib/webrick/httputils.rb -=================================================================== ---- lib/webrick/httputils.rb (revision 26273) -+++ lib/webrick/httputils.rb (revision 26274) -@@ -128,11 +128,11 @@ - when /^\s+(.*?)\s*\z/om - value = $1 - unless field -- raise "bad header '#{line.inspect}'." -+ raise HTTPStatus::BadRequest, "bad header '#{line}'." - end - header[field][-1] << " " << value - else -- raise "bad header '#{line.inspect}'." -+ raise HTTPStatus::BadRequest, "bad header '#{line}'." - end - } - header.each{|key, values| -Index: lib/webrick/accesslog.rb -=================================================================== ---- lib/webrick/accesslog.rb (revision 26273) -+++ lib/webrick/accesslog.rb (revision 26274) -@@ -53,15 +53,23 @@ - when ?e, ?i, ?n, ?o - raise AccessLogError, - "parameter is required for \"#{spec}\"" unless param -- params[spec][param] || "-" -+ param = params[spec][param] ? escape(param) : "-" - when ?t - params[spec].strftime(param || CLF_TIME_FORMAT) - when ?% - "%" - else -- params[spec] -+ escape(params[spec].to_s) - end - } - end -+ -+ def escape(data) -+ if data.tainted? -+ data.gsub(/[[:cntrl:]\\]+/) {$&.dump[1...-1]}.untaint -+ else -+ data -+ end -+ end - end - end diff --git a/ruby.spec b/ruby.spec index 537e91b..e947c4c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %define rubyxver 1.8 %define rubyver 1.8.6 -%define _patchlevel 383 +%define _patchlevel 388 %define dotpatchlevel %{?_patchlevel:.%{_patchlevel}} %define patchlevel %{?_patchlevel:-p%{_patchlevel}} %define arcver %{rubyver}%{?patchlevel} @@ -56,8 +56,6 @@ Patch31: ruby-1.8.6-p369-ri-gem_multipath.patch # Patch32 from ruby_1_8 branch Patch32: ruby-1.8head-irb-save-history.patch Patch33: ruby-1.8.6-p383-mkmf-use-shared.patch -# Patch34 already applied in 1.8.6p388 -Patch34: ruby-1.8.6.x-CVE-2009-4492.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -199,7 +197,6 @@ pushd %{name}-%{arcver} %patch31 -p1 %patch32 -p0 %patch33 -p1 -%patch34 -p0 popd %build diff --git a/sources b/sources index a667a08..d9a2f79 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ b6dd396f513efeb7864685c840f9643a ruby-refm-rdp-1.8.2-ja-html.tar.gz 634c25b14e19925d10af3720d72e8741 rubyfaq-990927.tar.gz 4fcec898f51d8371cc42d0a013940469 rubyfaq-jp-990927.tar.gz -a48703cd982b9f0e3002700a50b0e88e ruby-1.8.6-p383.tar.bz2 +f26cefbc8ab6728650ab9ae773d22bcb ruby-1.8.6-p388.tar.bz2