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/branches/ruby_1_8@10602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e2dd2f3752
commit
e772234fb9
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>
|
Wed Jul 26 01:02:59 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* configure.in: suppress warnings by automake 1.8 or later.
|
* configure.in: suppress warnings by automake 1.8 or later.
|
||||||
|
|
|
@ -971,6 +971,7 @@ class CGI
|
||||||
boundary = "--" + boundary
|
boundary = "--" + boundary
|
||||||
buf = ""
|
buf = ""
|
||||||
bufsize = 10 * 1024
|
bufsize = 10 * 1024
|
||||||
|
boundary_end=""
|
||||||
|
|
||||||
# start multipart/form-data
|
# start multipart/form-data
|
||||||
stdinput.binmode if defined? stdinput.binmode
|
stdinput.binmode if defined? stdinput.binmode
|
||||||
|
@ -1031,6 +1032,7 @@ class CGI
|
||||||
if "--" == $2
|
if "--" == $2
|
||||||
content_length = -1
|
content_length = -1
|
||||||
end
|
end
|
||||||
|
boundary_end = $2.dup
|
||||||
""
|
""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1064,6 +1066,7 @@ class CGI
|
||||||
break if buf.size == 0
|
break if buf.size == 0
|
||||||
break if content_length === -1
|
break if content_length === -1
|
||||||
end
|
end
|
||||||
|
raise EOFError, "bad boundary end of body part" unless boundary_end=~/--/
|
||||||
|
|
||||||
params
|
params
|
||||||
end # read_multipart
|
end # read_multipart
|
||||||
|
|
Loading…
Add table
Reference in a new issue