mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Do not override the passwd string. First it prevents the md5 working if the crypt() check fails and also is useless to override it since the parameter is passed by value and not by reference.
This commit is contained in:
parent
21165e6455
commit
545c4435ef
@ -302,15 +302,13 @@ function local_backed($username, $passwd) {
|
||||
|
||||
if ($user['password'])
|
||||
{
|
||||
$passwd = crypt($passwd, $user['password']);
|
||||
if ($passwd == $user['password'])
|
||||
if (crypt($passwd, $user['password']) == $user['password'])
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($user['md5-hash'])
|
||||
{
|
||||
$passwd = md5($passwd);
|
||||
if ($passwd == $user['md5-hash'])
|
||||
if (md5($passwd) == $user['md5-hash'])
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user