Security hole in multipart.cgi.in, w3mman2html.cgi.in

From: Hironori Sakamoto <h-saka@lsi.nec.co.jp>
This commit is contained in:
Fumitoshi UKAI
2001-12-21 18:33:41 +00:00
parent 4678cc6395
commit 54702c4d83
4 changed files with 17 additions and 9 deletions

View File

@@ -25,7 +25,7 @@ if (defined($ENV{'QUERY_STRING'})) {
$CGI = "file:///\$LIB/multipart.cgi?file=" . &html_quote($file);
}
open(F, $file);
open(F, "< $file");
$end = 0;
$mbody = '';
if (defined($boundary)) {
@@ -258,7 +258,7 @@ sub load_mime_type {
local($file) = @_;
local(%m, $a, @b, $_);
open(M, $file) || return ();
open(M, "< $file") || return ();
while(<M>) {
/^#/ && next;
chop;