mirror of
https://github.com/v2board/v2board.git
synced 2025-01-11 00:29:09 +08:00
support multi password hash verify
This commit is contained in:
parent
241cbd3016
commit
5e7e42e52c
@ -192,7 +192,7 @@ class AuthController extends Controller
|
|||||||
switch($algo) {
|
switch($algo) {
|
||||||
case 'md5': return md5($password) === $hash;
|
case 'md5': return md5($password) === $hash;
|
||||||
case 'sha256': return hash('sha256', $password) === $hash;
|
case 'sha256': return hash('sha256', $password) === $hash;
|
||||||
default: return password_hash($password, PASSWORD_DEFAULT) === $hash;
|
default: return password_verify($password, $hash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user