diff options
Diffstat (limited to 'apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php')
-rw-r--r-- | apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php index 456b9f8b42d..85590d506cf 100644 --- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php +++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php @@ -272,7 +272,10 @@ class EmailProvider extends AbstractProvider { $emailAddressesOfDelegates = $delegates->getParts(); foreach ($emailAddressesOfDelegates as $addressesOfDelegate) { if (strcasecmp($addressesOfDelegate, 'mailto:') === 0) { - $emailAddresses[substr($addressesOfDelegate, 7)] = []; + $delegateEmail = substr($addressesOfDelegate, 7); + if ($delegateEmail !== false && $this->mailer->validateMailAddress($delegateEmail)) { + $emailAddresses[$delegateEmail] = []; + } } } @@ -344,8 +347,12 @@ class EmailProvider extends AbstractProvider { if (!$this->hasAttendeeMailURI($attendee)) { return null; } + $attendeeEMail = substr($attendee->getValue(), 7); + if ($attendeeEMail === false || !$this->mailer->validateMailAddress($attendeeEMail)) { + return null; + } - return substr($attendee->getValue(), 7); + return $attendeeEMail; } /** |