summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-06-01 14:51:25 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2016-06-09 14:00:01 +0200
commit9b5fd515efd26f63b333bbbfa60b5b46c707d773 (patch)
tree721985f7509aafd761d7c74b3f3e395fe02f5a20 /apps/dav
parentea6921da3b597b4fdf66648c6fe9b1c73f264938 (diff)
downloadnextcloud-server-9b5fd515efd26f63b333bbbfa60b5b46c707d773.tar.gz
nextcloud-server-9b5fd515efd26f63b333bbbfa60b5b46c707d773.zip
Better handling of forbidden files in dav
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/Connector/Sabre/Directory.php2
-rw-r--r--apps/dav/lib/Connector/Sabre/ObjectTree.php2
2 files changed, 4 insertions, 0 deletions
diff --git a/apps/dav/lib/Connector/Sabre/Directory.php b/apps/dav/lib/Connector/Sabre/Directory.php
index e7226b58196..ddab34605f3 100644
--- a/apps/dav/lib/Connector/Sabre/Directory.php
+++ b/apps/dav/lib/Connector/Sabre/Directory.php
@@ -196,6 +196,8 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node
throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage());
} catch (\OCP\Files\InvalidPathException $ex) {
throw new InvalidPath($ex->getMessage());
+ } catch (ForbiddenException $e) {
+ throw new \Sabre\DAV\Exception\Forbidden();
}
}
diff --git a/apps/dav/lib/Connector/Sabre/ObjectTree.php b/apps/dav/lib/Connector/Sabre/ObjectTree.php
index 599f3fdfd0e..9e7d876187d 100644
--- a/apps/dav/lib/Connector/Sabre/ObjectTree.php
+++ b/apps/dav/lib/Connector/Sabre/ObjectTree.php
@@ -161,6 +161,8 @@ class ObjectTree extends \Sabre\DAV\Tree {
throw new \Sabre\DAV\Exception\NotFound('Storage ' . $path . ' is invalid');
} catch (LockedException $e) {
throw new \Sabre\DAV\Exception\Locked();
+ } catch (ForbiddenException $e) {
+ throw new \Sabre\DAV\Exception\Forbidden();
}
}