summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-16 22:46:45 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-16 22:46:45 +0000
commit2e470cbf4cd200ccc477eeb269dfd860da419451 (patch)
tree01da961f17fb43dbdfefc45623f47ed713b9da5c
parent47fc6a3ad0147d34fa9d7716508e0a101285df03 (diff)
* lib/webrick/httputils.rb (parse_form_data): escape boundary of
multipart/form-data when embed in regexp. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/webrick/httputils.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b05ddcb11..7f7f6b06f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jun 17 07:44:27 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* io.c (rb_io_open), math.c (domain_check), object.c (boot_defclass):
diff --git a/lib/webrick/httputils.rb b/lib/webrick/httputils.rb
index 976d3e915e..c5e847fcb2 100644
--- a/lib/webrick/httputils.rb
+++ b/lib/webrick/httputils.rb
@@ -304,7 +304,7 @@ module WEBrick
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