summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2023-02-07 18:55:03 +0100
committerGitHub <noreply@github.com>2023-02-07 18:55:03 +0100
commit7c6a41488d2995f9af4b844dda64b53ba02904c3 (patch)
tree8f6e01d7317963082298b4bad97e095859fbcd8e
parent9a2167d3ef8eefe7d15e27e001ad697e65c69e3c (diff)
parent6728b4b30b204f8e1e9fc6f663d7ac35d770af1f (diff)
downloadnextcloud-server-7c6a41488d2995f9af4b844dda64b53ba02904c3.tar.gz
nextcloud-server-7c6a41488d2995f9af4b844dda64b53ba02904c3.zip
Merge pull request #36386 from nextcloud/backport/36210/stable24
[stable24] fix(dav): check if principal has email address before accessing it
-rw-r--r--apps/dav/lib/Connector/Sabre/Principal.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php
index c1ad2535936..2a110e928ad 100644
--- a/apps/dav/lib/Connector/Sabre/Principal.php
+++ b/apps/dav/lib/Connector/Sabre/Principal.php
@@ -601,8 +601,8 @@ class Principal implements BackendInterface {
public function getEmailAddressesOfPrincipal(array $principal): array {
$emailAddresses = [];
- if (($primaryAddress = $principal['{http://sabredav.org/ns}email-address'])) {
- $emailAddresses[] = $primaryAddress;
+ if (isset($principal['{http://sabredav.org/ns}email-address'])) {
+ $emailAddresses[] = $principal['{http://sabredav.org/ns}email-address'];
}
if (isset($principal['{DAV:}alternate-URI-set'])) {