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
parent
e1d9747be1
commit
dbab5e9b85
|
@ -6,6 +6,8 @@ use IkiWiki;
|
||||||
use IkiWiki::UserInfo;
|
use IkiWiki::UserInfo;
|
||||||
use open qw{:utf8 :std};
|
use open qw{:utf8 :std};
|
||||||
use Encode;
|
use Encode;
|
||||||
|
use CGI;
|
||||||
|
$CGI::DISABLE_UPLOADS=1;
|
||||||
|
|
||||||
package IkiWiki;
|
package IkiWiki;
|
||||||
|
|
||||||
|
@ -666,10 +668,6 @@ sub cgi (;$$) { #{{{
|
||||||
my $q=shift;
|
my $q=shift;
|
||||||
my $session=shift;
|
my $session=shift;
|
||||||
|
|
||||||
eval q{use CGI};
|
|
||||||
error($@) if $@;
|
|
||||||
$CGI::DISABLE_UPLOADS=1;
|
|
||||||
|
|
||||||
if (! $q) {
|
if (! $q) {
|
||||||
binmode(STDIN);
|
binmode(STDIN);
|
||||||
$q=CGI->new;
|
$q=CGI->new;
|
||||||
|
|
Loading…
Reference in New Issue