Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/apps.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-11-23 13:52:00 +0300
committerGitHub <noreply@github.com>2017-11-23 13:52:00 +0300
commitb75d574ec4c52662cf4809662ddd8144f901f919 (patch)
tree97b24e67323e81a9c7f9cc329d981d06d16979b5
parent782af4b65cdf9a963ff38054fb74dab61201f176 (diff)
parent2ab06017b868c455b7b69b6148e25e3d61bc1b9f (diff)
Merge pull request #35 from MarvAmBass/patch-1
handle escaped @ symbol fixes Apple AddressBook problems
-rw-r--r--user_external/lib/imap.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/user_external/lib/imap.php b/user_external/lib/imap.php
index 4c5c57a78..d98b29953 100644
--- a/user_external/lib/imap.php
+++ b/user_external/lib/imap.php
@@ -46,6 +46,12 @@ class OC_User_IMAP extends \OCA\user_external\Base {
return false;
}
+ // Replace escaped @ symbol in uid (which is a mail address)
+ // but only if there is no @ symbol and if there is a %40 inside the uid
+ if (!(strpos($uid, '@') !== false) && (strpos($uid, '%40') !== false)) {
+ $uid = str_replace("%40","@",$uid);
+ }
+
// Check if we only want logins from ONE domain and strip the domain part from UID
if($this->domain != '') {
$pieces = explode('@', $uid);