Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions apps/dav/lib/DAV/CustomPropertiesBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,23 @@ private function validateProperty(string $path, string $propName, mixed $propVal

// $path is the principal here as this prop is only set on principals
$node = $this->tree->getNodeForPath($href);
if (!($node instanceof Calendar) || $node->getOwner() !== $path) {
if ((!($node instanceof Calendar) && !($node instanceof ExternalCalendar)) || $node->getOwner() !== $path) {
throw new DavException('No such calendar');
}

$this->defaultCalendarValidator->validateScheduleDefaultCalendar($node);
if ($node instanceof Calendar) {
$this->defaultCalendarValidator->validateScheduleDefaultCalendar($node);
} else {
// ExternalCalendar: verify VEVENT support; these calendars are always writable and not subscriptions/shared/deleted
$sCCS = '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set';
$calendarProperties = $node->getProperties([$sCCS]);
if (isset($calendarProperties[$sCCS])) {
$supportedComponents = $calendarProperties[$sCCS]->getValue();
if (!in_array('VEVENT', $supportedComponents, true)) {
throw new DavException('Calendar does not support VEVENT components');
}
}
}
break;
}
}
Expand Down