Skip to content

Commit fbb75c5

Browse files
juliusknorrbackportbot[bot]
authored andcommitted
fix: filter out contacts with invalid email addresses in sharee completion
Signed-off-by: Julius Knorr <jus@bitgrid.net>
1 parent a99e807 commit fbb75c5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/private/Collaboration/Collaborators/MailPlugin.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ public function search($search, $limit, $offset, ISearchResult $searchResult): b
121121
$emailAddress = $emailAddressData['value'];
122122
$emailAddressType = $emailAddressData['type'];
123123
}
124+
125+
if (!filter_var($emailAddress, FILTER_VALIDATE_EMAIL)) {
126+
continue;
127+
}
128+
124129
if (isset($contact['FN'])) {
125130
$displayName = $contact['FN'] . ' (' . $emailAddress . ')';
126131
}

0 commit comments

Comments
 (0)