[Web] Implement MD5-CRYPT verification, fixes #1665
parent
8056ed21af
commit
5db40bf688
|
@ -266,6 +266,12 @@ function verify_hash($hash, $password) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
elseif (preg_match('/^{MD5-CRYPT}/i', $hash)) {
|
||||||
|
$hash = preg_replace('/^{MD5-CRYPT}/i', '', $hash);
|
||||||
|
if (password_verify($password, $hash)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
function check_login($user, $pass) {
|
function check_login($user, $pass) {
|
||||||
|
|
Loading…
Reference in New Issue