[Web] Accept raw SSHA hashes as passwords

This commit is contained in:
andryyy 2020-12-07 08:07:41 +01:00
parent 02b10b0ed4
commit 3b1a87f9a7
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF

View File

@ -1055,7 +1055,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
return false;
}
// support pre hashed passwords
if(preg_match('/^{SSHA256}|{SHA512-CRYPT}|{SSHA512}|{MD5-CRYPT}|{PLAIN-MD5}/i', $password)) {
if(preg_match('/^{SSHA256}|{SSHA}|{SHA512-CRYPT}|{SSHA512}|{MD5-CRYPT}|{PLAIN-MD5}/i', $password)) {
$password_hashed = $password;
} else {
$password_hashed = hash_password($password);