mirror of
https://github.com/webmin/webmin.git
synced 2026-08-08 00:40:37 +01:00
Use correct function to validate a password https://github.com/webmin/webmin/issues/1324
This commit is contained in:
@@ -38,8 +38,8 @@ if (!$in{'pam'} && !$wuser) {
|
||||
|
||||
if ($wuser) {
|
||||
# Update Webmin user's password
|
||||
$enc = &acl::encrypt_password($in{'old'}, $wuser->{'pass'});
|
||||
$enc eq $wuser->{'pass'} || &pass_error($text{'password_eold'});
|
||||
$ok = &acl::validate_password($in{'old'}, $wuser->{'pass'});
|
||||
$ok || &pass_error($text{'password_eold'});
|
||||
$perr = &acl::check_password_restrictions($in{'user'}, $in{'new1'});
|
||||
$perr && &pass_error(&text('password_enewpass', $perr));
|
||||
$wuser->{'pass'} = &acl::encrypt_password($in{'new1'});
|
||||
|
||||
Reference in New Issue
Block a user