mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/cgi.rb (CGI::QueryExtension::read_multipart): check
multipart boundary end. a patch from Fujioka <fuj at rabbix.jp> [ruby-dev:28470] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
790b03ca00
commit
b8034ca54f
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
Wed Jul 26 16:06:03 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* lib/cgi.rb (CGI::QueryExtension::read_multipart): check
|
||||
multipart boundary end. a patch from Fujioka <fuj at rabbix.jp>
|
||||
[ruby-dev:28470]
|
||||
|
||||
Wed Jul 26 01:02:59 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in: suppress warnings by automake 1.8 or later.
|
||||
|
|
|
@ -981,6 +981,7 @@ class CGI
|
|||
boundary = "--" + boundary
|
||||
buf = ""
|
||||
bufsize = 10 * 1024
|
||||
boundary_end=""
|
||||
|
||||
# start multipart/form-data
|
||||
stdinput.binmode if defined? stdinput.binmode
|
||||
|
@ -1028,6 +1029,7 @@ class CGI
|
|||
if "--" == $2
|
||||
content_length = -1
|
||||
end
|
||||
boundary_end = $2.dup
|
||||
""
|
||||
end
|
||||
|
||||
|
@ -1062,6 +1064,7 @@ class CGI
|
|||
break if buf.size == 0
|
||||
break if content_length === -1
|
||||
end
|
||||
raise EOFError, "bad boundary end of body part" unless boundary_end=~/--/
|
||||
|
||||
params
|
||||
end # read_multipart
|
||||
|
|
Loading…
Reference in a new issue