From 6a39ba8d3547b25ced02282da0fea12752709880 Mon Sep 17 00:00:00 2001 From: Willem-Jan Lamers Date: Wed, 7 Feb 2024 19:02:31 +0100 Subject: [PATCH] Fixed issue with multiple invites being send out in IMipPlugin.php when there is a ',' in the recipient name/emailaddress' --- lib/CalDAV/Schedule/IMipPlugin.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/CalDAV/Schedule/IMipPlugin.php b/lib/CalDAV/Schedule/IMipPlugin.php index dcaf951efd..a98198c71e 100644 --- a/lib/CalDAV/Schedule/IMipPlugin.php +++ b/lib/CalDAV/Schedule/IMipPlugin.php @@ -129,8 +129,12 @@ public function schedule(ITip\Message $iTipMessage) if (DAV\Server::$exposeVersion) { $headers[] = 'X-Sabre-Version: '.DAV\Version::VERSION; } + + preg_match_all("/[\._a-zA-Z0-9-]+@[\._a-zA-Z0-9-]+/i", $recipient, $matches); + $recipient_email = $matches[0][0]; + $this->mail( - $recipient, + $recipient_email, $subject, $iTipMessage->message->serialize(), $headers