Better handling of forbidden files in dav

This commit is contained in:
Robin Appelman 2016-06-01 14:51:25 +02:00 committed by Arthur Schiwon
parent ea6921da3b
commit 9b5fd515ef
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
2 changed files with 4 additions and 0 deletions

View File

@ -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();
}
}

View File

@ -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();
}
}