aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/DAV
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/lib/DAV')
-rw-r--r--vendor/sabre/dav/lib/DAV/Auth/Plugin.php4
-rw-r--r--vendor/sabre/dav/lib/DAV/Browser/Plugin.php2
-rw-r--r--vendor/sabre/dav/lib/DAV/Locks/Plugin.php4
-rw-r--r--vendor/sabre/dav/lib/DAV/Server.php3
-rw-r--r--vendor/sabre/dav/lib/DAV/Sync/Plugin.php13
-rw-r--r--vendor/sabre/dav/lib/DAV/Tree.php2
-rw-r--r--vendor/sabre/dav/lib/DAV/Version.php2
-rw-r--r--vendor/sabre/dav/lib/DAV/Xml/Element/Response.php22
8 files changed, 38 insertions, 14 deletions
diff --git a/vendor/sabre/dav/lib/DAV/Auth/Plugin.php b/vendor/sabre/dav/lib/DAV/Auth/Plugin.php
index 68adbede5..eb4f27ca6 100644
--- a/vendor/sabre/dav/lib/DAV/Auth/Plugin.php
+++ b/vendor/sabre/dav/lib/DAV/Auth/Plugin.php
@@ -113,8 +113,6 @@ class Plugin extends ServerPlugin
/**
* This method is called before any HTTP method and forces users to be authenticated.
- *
- * @return bool
*/
public function beforeMethod(RequestInterface $request, ResponseInterface $response)
{
@@ -204,8 +202,6 @@ class Plugin extends ServerPlugin
* This method will for example cause a HTTP Basic backend to set a
* WWW-Authorization header, indicating to the client that it should
* authenticate.
- *
- * @return array
*/
public function challenge(RequestInterface $request, ResponseInterface $response)
{
diff --git a/vendor/sabre/dav/lib/DAV/Browser/Plugin.php b/vendor/sabre/dav/lib/DAV/Browser/Plugin.php
index 2f155d9ea..89495e5db 100644
--- a/vendor/sabre/dav/lib/DAV/Browser/Plugin.php
+++ b/vendor/sabre/dav/lib/DAV/Browser/Plugin.php
@@ -85,8 +85,6 @@ class Plugin extends DAV\ServerPlugin
/**
* This method intercepts GET requests that have ?sabreAction=info
* appended to the URL.
- *
- * @return bool
*/
public function httpGetEarly(RequestInterface $request, ResponseInterface $response)
{
diff --git a/vendor/sabre/dav/lib/DAV/Locks/Plugin.php b/vendor/sabre/dav/lib/DAV/Locks/Plugin.php
index 110bfce06..2443f204c 100644
--- a/vendor/sabre/dav/lib/DAV/Locks/Plugin.php
+++ b/vendor/sabre/dav/lib/DAV/Locks/Plugin.php
@@ -295,6 +295,10 @@ class Plugin extends DAV\ServerPlugin
{
$locks = $this->getLocks($path, $includeChildren = true);
foreach ($locks as $lock) {
+ // don't delete a lock on a parent dir
+ if (0 !== strpos($lock->uri, $path)) {
+ continue;
+ }
$this->unlockNode($path, $lock);
}
}
diff --git a/vendor/sabre/dav/lib/DAV/Server.php b/vendor/sabre/dav/lib/DAV/Server.php
index de663d0c1..1f8300d4a 100644
--- a/vendor/sabre/dav/lib/DAV/Server.php
+++ b/vendor/sabre/dav/lib/DAV/Server.php
@@ -895,7 +895,7 @@ class Server implements LoggerAwareInterface, EmitterInterface
}
$propertyNames = $propFind->getRequestedProperties();
- $propFindType = !empty($propertyNames) ? PropFind::NORMAL : PropFind::ALLPROPS;
+ $propFindType = !$propFind->isAllProps() ? PropFind::NORMAL : PropFind::ALLPROPS;
foreach ($this->tree->getChildren($path) as $childNode) {
if ('' !== $path) {
@@ -1237,6 +1237,7 @@ class Server implements LoggerAwareInterface, EmitterInterface
$this->tree->markDirty($parentUri);
$this->emit('afterBind', [$uri]);
+ $this->emit('afterCreateCollection', [$uri]);
}
/**
diff --git a/vendor/sabre/dav/lib/DAV/Sync/Plugin.php b/vendor/sabre/dav/lib/DAV/Sync/Plugin.php
index 32106abb3..8609f759e 100644
--- a/vendor/sabre/dav/lib/DAV/Sync/Plugin.php
+++ b/vendor/sabre/dav/lib/DAV/Sync/Plugin.php
@@ -124,6 +124,10 @@ class Plugin extends DAV\ServerPlugin
throw new DAV\Exception\InvalidSyncToken('Invalid or unknown sync token');
}
+ if (!array_key_exists('result_truncated', $changeInfo)) {
+ $changeInfo['result_truncated'] = false;
+ }
+
// Encoding the response
$this->sendSyncCollectionResponse(
$changeInfo['syncToken'],
@@ -131,7 +135,8 @@ class Plugin extends DAV\ServerPlugin
$changeInfo['added'],
$changeInfo['modified'],
$changeInfo['deleted'],
- $report->properties
+ $report->properties,
+ $changeInfo['result_truncated']
);
}
@@ -141,7 +146,7 @@ class Plugin extends DAV\ServerPlugin
* @param string $syncToken
* @param string $collectionUrl
*/
- protected function sendSyncCollectionResponse($syncToken, $collectionUrl, array $added, array $modified, array $deleted, array $properties)
+ protected function sendSyncCollectionResponse($syncToken, $collectionUrl, array $added, array $modified, array $deleted, array $properties, bool $resultTruncated = false)
{
$fullPaths = [];
@@ -164,6 +169,10 @@ class Plugin extends DAV\ServerPlugin
$fullPath = $collectionUrl.'/'.$item;
$responses[] = new DAV\Xml\Element\Response($fullPath, [], 404);
}
+ if ($resultTruncated) {
+ $responses[] = new DAV\Xml\Element\Response($collectionUrl.'/', [], 507);
+ }
+
$multiStatus = new DAV\Xml\Response\MultiStatus($responses, self::SYNCTOKEN_PREFIX.$syncToken);
$this->server->httpResponse->setStatus(207);
diff --git a/vendor/sabre/dav/lib/DAV/Tree.php b/vendor/sabre/dav/lib/DAV/Tree.php
index 2417979a6..8215e2c39 100644
--- a/vendor/sabre/dav/lib/DAV/Tree.php
+++ b/vendor/sabre/dav/lib/DAV/Tree.php
@@ -226,7 +226,7 @@ class Tree
// flushing the entire cache
$path = trim($path, '/');
foreach ($this->cache as $nodePath => $node) {
- if ('' === $path || $nodePath == $path || 0 === strpos($nodePath, $path.'/')) {
+ if ('' === $path || $nodePath == $path || 0 === strpos((string) $nodePath, $path.'/')) {
unset($this->cache[$nodePath]);
}
}
diff --git a/vendor/sabre/dav/lib/DAV/Version.php b/vendor/sabre/dav/lib/DAV/Version.php
index b25d6c07a..f8b56bb98 100644
--- a/vendor/sabre/dav/lib/DAV/Version.php
+++ b/vendor/sabre/dav/lib/DAV/Version.php
@@ -16,5 +16,5 @@ class Version
/**
* Full version number.
*/
- public const VERSION = '4.1.5';
+ public const VERSION = '4.3.1';
}
diff --git a/vendor/sabre/dav/lib/DAV/Xml/Element/Response.php b/vendor/sabre/dav/lib/DAV/Xml/Element/Response.php
index 45c161fa4..79f06a09b 100644
--- a/vendor/sabre/dav/lib/DAV/Xml/Element/Response.php
+++ b/vendor/sabre/dav/lib/DAV/Xml/Element/Response.php
@@ -121,7 +121,7 @@ class Response implements Element
foreach ($this->getResponseProperties() as $status => $properties) {
// Skipping empty lists
- if (!$properties || (!ctype_digit($status) && !is_int($status))) {
+ if (!$properties || (!is_int($status) && !ctype_digit($status))) {
continue;
}
$empty = false;
@@ -186,8 +186,21 @@ class Response implements Element
return [];
}
+
+ if (!$reader->read()) {
+ $reader->next();
+
+ return [];
+ }
+
+ if (Reader::END_ELEMENT === $reader->nodeType) {
+ $reader->next();
+
+ return [];
+ }
+
$values = [];
- $reader->read();
+
do {
if (Reader::ELEMENT === $reader->nodeType) {
$clark = $reader->getClark();
@@ -199,9 +212,12 @@ class Response implements Element
$values[$clark] = $reader->parseCurrentElement()['value'];
}
} else {
- $reader->read();
+ if (!$reader->read()) {
+ break;
+ }
}
} while (Reader::END_ELEMENT !== $reader->nodeType);
+
$reader->read();
return $values;