diff options
Diffstat (limited to 'lib/private/Collaboration/Collaborators/MailPlugin.php')
-rw-r--r-- | lib/private/Collaboration/Collaborators/MailPlugin.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/private/Collaboration/Collaborators/MailPlugin.php b/lib/private/Collaboration/Collaborators/MailPlugin.php index 9e35aa828da..53a223b38dd 100644 --- a/lib/private/Collaboration/Collaborators/MailPlugin.php +++ b/lib/private/Collaboration/Collaborators/MailPlugin.php @@ -247,11 +247,14 @@ class MailPlugin implements ISearchPlugin { $userResults['wide'] = array_slice($userResults['wide'], $offset, $limit); } + [$username, $domain] = explode('@', $search); + $domain = idn_to_ascii($domain); + $searchIdn = $username . '@' . $domain; - if (!$searchResult->hasExactIdMatch($emailType) && filter_var($search, FILTER_VALIDATE_EMAIL)) { + if (!$searchResult->hasExactIdMatch($emailType) && filter_var($searchIdn, FILTER_VALIDATE_EMAIL)) { $result['exact'][] = [ 'label' => $search, - 'uuid' => $search, + 'uuid' => $searchIdn, 'value' => [ 'shareType' => IShare::TYPE_EMAIL, 'shareWith' => $search, |