aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Auth.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Auth.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Auth.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Auth.pm b/perllib/FixMyStreet/App/Controller/Auth.pm
index 66cf3979c..63bf91ff5 100644
--- a/perllib/FixMyStreet/App/Controller/Auth.pm
+++ b/perllib/FixMyStreet/App/Controller/Auth.pm
@@ -155,6 +155,11 @@ sub token : Path('/M') : Args(1) {
return;
}
+ if ( $token_obj->created < DateTime->now->subtract( days => 1 ) ) {
+ $c->stash->{token_not_found} = 1;
+ return;
+ }
+
# Sign out in case we are another user
$c->logout();