mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
Update functions.inc.php
$conf['encrypt'] = 'dovecot:CRAM-MD5' never success ! function _pacrypt_dovecot() will be never used See my propose to run with dovecot:CRYPT-METHOD
This commit is contained in:
parent
0344e729d0
commit
e53b5e8a58
@ -1295,7 +1295,7 @@ function pacrypt($pw, $pw_db = "")
|
||||
|
||||
if (!empty($pw_db) && preg_match('/^{([0-9a-z-\.]+)}/i', $pw_db, $matches)) {
|
||||
$method_in_hash = $matches[1];
|
||||
if ('COURIER:' . strtoupper($method_in_hash) == $mechanism) {
|
||||
if ( 'DOVECOT:' . strtoupper($method_in_hash) == $mechanism || 'COURIER:' . strtoupper($method_in_hash) == $mechanism) {
|
||||
// don't try and be clever.
|
||||
} elseif ($mechanism != $method_in_hash) {
|
||||
error_log("PostfixAdmin: configured to use $mechanism, but asked to crypt password using {$method_in_hash}; are you migrating algorithm/mechanism or is something wrong?");
|
||||
@ -1328,7 +1328,7 @@ function pacrypt($pw, $pw_db = "")
|
||||
}
|
||||
|
||||
if (preg_match('/^DOVECOT:(.*)$/i', $mechanism, $matches)) {
|
||||
$mechanism = strtoupper($matches[1]);
|
||||
return _pacrypt_dovecot($pw, $pw_db);
|
||||
}
|
||||
|
||||
if (empty($pw_db)) {
|
||||
|
Loading…
Reference in New Issue
Block a user