From aca76ea6f83e4c7f7dac3ff004dfa468e83934f2 Mon Sep 17 00:00:00 2001 From: Jeff Godin Date: Thu, 29 Nov 2012 16:53:36 -0500 Subject: [PATCH] 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 996c95661b..188fec6042 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm @@ -463,6 +463,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); + } + return $self->generic_redirect( $cgi->param('redirect_to') || $acct, $cookies ); -- 2.11.0