From d839ff45d1bbbb65d2e1faac1a6a62a955aabb54 Mon Sep 17 00:00:00 2001 From: Edmund von der Burg Date: Thu, 24 Mar 2011 12:40:49 +0000 Subject: auth related fixes --- perllib/FixMyStreet/App/Controller/Auth.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'perllib/FixMyStreet/App/Controller/Auth.pm') diff --git a/perllib/FixMyStreet/App/Controller/Auth.pm b/perllib/FixMyStreet/App/Controller/Auth.pm index 3d60172cf..16f0b994c 100644 --- a/perllib/FixMyStreet/App/Controller/Auth.pm +++ b/perllib/FixMyStreet/App/Controller/Auth.pm @@ -155,7 +155,12 @@ Let the user change their password. sub change_password : Local { my ( $self, $c ) = @_; - # FIXME - should be logged in + # FIXME - handle not being logged in more elegantly + unless ( $c->user ) { + $c->res->redirect( $c->uri_for('/auth') ); + $c->detach; + } + # FIXME - CSRF check here # FIXME - minimum criteria for passwords (length, contain number, etc) -- cgit v1.2.3