[Web] Implement MD5-CRYPT verification, fixes #1665

master
André 2018-09-20 10:25:36 +02:00
parent 8056ed21af
commit 5db40bf688
1 changed files with 6 additions and 0 deletions

View File

@ -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) {