diff options
author | Ville Skytt? <ville.skytta@iki.fi> | 2010-12-04 21:48:33 +0200 |
---|---|---|
committer | Ville Skytt? <ville.skytta@iki.fi> | 2010-12-04 21:48:33 +0200 |
commit | e1204954dba25007605edcb069e424c494ec6734 (patch) | |
tree | a8d884e6afe6e02359334ea7e3641d8635818b3e | |
parent | f69363851f4be86e31a27d2d78d95290cea3bb01 (diff) | |
download | markup-validator-e1204954dba25007605edcb069e424c494ec6734.zip markup-validator-e1204954dba25007605edcb069e424c494ec6734.tar.gz markup-validator-e1204954dba25007605edcb069e424c494ec6734.tar.bz2 |
Use CGI::upload() for better upload sanity checks.
-rwxr-xr-x | httpd/cgi-bin/check | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index 043ffbb..32216d6 100755 --- a/httpd/cgi-bin/check +++ b/httpd/cgi-bin/check @@ -1903,12 +1903,11 @@ sub handle_file my $q = shift; # The CGI object. my $File = shift; # The master datastructure. - my $f = $q->param('uploaded_file'); - my $h = $q->uploadInfo($f); - my $file; + my $f = $q->upload('uploaded_file'); + my $h = $q->uploadInfo($q->param('uploaded_file')); local $/ = undef; # set line delimiter so that <> reads rest of file - $file = <$f>; + my $file = <$f>; my ($mode, $ct, $charset) = &parse_content_type($File, $h->{'Content-Type'}); |