summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-16 22:42:13 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-16 22:42:13 +0000
commitcde491005e3776b73c25cb7ec45e8750f7ade770 (patch)
tree9f56d04d25121aca6d8f27d598c1d25580ada4d5
parent3caa4ee5e545ee975ca3dc3fa798e63876e59a05 (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/trunk@23715 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 a3cd2bb010..b190eecf2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jun 17 07:36:22 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/webrick/httputils.rb (parse_form_data): escape boundary of
+ multipart/form-data when embed in regexp.
+
Wed Jun 17 07:24:26 2009 Koichi Sasada <ko1@atdot.net>
* array.c (rb_ary_memsize): added.
diff --git a/lib/webrick/httputils.rb b/lib/webrick/httputils.rb
index bed24e09dd..6f6f05a199 100644
--- a/lib/webrick/httputils.rb
+++ b/lib/webrick/httputils.rb
@@ -305,7 +305,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