mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-16 05:53:00 +02:00
chpasswd.cgi: fixed for new MD5 password hashes.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
etc/system-release
|
||||
etc/issue
|
||||
etc/rc.d/init.d/smartenabler
|
||||
srv/web/ipfire/cgi-bin/chpasswd.cgi
|
||||
srv/web/ipfire/cgi-bin/hardwaregraphs.cgi
|
||||
srv/web/ipfire/cgi-bin/media.cgi
|
||||
usr/local/bin/hddshutdown
|
||||
|
||||
@@ -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