From: Jeff Godin Date: Thu, 29 Nov 2012 21:53:36 +0000 (-0500) Subject: LP#1013786: Suggest password change on login if 4 digit PIN X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7e8d0a8cf4766bec976c200d692f29ca4ae37459;p=working%2FEvergreen.git LP#1013786: Suggest password change on login if 4 digit PIN Suggest that the user change their password at login if the password is a four digit PIN. Do this by redirecting to the update_password page with a CGI param to trigger an optional message. Signed-off-by: Jeff Godin --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm index 907ae8bec0..e7e614824f 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm @@ -625,6 +625,14 @@ sub load_login { ) ]; + # test for four-digit PIN as password -- suggest password change + if ($password =~ m/^\d{4}$/) { + my $update_password = sprintf( + 'https://%s%s/myopac/update_password?initial=1', + $self->apache->hostname, $self->ctx->{opac_root} ); + return $self->generic_redirect($update_password, $cookies); + } + if ($client_tz) { # contains the client's tz, as passed by the client # trigger a redirect to https