summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-03-09 00:13:51 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-03-09 00:13:51 +0100
commit7206292163b122ef61946e748e71be5949723881 (patch)
treeff405cba5461181444d975b0d4a5338e8fdde329
parent8c4df88032fbea46e2d95f5ac716d26fbf982c54 (diff)
fix timeout on unauthenticated access to account-specific pages
-rwxr-xr-xindex.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/index.pl b/index.pl
index 78719f5..dfc3358 100755
--- a/index.pl
+++ b/index.pl
@@ -1162,7 +1162,11 @@ post '/action' => sub {
under sub {
my ($self) = @_;
- return $self->is_user_authenticated;
+ if ( $self->is_user_authenticated ) {
+ return 1;
+ }
+ $self->render('login');
+ return undef;
};
get '/account' => sub {