From 7e8d0a8cf4766bec976c200d692f29ca4ae37459 Mon Sep 17 00:00:00 2001 From: Jeff Godin Date: Thu, 29 Nov 2012 16:53:36 -0500 Subject: [PATCH] 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 --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 2.11.0