]> iEval git - gruntmaster-page.git/commitdiff
Merge branch 'master' into mindcoding
authorMarius Gavrilescu <marius@ieval.ro>
Thu, 13 Feb 2014 16:17:25 +0000 (18:17 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Thu, 13 Feb 2014 16:17:25 +0000 (18:17 +0200)
1  2 
app.psgi

diff --combined app.psgi
index 75076cb46b256ccba264c5aa1b7a9406f03496c9,62a6f790815f47cbac9fa032b6fce550314c392e..c470f30dd8abbe714c5887210f44e1d6c635371f
+++ b/app.psgi
@@@ -11,7 -11,7 +11,7 @@@ use Digest::SHA qw/sha256/
  use Log::Log4perl;
  
  use constant ACCESSLOG_FORMAT => '%{X-Forwarded-For}i|%h %u "%r" %>s %b "%{Referer}i" "%{User-agent}i"';
 -use constant CONTENT_SECURITY_POLICY => q,default-src 'none'; script-src 'self' www.google-analytics.com; style-src 'self'; img-src 'self'; connect-src 'self',;
 +use constant CONTENT_SECURITY_POLICY => q,default-src 'none'; script-src 'self' www.google-analytics.com; style-src 'self'; img-src 'self' www.google-analytics.com; connect-src 'self',;
  
  $Apache2::AuthzCaps::rootdir = $Apache2::Authen::Passphrase::rootdir;
  my $word = qr,(\w+),a;
@@@ -24,6 -24,7 +24,7 @@@ sub debug 
  sub some_auth_required {
        my $r = Plack::Request->new($_[0]);
        return 1 if $_[0]->{'gruntmaster.reqadmin'} || $r->path eq '/action/passwd' || $r->path =~ m,/pb/$word/submit$,;
+       return 1 if $r->path =~ m,^/ct/$word/pb/$word, && time < contest_end $1;
        0
  }
  
@@@ -39,7 -40,7 +40,7 @@@ sub admin_required 
  sub require_admin {
        my $app = $_[0];
        sub {
-               *__ANON__ = "require_admin_middleware";
+               local *__ANON__ = "require_admin_middleware";
                my $env = $_[0];
                my $r = Plack::Request->new($env);
                $env->{'gruntmaster.reqadmin'} = 1 if admin_required $r->path;
This page took 0.029925 seconds and 4 git commands to generate.