Commit 18bdba2a authored by IKEDA Soji's avatar IKEDA Soji
Browse files

Notify listmaster if encrypted passwords are kept in user_table.

parent f4e33b4a
......@@ -65,6 +65,11 @@ Subject: [% FILTER qencode %][%|loc%]Upgrade procedures failed[%END%][%END%]
[%|loc%]Check log file for further details.[%END%]
[% ELSIF type == 'password_encrypted' -%]
Subject: [% FILTER qencode %][%|loc%]Password should be rehashed[%END%][%END%]
[%|loc%]Password in database seems encrypted. Run upgrade_sympa_password.pl to rehash passwords.[%END%]
[% ELSIF type == 'db_struct_updated' -%]
Subject: [% FILTER qencode %][%|loc%]Database structure updated[%END%][%END%]
X-Sympa-NoWrap: yes
......
......@@ -152,6 +152,15 @@ sub authentication {
## the user passwords
## Other backends are Single Sign-On solutions
if ($auth_service->{'auth_type'} eq 'user_table') {
# Old style RC4 encrypted password.
if ($user->{'password'} and $user->{'password'} =~ /\Acrypt[.]/) {
$log->syslog('notice',
'Password in database seems encrypted. Run upgrade_sympa_password.pl to rehash passwords'
);
Sympa::send_notify_to_listmaster('*', 'password_encrypted');
return undef;
}
my $fingerprint =
Sympa::User::password_fingerprint($pwd, $user->{'password'});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment