use IkiWiki::UserInfo;
use open qw{:utf8 :std};
use Encode;
-use CGI;
-$CGI::DISABLE_UPLOADS=1;
package IkiWiki;
# This untaint is safe because titlepage removes any problematic
# characters.
- my ($page)=$form->field('page');
+ my $page=$form->field('page');
$page=titlepage(possibly_foolish_untaint($page));
if (! defined $page || ! length $page ||
file_pruned($page, $config{srcdir}) || $page=~/^\//) {
my $q=shift;
my $session=shift;
+ eval q{use CGI};
+ error($@) if $@;
+ $CGI::DISABLE_UPLOADS=$config{cgi_disable_uploads};
+
if (! $q) {
binmode(STDIN);
$q=CGI->new;