mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
fix: filter out contacts with invalid email addresses in sharee completion
Signed-off-by: Julius Knorr <jus@bitgrid.net>
This commit is contained in:
parent
48e6dbc407
commit
c59a2e6316
1 changed files with 5 additions and 0 deletions
|
|
@ -100,6 +100,11 @@ class MailPlugin implements ISearchPlugin {
|
|||
$emailAddress = $emailAddressData['value'];
|
||||
$emailAddressType = $emailAddressData['type'];
|
||||
}
|
||||
|
||||
if (!filter_var($emailAddress, FILTER_VALIDATE_EMAIL)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isset($contact['FN'])) {
|
||||
$displayName = $contact['FN'] . ' (' . $emailAddress . ')';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue