From 4d5e5aa28c3d1e2dc9c452321dbe6fc9c68a4709 Mon Sep 17 00:00:00 2001 From: ralf Date: Tue, 14 Nov 2023 16:42:27 +0200 Subject: [PATCH] also allow IMAP type derived from Dovecot like EGroupware Mail --- api/src/Mail/Credentials.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Mail/Credentials.php b/api/src/Mail/Credentials.php index c4f383860e..081843a8aa 100644 --- a/api/src/Mail/Credentials.php +++ b/api/src/Mail/Credentials.php @@ -299,7 +299,7 @@ class Credentials public static function from_session(array $data, $set_identity=true) { // if the username contains non-ascii chars, try email address, as Dovecot does NOT deal with non-ascii usernames - if ($data['acc_imap_type'] === Api\Mail\Imap\Dovecot::class && + if (is_a($data['acc_imap_type'], Api\Mail\Imap\Dovecot::class, true) && in_array($data['acc_imap_logintype'], ['standard', 'vmailmgr']) && preg_match('/[^\x20-\x7e]/', $GLOBALS['egw_info']['user']['account_lid'])) {