summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-05-24 14:00:14 +0200
committerRobin Appelman <robin@icewind.nl>2018-05-24 14:00:14 +0200
commit491f01efba893e1e76592acafa240f132542e241 (patch)
tree6d5a66d6bd57f840aa2e6c098d6d3a864bcd5a03
parentfd4a7bf72a0c8a69325b1d63e6983021ac6651f8 (diff)
downloadnextcloud-server-491f01efba893e1e76592acafa240f132542e241.tar.gz
nextcloud-server-491f01efba893e1e76592acafa240f132542e241.zip
disable dav acl plugin for files resource
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r--apps/dav/lib/Connector/Sabre/DavAclPlugin.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/dav/lib/Connector/Sabre/DavAclPlugin.php b/apps/dav/lib/Connector/Sabre/DavAclPlugin.php
index fe747ee723b..5a0d9e83c62 100644
--- a/apps/dav/lib/Connector/Sabre/DavAclPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/DavAclPlugin.php
@@ -28,6 +28,8 @@ use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\INode;
use \Sabre\DAV\PropFind;
use OCA\DAV\CardDAV\AddressBook;
+use Sabre\HTTP\RequestInterface;
+use Sabre\HTTP\ResponseInterface;
/**
* Class DavAclPlugin is a wrapper around \Sabre\DAVACL\Plugin that returns 404
@@ -84,4 +86,13 @@ class DavAclPlugin extends \Sabre\DAVACL\Plugin {
return parent::propFind($propFind, $node);
}
+
+ function beforeMethod(RequestInterface $request, ResponseInterface $response) {
+ $path = $request->getPath();
+
+ // prevent the plugin from causing an unneeded overhead for file requests
+ if (strpos($path, 'files/') !== 0) {
+ parent::beforeMethod($request, $response);
+ }
+ }
}