summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CalDAV
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2020-02-25 17:04:25 +0100
committerGitHub <noreply@github.com>2020-02-25 17:04:25 +0100
commite6206731c7d009bb0c9195f14eafa516d5c96b01 (patch)
treeef403f6df2441b14ce6bca8c5d231c1234a592f5 /apps/dav/lib/CalDAV
parente00c1dcd1111ec50b0db65af0171740c2eff8afc (diff)
parent41fa05728572735abb1b71b705419bd2612aad68 (diff)
downloadnextcloud-server-e6206731c7d009bb0c9195f14eafa516d5c96b01.tar.gz
nextcloud-server-e6206731c7d009bb0c9195f14eafa516d5c96b01.zip
Merge pull request #19252 from nextcloud/bug/fix-notification-object-id
Hash event UID to make sure it's not too long for PushProvider notifications
Diffstat (limited to 'apps/dav/lib/CalDAV')
-rw-r--r--apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
index 675dc24473d..7e560159950 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
@@ -93,6 +93,9 @@ class PushProvider extends AbstractProvider {
$eventDetails = $this->extractEventDetails($vevent);
$eventDetails['calendar_displayname'] = $calendarDisplayName;
+ $eventUUID = (string) $vevent->UID;
+ // Empty Notification ObjectId will be catched by OC\Notification\Notification
+ $eventUUIDHash = $eventUUID ? hash('sha256', $eventUUID, false) : '';
foreach($users as $user) {
/** @var INotification $notification */
@@ -100,7 +103,7 @@ class PushProvider extends AbstractProvider {
$notification->setApp(Application::APP_ID)
->setUser($user->getUID())
->setDateTime($this->timeFactory->getDateTime())
- ->setObject(Application::APP_ID, (string) $vevent->UID)
+ ->setObject(Application::APP_ID, $eventUUIDHash)
->setSubject('calendar_reminder', [
'title' => $eventDetails['title'],
'start_atom' => $eventDetails['start_atom']