From 7a847b5fba54a7b4d318bafc54a0b7e266696ed8 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Tue, 21 Nov 2017 15:05:30 +0100 Subject: [PATCH 1/3] Update user_external info to 13 Signed-off-by: Morris Jobke --- appinfo/info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index 7bcdfd7..faef768 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -12,7 +12,7 @@ https://github.com/nextcloud/apps/issues https://github.com/nextcloud/apps.git - + 0.4 true From 90a3107edd4f545df0ec4c08927182b5a2ade8de Mon Sep 17 00:00:00 2001 From: Marvin Date: Sun, 25 Jun 2017 23:34:32 +0200 Subject: [PATCH 2/3] handle escaped @ symbol fixes Apple AddressBook problems Signed-off-by: Marvin Winkler --- lib/imap.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/imap.php b/lib/imap.php index 4c5c57a..d98b299 100644 --- a/lib/imap.php +++ b/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); From 8bbcdb4b5c479ff6cf35d5b40f8b81751fd71a3b Mon Sep 17 00:00:00 2001 From: Marvin Date: Sun, 25 Jun 2017 23:34:32 +0200 Subject: [PATCH 3/3] handle escaped @ symbol fixes Apple AddressBook problems Signed-off-by: Marvin Winkler --- lib/imap.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/imap.php b/lib/imap.php index 4c5c57a..d98b299 100644 --- a/lib/imap.php +++ b/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);