diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-02-11 13:27:02 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-02-11 15:13:05 +0100 |
commit | 9430de181e4493e529b38aad55c604421a9ad9c6 (patch) | |
tree | 3f89e9133cadfbd1177d54cf81ba8f60ff23a47b /apps/dav/lib/CalDAV | |
parent | d5dea10517bbceaf141f56b6dde0efb55fc6f4b5 (diff) | |
download | nextcloud-server-9430de181e4493e529b38aad55c604421a9ad9c6.tar.gz nextcloud-server-9430de181e4493e529b38aad55c604421a9ad9c6.zip |
Do not send imip email to invalid recipients
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav/lib/CalDAV')
-rw-r--r-- | apps/dav/lib/CalDAV/Schedule/IMipPlugin.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php index b88364aaa9d..bfc82c0ee90 100644 --- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php +++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php @@ -178,6 +178,11 @@ class IMipPlugin extends SabreIMipPlugin { // Strip off mailto: $sender = substr($iTipMessage->sender, 7); $recipient = substr($iTipMessage->recipient, 7); + if (!$this->mailer->validateMailAddress($recipient)) { + // Nothing to send if the recipient doesn't have a valid email address + $iTipMessage->scheduleStatus = '5.0; EMail delivery failed'; + return; + } $senderName = $iTipMessage->senderName ?: null; $recipientName = $iTipMessage->recipientName ?: null; |