mirror of
https://github.com/webmin/webmin.git
synced 2025-08-16 14:51:18 +00:00
Move check for force change support before actually updating the user
This commit is contained in:
@ -63,6 +63,14 @@ if ($in{'pass_def'} == 0) {
|
||||
}
|
||||
}
|
||||
|
||||
# Validate force change
|
||||
if ($in{'temp'}) {
|
||||
&get_miniserv_config(\%miniserv);
|
||||
$miniserv{'passwd_mode'} == 2 ||
|
||||
&error(&text('save_etemp', '../webmin/edit_session.cgi'));
|
||||
}
|
||||
|
||||
|
||||
# Find logged-in webmin user
|
||||
foreach $u (@ulist) {
|
||||
if ($u->{'name'} eq $base_remote_user) {
|
||||
@ -315,11 +323,6 @@ elsif ($in{'lock'} && $user{'pass'} !~ /^\!/ && $in{'pass_def'} <= 1) {
|
||||
|
||||
# Check for force change
|
||||
$user{'temppass'} = $in{'temp'};
|
||||
if ($in{'temp'}) {
|
||||
&get_miniserv_config(\%miniserv);
|
||||
$miniserv{'passwd_mode'} == 2 ||
|
||||
&error(&text('save_etemp', '../webmin/edit_session.cgi'));
|
||||
}
|
||||
|
||||
if ($in{'old'}) {
|
||||
# update user and all ACLs
|
||||
|
Reference in New Issue
Block a user