mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
chpasswd.cgi: fixed for new MD5 password hashes.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
###############################################################################
|
||||
|
||||
use CGI qw(param);
|
||||
use Crypt::PasswdMD5;
|
||||
|
||||
$swroot = "/var/ipfire";
|
||||
|
||||
@@ -98,7 +99,10 @@ if ($cgiparams{'SUBMIT'} eq $tr{'advproxy chgwebpwd change password'})
|
||||
$errormessage = $tr{'advproxy errmsg invalid user'};
|
||||
goto ERROR;
|
||||
}
|
||||
if (!(crypt($cgiparams{'OLD_PASSWORD'}, $cryptpwd) eq $cryptpwd))
|
||||
if (
|
||||
!(crypt($cgiparams{'OLD_PASSWORD'}, $cryptpwd) eq $cryptpwd) &&
|
||||
!(apache_md5_crypt($cgiparams{'OLD_PASSWORD'}, $cryptpwd) eq $cryptpwd)
|
||||
)
|
||||
{
|
||||
$errormessage = $tr{'advproxy errmsg password incorrect'};
|
||||
goto ERROR;
|
||||
|
||||
Reference in New Issue
Block a user