diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-06-30 20:01:10 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-06-30 20:01:10 -0400 |
commit | 8e43bc0e0fef57a0770ef69e9aac845ed6078dfa (patch) | |
tree | 538d63ae6867416200e35aa497b20c00d45efb6f /IkiWiki/CGI.pm | |
parent | 23eb492c60e33d16b1d0dddce7aa061c0492feb7 (diff) | |
download | ikiwiki-8e43bc0e0fef57a0770ef69e9aac845ed6078dfa.tar ikiwiki-8e43bc0e0fef57a0770ef69e9aac845ed6078dfa.tar.gz |
Configure CGI.pm to disable file uploads by default.
Diffstat (limited to 'IkiWiki/CGI.pm')
-rw-r--r-- | IkiWiki/CGI.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 015c9ae01..43986789a 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -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"); |