ruby-changes:12049
From: naruse <ko1@a...>
Date: Wed, 17 Jun 2009 07:46:57 +0900 (JST)
Subject: [ruby-changes:12049] Ruby:r23716 (ruby_1_8): * lib/webrick/httputils.rb (parse_form_data): escape boundary of
naruse 2009-06-17 07:46:45 +0900 (Wed, 17 Jun 2009) New Revision: 23716 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23716 Log: * lib/webrick/httputils.rb (parse_form_data): escape boundary of multipart/form-data when embed in regexp. Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/lib/webrick/httputils.rb Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 23715) +++ ruby_1_8/ChangeLog (revision 23716) @@ -1,3 +1,8 @@ +Wed Jun 17 07:44:27 2009 NARUSE, Yui <naruse@r...> + + * lib/webrick/httputils.rb (parse_form_data): escape boundary of + multipart/form-data when embed in regexp. + Tue Jun 16 22:23:00 2009 Nobuyoshi Nakada <nobu@r...> * io.c (rb_io_open), math.c (domain_check), object.c (boot_defclass): Index: ruby_1_8/lib/webrick/httputils.rb =================================================================== --- ruby_1_8/lib/webrick/httputils.rb (revision 23715) +++ ruby_1_8/lib/webrick/httputils.rb (revision 23716) @@ -304,7 +304,7 @@ module_function :parse_query def parse_form_data(io, boundary) - boundary_regexp = /\A--#{boundary}(--)?#{CRLF}\z/ + boundary_regexp = /\A--#{Regexp.quote(boundary)}(--)?#{CRLF}\z/ form_data = Hash.new return form_data unless io data = nil -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/