diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2016-01-26 12:47:33 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2016-01-26 12:47:33 +0100 |
commit | 49c8f3d6e47f832c77b8b848da37d03e70715563 (patch) | |
tree | 3aa274859adfd4c6e1fbd9d59ef5745ad366ba57 /apps/dav | |
parent | 2027bf2686ee077fb2ad65f7a91f920c96b3fd85 (diff) | |
download | nextcloud-server-49c8f3d6e47f832c77b8b848da37d03e70715563.tar.gz nextcloud-server-49c8f3d6e47f832c77b8b848da37d03e70715563.zip |
return 404 instead of 403 when attempting to create a comment on an not existing or unavailable file
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/comments/entitytypecollection.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/dav/lib/comments/entitytypecollection.php b/apps/dav/lib/comments/entitytypecollection.php index 544838b89e6..485d90b3259 100644 --- a/apps/dav/lib/comments/entitytypecollection.php +++ b/apps/dav/lib/comments/entitytypecollection.php @@ -25,8 +25,8 @@ use OCP\Comments\ICommentsManager; use OCP\Files\Folder; use OCP\ILogger; use OCP\IUserManager; -use Sabre\DAV\Exception\Forbidden; use Sabre\DAV\Exception\MethodNotAllowed; +use Sabre\DAV\Exception\NotFound; /** * Class EntityTypeCollection @@ -79,11 +79,11 @@ class EntityTypeCollection extends RootCollection { * * @param string $name * @return \Sabre\DAV\INode - * @throws Forbidden + * @throws NotFound */ function getChild($name) { if(!$this->childExists($name)) { - throw new Forbidden('Entity does not exist or is not available'); + throw new NotFound('Entity does not exist or is not available'); } return new EntityCollection( $name, |