Commit 7422e648 authored by IKEDA Soji's avatar IKEDA Soji
Browse files

Get rid of meaningless initial password for user account using tmp_passwd()

parent 746aae5a
......@@ -3994,44 +3994,8 @@ sub sendssopasswd {
 
my $url_redirect;
 
if ($param->{'newuser'} = Sympa::User::get_global_user($email)) {
## Create a password if none
unless ($param->{'newuser'}{'password'}) {
unless (
Sympa::User::update_global_user(
$email,
{ 'password' =>
Sympa::Tools::Password::tmp_passwd($email)
}
)
) {
Sympa::WWW::Report::reject_report_web('intern',
'db_update_failed',
{}, $param->{'action'}, '', $param->{'user'}{'email'},
$robot);
wwslog('info', 'Update failed');
web_db_log(
{ 'parameters' => $email,
'target_email' => $email,
'status' => 'error',
'error_type' => "internal"
}
);
return undef;
}
$param->{'newuser'}{'password'} =
Sympa::Tools::Password::tmp_passwd($email);
}
} else {
$param->{'newuser'} = {
'email' => $email,
'password' => Sympa::Tools::Password::tmp_passwd($email)
};
}
$param->{'newuser'} =
Sympa::User::get_global_user($email) || {'email' => $email};
 
$param->{'init_passwd'} = 1
if ($param->{'user'}{'password'} =~ /^init/);
......
......@@ -117,12 +117,6 @@ sub new {
}
}
}
unless ($data->{'user'}{'password'}) {
$data->{'user'}{'password'} =
Sympa::Tools::Password::tmp_passwd($who);
}
}
# Lang
......
......@@ -141,8 +141,6 @@ sub _twist {
my $user = Sympa::User->new($email);
$user->lang($list->{'admin'}{'lang'}) unless $user->lang;
$user->password(Sympa::Tools::Password::tmp_passwd($email))
unless $user->password;
$user->save;
## Now send the welcome file to the user if it exists and notification
......
......@@ -142,8 +142,6 @@ sub _twist {
my $user = Sympa::User->new($email);
$user->lang($list->{'admin'}{'lang'}) unless $user->lang;
$user->password(Sympa::Tools::Password::tmp_passwd($email))
unless $user->password;
$user->save;
## Now send the welcome file to the user
......
......@@ -35,15 +35,8 @@ BEGIN { eval 'use Data::Password'; }
use Conf;
use Sympa::Language;
sub tmp_passwd {
my $email = shift;
my $cookie = $Conf::Conf{'cookie'};
$cookie = '' unless defined $cookie;
return (
'init' . substr(Digest::MD5::md5_hex(join '/', $cookie, $email), -8));
}
# Deprecated. No longer used.
#sub tmp_passwd;
# No longer used, Use _decrypt_rc4_password() in upgrade_sympa_password.pl.
#sub ciphersaber_installed;
......
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