Browse Source

Better handling of forbidden files in dav

pull/333/head
Robin Appelman 10 years ago
parent
commit
f119769c26
  1. 2
      apps/dav/lib/Connector/Sabre/Directory.php
  2. 2
      apps/dav/lib/Connector/Sabre/ObjectTree.php

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

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

Loading…
Cancel
Save