From 2abd85a6d9151f95c82656df9e6b8220e381ca03 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Thu, 1 Dec 2016 18:25:24 +0000 Subject: Add offline storing of inspect forms. This allows the inspect form to be submitted when offline, with the data saved in localStorage, the number of saved forms shown in the banner, and the forms to be uploaded when back online. It copes if you go back to a report after having submitted the form, and if the back-online submission fails due to CSRF failure, retrying once with a new token. --- perllib/FixMyStreet/App/Controller/Root.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'perllib/FixMyStreet/App/Controller/Root.pm') diff --git a/perllib/FixMyStreet/App/Controller/Root.pm b/perllib/FixMyStreet/App/Controller/Root.pm index 1df249999..20a871b17 100644 --- a/perllib/FixMyStreet/App/Controller/Root.pm +++ b/perllib/FixMyStreet/App/Controller/Root.pm @@ -108,6 +108,7 @@ sub page_error_403_access_denied : Private { sub page_error_400_bad_request : Private { my ( $self, $c, $error_msg ) = @_; + $c->forward('/auth/get_csrf_token'); $c->detach('page_error', [ $error_msg, 400 ]); } -- cgit v1.2.3