diff options
Diffstat (limited to 'lib/cgi.rb')
-rw-r--r-- | lib/cgi.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/cgi.rb b/lib/cgi.rb index 04f0b5e7ce..4308efcb6b 100644 --- a/lib/cgi.rb +++ b/lib/cgi.rb @@ -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 |