summaryrefslogtreecommitdiffstats
path: root/lib/connector/sabre/directory.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2013-03-06 15:21:12 +0100
committerArthur Schiwon <blizzz@owncloud.com>2013-03-06 15:21:12 +0100
commit6acbadf41833c8d5a78aabb06c6c7e0f4f4c019b (patch)
tree5c9ff03f8aa5384b2d6e46831fd4d32bc0bd03c2 /lib/connector/sabre/directory.php
parenta2aebbd742a56c2b63e0986bb5530223f40a52e3 (diff)
downloadnextcloud-server-6acbadf41833c8d5a78aabb06c6c7e0f4f4c019b.tar.gz
nextcloud-server-6acbadf41833c8d5a78aabb06c6c7e0f4f4c019b.zip
return 403 when mkdir failed on webDAV, fixes #2127
Diffstat (limited to 'lib/connector/sabre/directory.php')
-rw-r--r--lib/connector/sabre/directory.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/connector/sabre/directory.php b/lib/connector/sabre/directory.php
index 953692f80a9..6ccb54b79ab 100644
--- a/lib/connector/sabre/directory.php
+++ b/lib/connector/sabre/directory.php
@@ -107,7 +107,9 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
public function createDirectory($name) {
$newPath = $this->path . '/' . $name;
- \OC\Files\Filesystem::mkdir($newPath);
+ if(!\OC\Files\Filesystem::mkdir($newPath)) {
+ throw new Sabre_DAV_Exception_Forbidden('Could not create directory '.$newPath);
+ }
}