0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00

Merge pull request #592 from bnchdan/master

Update PFACrypt.php
This commit is contained in:
David Goodwin 2022-02-09 09:32:38 +00:00 committed by GitHub
commit f0df017df3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,6 +60,17 @@ class PFACrypt
$algorithm = $method_in_hash;
}
}
if (!empty($pw_db) && preg_match('/^\$[0-9]\$/i', $pw_db, $matches)) {
$method_in_hash = $matches[0];
switch ($method_in_hash){
case '$1$':
case '$6$':
$algorithm='SYSTEM';
}
}
if ($algorithm == 'SHA512CRYPT.B64') {
$algorithm = 'SHA512-CRYPT.B64';
}