diff options
author | Pierre Ozoux <pierre@ozoux.net> | 2017-12-08 17:36:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-08 17:36:51 +0300 |
commit | 064989ed55a24f6218a356dedef5445c6060bd20 (patch) | |
tree | b9244f6799e99a81ff566381dffe67e1d6150760 | |
parent | 2c97cca9fff03f65d3378ad24f0c2815811b33e6 (diff) | |
parent | d93ee922810b008af2da244a5bccecc842544260 (diff) |
Merge branch 'master' into imap-email
-rw-r--r-- | user_external/appinfo/info.xml | 2 | ||||
-rw-r--r-- | user_external/lib/imap.php | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/user_external/appinfo/info.xml b/user_external/appinfo/info.xml index 7bcdfd72c..faef76881 100644 --- a/user_external/appinfo/info.xml +++ b/user_external/appinfo/info.xml @@ -12,7 +12,7 @@ <bugs>https://github.com/nextcloud/apps/issues</bugs> <repository type="git">https://github.com/nextcloud/apps.git</repository> <dependencies> - <nextcloud min-version="12" max-version="12" /> + <nextcloud min-version="13" max-version="13" /> </dependencies> <version>0.4</version> <shipped>true</shipped> diff --git a/user_external/lib/imap.php b/user_external/lib/imap.php index b7bde1bd5..27fbd0878 100644 --- a/user_external/lib/imap.php +++ b/user_external/lib/imap.php @@ -56,7 +56,13 @@ class OC_User_IMAP extends \OCA\user_external\Base { $users[] = $row['userid']; } - if(count($users) === 1) { + // 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); + } + + if(count($users) === 1) { $username = $uid; $uid = $users[0]; // Check if we only want logins from ONE domain and strip the domain part from UID |