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 d8827da73f
commit b990c00207

View File

@ -210,6 +210,12 @@ class Credentials
$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);
// 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;
}
}
}