- From: Mercurial notifier <nobody@w3.org>
- Date: Sat, 04 Dec 2010 19:48:38 +0000
- To: markup-validator updates <www-validator-cvs@w3.org>
changeset: 3173:294f25fe9480
tag: tip
user: Ville Skyttä <ville.skytta@iki.fi>
date: Sat Dec 04 21:48:33 2010 +0200
files: httpd/cgi-bin/check
description:
Use CGI::upload() for better upload sanity checks.
diff -r 923531bf81cf -r 294f25fe9480 httpd/cgi-bin/check
--- a/httpd/cgi-bin/check Sun Nov 28 17:44:23 2010 +0200
+++ b/httpd/cgi-bin/check Sat Dec 04 21:48:33 2010 +0200
@@ -1903,12 +1903,11 @@
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'});
Received on Saturday, 4 December 2010 19:48:40 UTC