Commit e02945f8 authored by IKEDA Soji's avatar IKEDA Soji
Browse files

Additional change to #398: Log traceback to track bug.

parent 3fb13ff3
...@@ -645,12 +645,15 @@ sub update_global_user { ...@@ -645,12 +645,15 @@ sub update_global_user {
## avoid rehashing passwords that are already hash strings ## avoid rehashing passwords that are already hash strings
if ($values->{'password'}) { if ($values->{'password'}) {
if (defined(hash_type($values->{'password'}))) { if (defined(hash_type($values->{'password'}))) {
$log->syslog('debug', $log->syslog(
'password is in %s format, not rehashing', 'err',
hash_type($values->{'password'})); 'Bug in logic: Password is in %s format, not rehashing',
hash_type($values->{'password'})
);
} else { } else {
$values->{'password'} = $values->{'password'} =
Sympa::User::password_fingerprint($values->{'password'}, undef); Sympa::User::password_fingerprint($values->{'password'},
undef);
} }
} }
...@@ -733,12 +736,15 @@ sub add_global_user { ...@@ -733,12 +736,15 @@ sub add_global_user {
## avoid rehashing passwords that are already hash strings ## avoid rehashing passwords that are already hash strings
if ($values->{'password'}) { if ($values->{'password'}) {
if (defined(hash_type($values->{'password'}))) { if (defined(hash_type($values->{'password'}))) {
$log->syslog('debug', $log->syslog(
'password is in %s format, not rehashing', 'err',
hash_type($values->{'password'})); 'Bug in logic. Password is in %s format, not rehashing',
hash_type($values->{'password'})
);
} else { } else {
$values->{'password'} = $values->{'password'} =
Sympa::User::password_fingerprint($values->{'password'}, undef); Sympa::User::password_fingerprint($values->{'password'},
undef);
} }
} }
......
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