disable cgi uploads earlier

This allows plugins that want to enable uploads to do so by changing the
value of $CGI::DISABLE_UPLOADS at some point before the cgi hook is run.
master
Joey Hess 2008-06-30 21:13:41 -04:00
parent e1d9747be1
commit dbab5e9b85
1 changed files with 2 additions and 4 deletions

View File

@ -6,6 +6,8 @@ use IkiWiki;
use IkiWiki::UserInfo;
use open qw{:utf8 :std};
use Encode;
use CGI;
$CGI::DISABLE_UPLOADS=1;
package IkiWiki;
@ -666,10 +668,6 @@ sub cgi (;$$) { #{{{
my $q=shift;
my $session=shift;
eval q{use CGI};
error($@) if $@;
$CGI::DISABLE_UPLOADS=1;
if (! $q) {
binmode(STDIN);
$q=CGI->new;