diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-06-01 14:51:25 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-06-07 14:01:55 +0200 |
commit | f119769c2683ae55aee440e6188933c7b59998cd (patch) | |
tree | 9c8b290b522e67a5d511e4c1653a14a88b3138ca /apps | |
parent | 73547f29be4545b0080ec0581a114243707966d9 (diff) | |
download | nextcloud-server-f119769c2683ae55aee440e6188933c7b59998cd.tar.gz nextcloud-server-f119769c2683ae55aee440e6188933c7b59998cd.zip |
Better handling of forbidden files in dav
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(); } } |