do NOT attempt to use credentials encrypted with user password in an async context

(where user password is not available)
otherwise an s/mime certificate or user specific password will stall sending notification, even if no smtp authentication required
This commit is contained in:
ralf 2022-03-28 17:58:41 +03:00
parent 9a07c4a1dd
commit 4f3e9fa06c

View File

@ -210,6 +210,12 @@ class Credentials
$on_login = array(__CLASS__.'::migrate', $acc_id); $on_login = array(__CLASS__.'::migrate', $acc_id);
} }
} }
// do NOT attempt to use credentials encrypted with user password in an async context (where user password is not available)
// otherwise an s/mime certificate or user specific password will stall sending notification, even if no smtp authentication required
if (!empty($GLOBALS['egw_info']['flags']['async-service']) && in_array($row['cred_pw_enc'], [self::USER_AES, self::USER]))
{
continue;
}
$password = self::decrypt($row); $password = self::decrypt($row);
// Remove special x char added to the end for \0 trimming escape. // Remove special x char added to the end for \0 trimming escape.
@ -833,4 +839,4 @@ class Credentials
{ {
return isset($GLOBALS['egw_setup']) ? $GLOBALS['egw_setup']->db : $GLOBALS['egw']->db; return isset($GLOBALS['egw_setup']) ? $GLOBALS['egw_setup']->db : $GLOBALS['egw']->db;
} }
} }