Skip to content

Commit 266a79a

Browse files
committed
fix(ProvisioningApi): only return verified additional mails per user
It would not per se be bad to return all of them, however the meta data about the verified state is missing. Since the information may go out to connected clients, those may have wrong trust the returned email addresses. Email verification still works with this change. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
1 parent 0681141 commit 266a79a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

apps/provisioning_api/lib/Controller/AUserData.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ protected function getUserData(string $userId, bool $includeScopes = false): ?ar
173173
$additionalEmails = $additionalEmailScopes = [];
174174
$emailCollection = $userAccount->getPropertyCollection(IAccountManager::COLLECTION_EMAIL);
175175
foreach ($emailCollection->getProperties() as $property) {
176+
if ($property->getLocallyVerified() !== IAccountManager::VERIFIED) {
177+
continue;
178+
}
176179
$additionalEmails[] = $property->getValue();
177180
if ($includeScopes) {
178181
$additionalEmailScopes[] = $property->getScope();

0 commit comments

Comments
 (0)