summaryrefslogtreecommitdiffstats
path: root/apps/encryption
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2021-02-15 22:28:28 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2021-02-15 22:28:28 +0100
commit918af40f05ec246e65149704d27694d65598136d (patch)
treebb3e603a2029bd76b50a54cc2b7d383708f281f1 /apps/encryption
parentd6e34b5045782fac930a6d35939fa072e9511196 (diff)
downloadnextcloud-server-918af40f05ec246e65149704d27694d65598136d.tar.gz
nextcloud-server-918af40f05ec246e65149704d27694d65598136d.zip
Harden EncryptAll check for empty email
Reported by psalm For #25641 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/encryption')
-rw-r--r--apps/encryption/lib/Crypto/EncryptAll.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/encryption/lib/Crypto/EncryptAll.php b/apps/encryption/lib/Crypto/EncryptAll.php
index 3d18d8b3a53..a74e6bf08d4 100644
--- a/apps/encryption/lib/Crypto/EncryptAll.php
+++ b/apps/encryption/lib/Crypto/EncryptAll.php
@@ -417,7 +417,7 @@ class EncryptAll {
$recipientDisplayName = $recipient->getDisplayName();
$to = $recipient->getEMailAddress();
- if ($to === '') {
+ if ($to === '' || $to === null) {
$noMail[] = $uid;
continue;
}