From 96b712f9fcd73a5b2b1f1dbdfb55c31f6c2faed3 Mon Sep 17 00:00:00 2001 From: Peter Vanpoucke Date: Sun, 24 May 2020 15:38:23 +0200 Subject: [PATCH] Add domainSplitter: check if replace is still necessary Signed-off-by: Peter Vanpoucke --- lib/imap.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/imap.php b/lib/imap.php index a88c15c..42c490c 100644 --- a/lib/imap.php +++ b/lib/imap.php @@ -61,7 +61,9 @@ public function checkPassword($uid, $password) { // Replace escaped splitter in uid // but only if there is no splitter symbol and if there is a escaped splitter inside the uid - if (!(strpos($uid, $this->domainSplitter) !== false) && (strpos($uid, $domainSplitterEncoded) !== false)) { + if (($this->domainSplitter != $domainSplitterEncoded) + && !(strpos($uid, $this->domainSplitter) !== false) + && (strpos($uid, $domainSplitterEncoded) !== false)) { $uid = str_replace($domainSplitterEncoded,$this->domainSplitter,$uid); }