Skip to content

Commit

Permalink
Handle hang when changing password
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Jun 12, 2023
1 parent 5394d9f commit d21fc10
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion virtualmin-mailman-lib.pl
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,9 @@ sub set_django_superuser_pass
print $fh $pass,"\n";
close($fh);
my $perl = &get_perl_path();
my $out = &backquote_logged("$perl $module_root_directory/pty.pl --sleep 1 $wcmd changepassword ".quotemeta($user)." <$temp 2>&1");
sleep(10);
my $out = &backquote_with_timeout("$perl $module_root_directory/pty.pl --sleep 1 $wcmd changepassword ".quotemeta($user)." <$temp 2>&1", 5);
$out =~ s/^PTY\s+PID:\s+\d+\s*//;
return $? ? $out : undef;
}

Expand Down

0 comments on commit d21fc10

Please sign in to comment.