1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2025-01-10 04:18:10 +02:00

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

This commit is contained in:
André 2018-09-20 10:25:36 +02:00
parent 8056ed21af
commit 5db40bf688

View File

@ -266,6 +266,12 @@ function verify_hash($hash, $password) {
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;
}
function check_login($user, $pass) {