Skip to content
Snippets Groups Projects
Commit f119769c authored by Robin Appelman's avatar Robin Appelman
Browse files

Better handling of forbidden files in dav

parent 73547f29
No related branches found
No related tags found
No related merge requests found
...@@ -196,6 +196,8 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node ...@@ -196,6 +196,8 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node
throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage()); throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage());
} catch (\OCP\Files\InvalidPathException $ex) { } catch (\OCP\Files\InvalidPathException $ex) {
throw new InvalidPath($ex->getMessage()); throw new InvalidPath($ex->getMessage());
} catch (ForbiddenException $e) {
throw new \Sabre\DAV\Exception\Forbidden();
} }
} }
......
...@@ -161,6 +161,8 @@ class ObjectTree extends \Sabre\DAV\Tree { ...@@ -161,6 +161,8 @@ class ObjectTree extends \Sabre\DAV\Tree {
throw new \Sabre\DAV\Exception\NotFound('Storage ' . $path . ' is invalid'); throw new \Sabre\DAV\Exception\NotFound('Storage ' . $path . ' is invalid');
} catch (LockedException $e) { } catch (LockedException $e) {
throw new \Sabre\DAV\Exception\Locked(); throw new \Sabre\DAV\Exception\Locked();
} catch (ForbiddenException $e) {
throw new \Sabre\DAV\Exception\Forbidden();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment