0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00
This commit is contained in:
David Goodwin 2020-08-06 19:42:34 +01:00
parent c3d5b26740
commit 57a4787473

View File

@ -1029,6 +1029,7 @@ function _pacrypt_dovecot($pw, $pw_db = '') {
fwrite($pipes[0], $pw . "\n", 1+strlen($pw));
usleep(1000);
}
fwrite($pipes[0], $pw . "\n", 1+strlen($pw));
fclose($pipes[0]);
@ -1037,8 +1038,8 @@ function _pacrypt_dovecot($pw, $pw_db = '') {
// Read hash from pipe stdout
$password = fread($pipes[1], 200);
if (empty($password)) {
error_log("Failed to read password from $dovecotpw ... stderr: $stderr_output ");
if (!empty($stderr_output) || empty($password)) {
error_log("Failed to read password from $dovecotpw ... stderr: $stderr_output, password: $password ");
throw new Exception("$dovecotpw failed, see error log for details");
}