Use password_hash() for passwords

- Use legacy_password to update double-hashed passwords
This commit is contained in:
Hypolite Petovan 2018-01-20 22:29:03 -05:00
parent c53c2fffa5
commit b0a764b14c
2 changed files with 36 additions and 12 deletions

View file

@ -226,7 +226,7 @@ class ExAuth
if ($a->get_hostname() == $aCommand[2]) {
$this->writeLog(LOG_INFO, 'internal auth for ' . $sUser . '@' . $aCommand[2]);
$aUser = dba::selectFirst('user', ['uid', 'password'], ['nickname' => $sUser]);
$aUser = dba::selectFirst('user', ['uid', 'password', 'legacy_password'], ['nickname' => $sUser]);
if (DBM::is_result($aUser)) {
$uid = $aUser['uid'];
$success = User::authenticate($aUser, $aCommand[3]);