Fix to use system default hashing format for htpasswd file

https://forum.virtualmin.com/t/how-to-change-awstats-user-password/118998/
This commit is contained in:
iliajie
2023-02-01 23:45:10 +02:00
parent 198146894f
commit 3bf1718b30

View File

@@ -158,10 +158,10 @@ else {
}
}
else {
# Use built-in encryption code
my $salt = $old ||
chr(int(rand(26))+65).chr(int(rand(26))+65);
return &unix_crypt($str, $salt);
# Use built-in encryption code and use system default
my $salt = $old;
&foreign_require('useradmin');
return &useradmin::encrypt_password($str, $salt, 1);
}
}
}