Revision 6bce748c
Von Moritz Bunkus vor mehr als 12 Jahren hinzugefügt
SL/Auth.pm | ||
---|---|---|
102 | 102 |
my $self = shift; |
103 | 103 |
|
104 | 104 |
map { $self->{$_} = $::lx_office_conf{authentication}->{$_} } keys %{ $::lx_office_conf{authentication} }; |
105 |
|
|
106 |
# Prevent password leakage to log files when dumping Auth instances. |
|
107 |
$self->{admin_password} = sub { $::lx_office_conf{authentication}->{admin_password} }; |
|
108 |
|
|
105 | 109 |
$self->{DB_config} = $::lx_office_conf{'authentication/database'}; |
106 | 110 |
$self->{LDAP_config} = $::lx_office_conf{'authentication/ldap'}; |
107 | 111 |
|
... | ... | |
143 | 147 |
my ($self, $password) = @_; |
144 | 148 |
|
145 | 149 |
$password = SL::Auth::Password->hash_if_unhashed(login => 'root', password => $password); |
146 |
my $admin_password = SL::Auth::Password->hash_if_unhashed(login => 'root', password => $self->{admin_password}); |
|
150 |
my $admin_password = SL::Auth::Password->hash_if_unhashed(login => 'root', password => $self->{admin_password}->());
|
|
147 | 151 |
|
148 | 152 |
$main::lxdebug->leave_sub(); |
149 | 153 |
|
Auch abrufbar als: Unified diff
Admin-Passwort in Closure speichern, um versehentliche Ausgabe beim Dumpen zu vermeiden