diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-06-08 10:19:24 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-06-08 10:19:24 +0200 |
commit | 8d0948977e2c943c468b6365b5c0104c398a32bf (patch) | |
tree | 2f24be08e668094be4b314a32fd6adb0c8a98bef /apps | |
parent | ed92f4c4272a1681e32e2b1c33997e9c0281cca4 (diff) | |
parent | f119769c2683ae55aee440e6188933c7b59998cd (diff) | |
download | nextcloud-server-8d0948977e2c943c468b6365b5c0104c398a32bf.tar.gz nextcloud-server-8d0948977e2c943c468b6365b5c0104c398a32bf.zip |
Merge pull request #24899 from owncloud/local-storage-symlinks
dissalow symlinks in local storages that point outside the datadir
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/Directory.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/ObjectTree.php | 2 |
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(); } } |