Commit 3affa32b authored by Mic Kaczmarczik's avatar Mic Kaczmarczik
Browse files

Use "undef" instead of empty string when calling...

Use "undef" instead of empty string when calling Sympa::User::password_fingerprint without a previous password hash
parent 696298ad
......@@ -92,7 +92,7 @@ while (my $user = $sth->fetchrow_hashref('NAME_lc')) {
q{UPDATE user_table
SET password_user = ?
WHERE email_user = ?},
Sympa::User::password_fingerprint($clear_password, ''),
Sympa::User::password_fingerprint($clear_password, undef),
$user->{'email_user'}
)
) {
......
......@@ -564,7 +564,7 @@ sub update_global_user {
## use hash fingerprint to store password
## hashes that use salts will randomly generate one
$values->{'password'} =
Sympa::User::password_fingerprint($values->{'password'},'')
Sympa::User::password_fingerprint($values->{'password'}, undef)
if ($values->{'password'});
## Canonicalize lang if possible.
......@@ -642,9 +642,9 @@ sub add_global_user {
my ($field, $value);
## encrypt password with the configured password hash algorithm
## an empty salt means generate a new random one
## an salt of 'undef' means generate a new random one
$values->{'password'} =
Sympa::User::password_fingerprint($values->{'password'},'')
Sympa::User::password_fingerprint($values->{'password'}, undef)
if ($values->{'password'});
## Canonicalize lang if possible
......
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