Skip to content
Open
Show file tree
Hide file tree
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
26 changes: 0 additions & 26 deletions .patches/check-for-instanceof-INode-instead-of-Node-1595.patch

This file was deleted.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"psr/http-client": "^1.0.3",
"psr/log": "^3.0.2",
"punic/punic": "^3.8",
"sabre/dav": "^4.7.0",
"sabre/dav": "^4.7.1",
"stecman/symfony-console-completion": "^0.15.0",
"symfony/console": "^7.4.15",
"symfony/event-dispatcher": "^7.4.15",
Expand Down
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions composer.patches.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
"Break frame parsing on invalid frame": ".patches/mp3info-break-frame-parsing.patch",
"fix incorrect lookup for mpeg header": ".patches/mp3info-fix-incorrect-lookup-for-mpeg-header.patch"
},
"sabre/dav": {
"Check for instanceof INode instead of Node": ".patches/check-for-instanceof-INode-instead-of-Node-1595.patch"
},
"sabre/vobject": {
"fix use RDATE in time range check and use all instances": ".patches/sabre-vobject-rdate.patch",
"fix send participation reply on fresh event": ".patches/sabre-vobject-iTipBroker-replies.patch"
Expand Down
17 changes: 6 additions & 11 deletions composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -3867,17 +3867,17 @@
},
{
"name": "sabre/dav",
"version": "4.7.0",
"version_normalized": "4.7.0.0",
"version": "4.7.1",
"version_normalized": "4.7.1.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/dav.git",
"reference": "074373bcd689a30bcf5aaa6bbb20a3395964ce7a"
"reference": "f36f002dce082e1d425c4a0dc8c71a6b176c3b07"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/dav/zipball/074373bcd689a30bcf5aaa6bbb20a3395964ce7a",
"reference": "074373bcd689a30bcf5aaa6bbb20a3395964ce7a",
"url": "https://api.github.com/repos/sabre-io/dav/zipball/f36f002dce082e1d425c4a0dc8c71a6b176c3b07",
"reference": "f36f002dce082e1d425c4a0dc8c71a6b176c3b07",
"shasum": ""
},
"require": {
Expand Down Expand Up @@ -3911,17 +3911,12 @@
"ext-imap": "*",
"ext-pdo": "*"
},
"time": "2024-10-29T11:46:02+00:00",
"time": "2026-07-07T08:39:09+00:00",
"bin": [
"bin/sabredav",
"bin/naturalselection"
],
"type": "library",
"extra": {
"patches_applied": {
"Check for instanceof INode instead of Node": ".patches/check-for-instanceof-INode-instead-of-Node-1595.patch"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
Expand Down
6 changes: 3 additions & 3 deletions composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -605,9 +605,9 @@
),
),
'sabre/dav' => array(
'pretty_version' => '4.7.0',
'version' => '4.7.0.0',
'reference' => '074373bcd689a30bcf5aaa6bbb20a3395964ce7a',
'pretty_version' => '4.7.1',
'version' => '4.7.1.0',
'reference' => 'f36f002dce082e1d425c4a0dc8c71a6b176c3b07',
'type' => 'library',
'install_path' => __DIR__ . '/../sabre/dav',
'aliases' => array(),
Expand Down
7 changes: 0 additions & 7 deletions sabre/dav/PATCHES.txt

This file was deleted.

60 changes: 40 additions & 20 deletions sabre/dav/lib/CalDAV/Backend/PDO.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ public function getCalendarsForUser($principalUri)
'id' => [(int) $row['calendarid'], (int) $row['id']],
'uri' => $row['uri'],
'principaluri' => $row['principaluri'],
'{'.CalDAV\Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'),
'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0',
'{'.CalDAV\Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ?: '0'),
'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0',
'{'.CalDAV\Plugin::NS_CALDAV.'}supported-calendar-component-set' => new CalDAV\Xml\Property\SupportedCalendarComponentSet($components),
'{'.CalDAV\Plugin::NS_CALDAV.'}schedule-calendar-transp' => new CalDAV\Xml\Property\ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'),
'share-resource-uri' => '/ns/share/'.$row['calendarid'],
Expand Down Expand Up @@ -306,7 +306,7 @@ public function updateCalendar($calendarId, PropPatch $propPatch)
switch ($propertyName) {
case '{'.CalDAV\Plugin::NS_CALDAV.'}schedule-calendar-transp':
$fieldName = 'transparent';
$newValues[$fieldName] = 'transparent' === $propertyValue->getValue();
$newValues[$fieldName] = 'transparent' === $propertyValue->getValue() ? 1 : 0;
break;
default:
$fieldName = $this->propertyMap[$propertyName];
Expand Down Expand Up @@ -544,19 +544,19 @@ public function createCalendarObject($calendarId, $objectUri, $calendarData)

$extraData = $this->getDenormalizedData($calendarData);

$stmt = $this->pdo->prepare('INSERT INTO '.$this->calendarObjectTableName.' (calendarid, uri, calendardata, lastmodified, etag, size, componenttype, firstoccurence, lastoccurence, uid) VALUES (?,?,?,?,?,?,?,?,?,?)');
$stmt->execute([
$calendarId,
$objectUri,
$calendarData,
time(),
$extraData['etag'],
$extraData['size'],
$extraData['componentType'],
$extraData['firstOccurence'],
$extraData['lastOccurence'],
$extraData['uid'],
]);
$stmt = $this->pdo->prepare('INSERT INTO '.$this->calendarObjectTableName.' (calendarid, uri, calendardata, lastmodified, etag, size, componenttype, firstoccurence, lastoccurence, uid) VALUES (:calendarid, :uri, :calendardata, :lastmodified, :etag, :size, :componenttype, :firstoccurence, :lastoccurence, :uid)');
$lastmodified = time();
$stmt->bindParam('calendarid', $calendarId, \PDO::PARAM_INT);
$stmt->bindParam('uri', $objectUri, \PDO::PARAM_STR);
$stmt->bindParam('calendardata', $calendarData, \PDO::PARAM_LOB);
$stmt->bindParam('lastmodified', $lastmodified, \PDO::PARAM_INT);
$stmt->bindParam('etag', $extraData['etag'], \PDO::PARAM_STR);
$stmt->bindParam('size', $extraData['size'], \PDO::PARAM_INT);
$stmt->bindParam('componenttype', $extraData['componentType'], \PDO::PARAM_STR);
$stmt->bindParam('firstoccurence', $extraData['firstOccurence'], \PDO::PARAM_INT);
$stmt->bindParam('lastoccurence', $extraData['lastOccurence'], \PDO::PARAM_INT);
$stmt->bindParam('uid', $extraData['uid'], \PDO::PARAM_STR);
$stmt->execute();
$this->addChange($calendarId, $objectUri, 1);

return '"'.$extraData['etag'].'"';
Expand Down Expand Up @@ -590,8 +590,19 @@ public function updateCalendarObject($calendarId, $objectUri, $calendarData)

$extraData = $this->getDenormalizedData($calendarData);

$stmt = $this->pdo->prepare('UPDATE '.$this->calendarObjectTableName.' SET calendardata = ?, lastmodified = ?, etag = ?, size = ?, componenttype = ?, firstoccurence = ?, lastoccurence = ?, uid = ? WHERE calendarid = ? AND uri = ?');
$stmt->execute([$calendarData, time(), $extraData['etag'], $extraData['size'], $extraData['componentType'], $extraData['firstOccurence'], $extraData['lastOccurence'], $extraData['uid'], $calendarId, $objectUri]);
$stmt = $this->pdo->prepare('UPDATE '.$this->calendarObjectTableName.' SET calendardata = :calendardata, lastmodified = :lastmodified, etag = :etag, size = :size, componenttype = :componenttype, firstoccurence = :firstoccurence, lastoccurence = :lastoccurence, uid = :uid WHERE calendarid = :calendarid AND uri = :uri');
$lastmodified = time();
$stmt->bindParam('calendardata', $calendarData, \PDO::PARAM_LOB);
$stmt->bindParam('lastmodified', $lastmodified, \PDO::PARAM_INT);
$stmt->bindParam('etag', $extraData['etag'], \PDO::PARAM_STR);
$stmt->bindParam('size', $extraData['size'], \PDO::PARAM_INT);
$stmt->bindParam('componenttype', $extraData['componentType'], \PDO::PARAM_STR);
$stmt->bindParam('firstoccurence', $extraData['firstOccurence'], \PDO::PARAM_INT);
$stmt->bindParam('lastoccurence', $extraData['lastOccurence'], \PDO::PARAM_INT);
$stmt->bindParam('uid', $extraData['uid'], \PDO::PARAM_STR);
$stmt->bindParam('calendarid', $calendarId, \PDO::PARAM_INT);
$stmt->bindParam('uri', $objectUri, \PDO::PARAM_STR);
$stmt->execute();

$this->addChange($calendarId, $objectUri, 2);

Expand Down Expand Up @@ -1311,13 +1322,22 @@ public function deleteSchedulingObject($principalUri, $objectUri)
*/
public function createSchedulingObject($principalUri, $objectUri, $objectData)
{
$stmt = $this->pdo->prepare('INSERT INTO '.$this->schedulingObjectTableName.' (principaluri, calendardata, uri, lastmodified, etag, size) VALUES (?, ?, ?, ?, ?, ?)');
$stmt = $this->pdo->prepare('INSERT INTO '.$this->schedulingObjectTableName.' (principaluri, calendardata, uri, lastmodified, etag, size) VALUES (:principaluri, :calendardata, :uri, :lastmodified, :etag, :size)');

if (is_resource($objectData)) {
$objectData = stream_get_contents($objectData);
}

$stmt->execute([$principalUri, $objectData, $objectUri, time(), md5($objectData), strlen($objectData)]);
$lastmodified = time();
$etag = md5($objectData);
$size = strlen($objectData);
$stmt->bindParam('principaluri', $principalUri, \PDO::PARAM_STR);
$stmt->bindParam('calendardata', $objectData, \PDO::PARAM_LOB);
$stmt->bindParam('uri', $objectUri, \PDO::PARAM_STR);
$stmt->bindParam('lastmodified', $lastmodified, \PDO::PARAM_INT);
$stmt->bindParam('etag', $etag, \PDO::PARAM_STR);
$stmt->bindParam('size', $size, \PDO::PARAM_INT);
$stmt->execute();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion sabre/dav/lib/CalDAV/Notifications/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function initialize(Server $server)
$server->on('propFind', [$this, 'propFind']);

$server->xml->namespaceMap[self::NS_CALENDARSERVER] = 'cs';
$server->resourceTypeMapping['\\Sabre\\CalDAV\\Notifications\\ICollection'] = '{'.self::NS_CALENDARSERVER.'}notification';
$server->resourceTypeMapping[\Sabre\CalDAV\Notifications\ICollection::class] = '{'.self::NS_CALENDARSERVER.'}notification';

array_push($server->protectedProperties,
'{'.self::NS_CALENDARSERVER.'}notification-URL',
Expand Down
24 changes: 12 additions & 12 deletions sabre/dav/lib/CalDAV/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,18 +200,18 @@ public function initialize(DAV\Server $server)
$server->xml->namespaceMap[self::NS_CALDAV] = 'cal';
$server->xml->namespaceMap[self::NS_CALENDARSERVER] = 'cs';

$server->xml->elementMap['{'.self::NS_CALDAV.'}supported-calendar-component-set'] = 'Sabre\\CalDAV\\Xml\\Property\\SupportedCalendarComponentSet';
$server->xml->elementMap['{'.self::NS_CALDAV.'}calendar-query'] = 'Sabre\\CalDAV\\Xml\\Request\\CalendarQueryReport';
$server->xml->elementMap['{'.self::NS_CALDAV.'}calendar-multiget'] = 'Sabre\\CalDAV\\Xml\\Request\\CalendarMultiGetReport';
$server->xml->elementMap['{'.self::NS_CALDAV.'}free-busy-query'] = 'Sabre\\CalDAV\\Xml\\Request\\FreeBusyQueryReport';
$server->xml->elementMap['{'.self::NS_CALDAV.'}mkcalendar'] = 'Sabre\\CalDAV\\Xml\\Request\\MkCalendar';
$server->xml->elementMap['{'.self::NS_CALDAV.'}schedule-calendar-transp'] = 'Sabre\\CalDAV\\Xml\\Property\\ScheduleCalendarTransp';
$server->xml->elementMap['{'.self::NS_CALDAV.'}supported-calendar-component-set'] = 'Sabre\\CalDAV\\Xml\\Property\\SupportedCalendarComponentSet';

$server->resourceTypeMapping['\\Sabre\\CalDAV\\ICalendar'] = '{urn:ietf:params:xml:ns:caldav}calendar';

$server->resourceTypeMapping['\\Sabre\\CalDAV\\Principal\\IProxyRead'] = '{http://calendarserver.org/ns/}calendar-proxy-read';
$server->resourceTypeMapping['\\Sabre\\CalDAV\\Principal\\IProxyWrite'] = '{http://calendarserver.org/ns/}calendar-proxy-write';
$server->xml->elementMap['{'.self::NS_CALDAV.'}supported-calendar-component-set'] = \Sabre\CalDAV\Xml\Property\SupportedCalendarComponentSet::class;
$server->xml->elementMap['{'.self::NS_CALDAV.'}calendar-query'] = \Sabre\CalDAV\Xml\Request\CalendarQueryReport::class;
$server->xml->elementMap['{'.self::NS_CALDAV.'}calendar-multiget'] = \Sabre\CalDAV\Xml\Request\CalendarMultiGetReport::class;
$server->xml->elementMap['{'.self::NS_CALDAV.'}free-busy-query'] = \Sabre\CalDAV\Xml\Request\FreeBusyQueryReport::class;
$server->xml->elementMap['{'.self::NS_CALDAV.'}mkcalendar'] = \Sabre\CalDAV\Xml\Request\MkCalendar::class;
$server->xml->elementMap['{'.self::NS_CALDAV.'}schedule-calendar-transp'] = \Sabre\CalDAV\Xml\Property\ScheduleCalendarTransp::class;
$server->xml->elementMap['{'.self::NS_CALDAV.'}supported-calendar-component-set'] = \Sabre\CalDAV\Xml\Property\SupportedCalendarComponentSet::class;

$server->resourceTypeMapping[\Sabre\CalDAV\ICalendar::class] = '{urn:ietf:params:xml:ns:caldav}calendar';

$server->resourceTypeMapping[\Sabre\CalDAV\Principal\IProxyRead::class] = '{http://calendarserver.org/ns/}calendar-proxy-read';
$server->resourceTypeMapping[\Sabre\CalDAV\Principal\IProxyWrite::class] = '{http://calendarserver.org/ns/}calendar-proxy-write';

array_push($server->protectedProperties,
'{'.self::NS_CALDAV.'}supported-calendar-component-set',
Expand Down
4 changes: 2 additions & 2 deletions sabre/dav/lib/CalDAV/Schedule/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ public function initialize(Server $server)
* This information ensures that the {DAV:}resourcetype property has
* the correct values.
*/
$server->resourceTypeMapping['\\Sabre\\CalDAV\\Schedule\\IOutbox'] = $ns.'schedule-outbox';
$server->resourceTypeMapping['\\Sabre\\CalDAV\\Schedule\\IInbox'] = $ns.'schedule-inbox';
$server->resourceTypeMapping[\Sabre\CalDAV\Schedule\IOutbox::class] = $ns.'schedule-outbox';
$server->resourceTypeMapping[\Sabre\CalDAV\Schedule\IInbox::class] = $ns.'schedule-inbox';

/*
* Properties we protect are made read-only by the server.
Expand Down
4 changes: 2 additions & 2 deletions sabre/dav/lib/CalDAV/SharingPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ public function initialize(DAV\Server $server)
'{'.Plugin::NS_CALENDARSERVER.'}shared-url'
);

$this->server->xml->elementMap['{'.Plugin::NS_CALENDARSERVER.'}share'] = 'Sabre\\CalDAV\\Xml\\Request\\Share';
$this->server->xml->elementMap['{'.Plugin::NS_CALENDARSERVER.'}invite-reply'] = 'Sabre\\CalDAV\\Xml\\Request\\InviteReply';
$this->server->xml->elementMap['{'.Plugin::NS_CALENDARSERVER.'}share'] = \Sabre\CalDAV\Xml\Request\Share::class;
$this->server->xml->elementMap['{'.Plugin::NS_CALENDARSERVER.'}invite-reply'] = \Sabre\CalDAV\Xml\Request\InviteReply::class;

$this->server->on('propFind', [$this, 'propFindEarly']);
$this->server->on('propFind', [$this, 'propFindLate'], 150);
Expand Down
4 changes: 2 additions & 2 deletions sabre/dav/lib/CalDAV/Subscriptions/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ class Plugin extends ServerPlugin
*/
public function initialize(Server $server)
{
$server->resourceTypeMapping['Sabre\\CalDAV\\Subscriptions\\ISubscription'] =
$server->resourceTypeMapping[\Sabre\CalDAV\Subscriptions\ISubscription::class] =
'{http://calendarserver.org/ns/}subscribed';

$server->xml->elementMap['{http://calendarserver.org/ns/}source'] =
'Sabre\\DAV\\Xml\\Property\\Href';
\Sabre\DAV\Xml\Property\Href::class;

$server->on('propFind', [$this, 'propFind'], 150);
}
Expand Down
4 changes: 2 additions & 2 deletions sabre/dav/lib/CalDAV/Xml/Request/CalendarMultiGetReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ class CalendarMultiGetReport implements XmlDeserializable
public static function xmlDeserialize(Reader $reader)
{
$elems = $reader->parseInnerTree([
'{urn:ietf:params:xml:ns:caldav}calendar-data' => 'Sabre\\CalDAV\\Xml\\Filter\\CalendarData',
'{DAV:}prop' => 'Sabre\\Xml\\Element\\KeyValue',
'{urn:ietf:params:xml:ns:caldav}calendar-data' => \Sabre\CalDAV\Xml\Filter\CalendarData::class,
'{DAV:}prop' => \Sabre\Xml\Element\KeyValue::class,
]);

$newProps = [
Expand Down
Loading