summaryrefslogtreecommitdiffstats
path: root/etc/inc/auth.inc
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2015-01-12 11:43:21 +0100
committerErmal LUÇI <eri@pfsense.org>2015-01-12 11:43:21 +0100
commitc80ad8a892a291e7f76be95be0242e9f1fe24aaf (patch)
tree3f88ae4eb2c6cb59615ac9e2256b9b333417a06e /etc/inc/auth.inc
parent5cd24cf110ed3b5919922de4437ea3344f54eaea (diff)
downloadpfsense-c80ad8a892a291e7f76be95be0242e9f1fe24aaf.zip
pfsense-c80ad8a892a291e7f76be95be0242e9f1fe24aaf.tar.gz
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.
Diffstat (limited to 'etc/inc/auth.inc')
-rw-r--r--etc/inc/auth.inc6
1 files changed, 2 insertions, 4 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index a125741..ceaa9e5 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -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;
}
OpenPOWER on IntegriCloud