projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e1d9747
)
disable cgi uploads earlier
author
Joey Hess
<joey@kodama.kitenet.net>
Tue, 1 Jul 2008 01:13:41 +0000
(21:13 -0400)
committer
Joey Hess
<joey@kodama.kitenet.net>
Tue, 1 Jul 2008 01:13:41 +0000
(21:13 -0400)
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.
IkiWiki/CGI.pm
patch
|
blob
|
history
diff --git
a/IkiWiki/CGI.pm
b/IkiWiki/CGI.pm
index 2c4590babcc7f0e4a81b19c5d10641dad22d9eba..0d010b1150d3e5c5ee94028821c05d0558ee5f73 100644
(file)
--- a/
IkiWiki/CGI.pm
+++ b/
IkiWiki/CGI.pm
@@
-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;