aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorRobert C. Schaller <gtbc_robert.schaller@rsxc.de>2024-03-25 02:18:02 +0100
committerAnna <anna@nextcloud.com>2024-03-25 13:18:58 +0100
commitfa6e6131eef66edc4c339a1d6beb8d020abe6ecb (patch)
tree78ec6c80945e22da3c524b9ddba6bcd9d3e7d172 /apps/dav/lib
parent46906b7d69642f7e5b1dc031e00921b39b27dce8 (diff)
downloadnextcloud-server-fa6e6131eef66edc4c339a1d6beb8d020abe6ecb.tar.gz
nextcloud-server-fa6e6131eef66edc4c339a1d6beb8d020abe6ecb.zip
fix(dav): wrong comparison method between two events
Old comparison implementation compares each element of the array against each other with no respect for the associated array label, which leads to wrongful removals because one value is accidentally present in a completely different label. New comparison works 'by-label' individually. Partly fixes #41084 because changes between 'SEQUENCE' not present, 'SEQUENCE:0' and 'SEQUENCE:1' were not detected in the old implementation and thus no email update sent. Co-authored-by: Christoph Wurst <ChristophWurst@users.noreply.github.com> Signed-off-by: Robert C. Schaller <gtbc_robert.schaller@rsxc.de>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/CalDAV/EventComparisonService.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/dav/lib/CalDAV/EventComparisonService.php b/apps/dav/lib/CalDAV/EventComparisonService.php
index 0f9914dcf98..24f5da34f8e 100644
--- a/apps/dav/lib/CalDAV/EventComparisonService.php
+++ b/apps/dav/lib/CalDAV/EventComparisonService.php
@@ -65,7 +65,7 @@ class EventComparisonService {
$eventToFilterData[] = IMipService::readPropertyWithDefault($eventToFilter, $eventDiff, '');
}
// events are identical and can be removed
- if (empty(array_diff($filterEventData, $eventToFilterData))) {
+ if ($filterEventData === $eventToFilterData) {
unset($eventsToFilter[$k]);
return true;
}