]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/CGI.pm
Configure CGI.pm to disable file uploads by default.
[ikiwiki.git] / IkiWiki / CGI.pm
index 015c9ae01fbde4f3be3a85bf28f4a429fba54881..43986789a45614417f3837cf297c2840acb37455 100644 (file)
@@ -667,10 +667,11 @@ sub cgi (;$$) { #{{{
        my $q=shift;
        my $session=shift;
 
+       eval q{use CGI};
+       error($@) if $@;
+       $CGI::DISABLE_UPLOADS=1;
+
        if (! $q) {
-               eval q{use CGI};
-               error($@) if $@;
-       
                binmode(STDIN);
                $q=CGI->new;
                binmode(STDIN, ":utf8");