Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow an alternative domain splitter for IMAP authentication #151

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add domainSplitter: check if replace is still necessary
Signed-off-by: Peter Vanpoucke <peter.vanpoucke@rw3.be>
Peter Vanpoucke authored and peter-vanpoucke committed May 24, 2020
commit 96b712f9fcd73a5b2b1f1dbdfb55c31f6c2faed3
4 changes: 3 additions & 1 deletion lib/imap.php
Original file line number Diff line number Diff line change
@@ -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);
}