]> git.sesse.net Git - pr0n/commitdiff
Password-protect the upload form, so that the browser does not need to send the first...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 6 Jun 2016 11:33:44 +0000 (13:33 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 6 Jun 2016 11:33:44 +0000 (13:33 +0200)
perl/Sesse/pr0n/UploadForm.pm

index 8eb73a7de7b27af49c794ecc86f88361a0e026ac..0c3a9068b6361c48437f682cd0f4636b395d0d6b 100644 (file)
@@ -20,6 +20,9 @@ sub handler {
                or return error($r, "Could not extract event");
        my $event = $1;
 
+       my ($user,$takenby) = Sesse::pr0n::Common::check_access($r);
+       return Sesse::pr0n::Common::generate_401($r) if (!defined($user));
+
        my $res = Plack::Response->new(200);
        $res->content_type("text/html; charset=utf-8");
        my $io = IO::String->new;