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:
parent
8056ed21af
commit
5db40bf688
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user