diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-07-20 12:16:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-20 12:16:45 +0200 |
commit | a2df728fb84578244c8b94d210f5d007876b4650 (patch) | |
tree | c8bf53f468433b7a163efacfb1aaf3d8df5b481f /apps/dav | |
parent | 4536635e2a1f287b8e03fd6f49d1132b11887d97 (diff) | |
parent | 491f01efba893e1e76592acafa240f132542e241 (diff) | |
download | nextcloud-server-a2df728fb84578244c8b94d210f5d007876b4650.tar.gz nextcloud-server-a2df728fb84578244c8b94d210f5d007876b4650.zip |
Merge pull request #9581 from nextcloud/dav-acl-no-files
disable dav acl plugin for files resource
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/DavAclPlugin.php | 11 |
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); + } + } } |