mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
Update PFACrypt.php
if you have old hashes like $nr$salt$hash and you migrate to {algoithm}hash
This commit is contained in:
parent
ec6e974f10
commit
51673118bb
@ -60,6 +60,17 @@ class PFACrypt
|
|||||||
$algorithm = $method_in_hash;
|
$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') {
|
if ($algorithm == 'SHA512CRYPT.B64') {
|
||||||
$algorithm = 'SHA512-CRYPT.B64';
|
$algorithm = 'SHA512-CRYPT.B64';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user