diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2013-03-06 15:21:12 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2013-03-06 15:21:12 +0100 |
commit | 6acbadf41833c8d5a78aabb06c6c7e0f4f4c019b (patch) | |
tree | 5c9ff03f8aa5384b2d6e46831fd4d32bc0bd03c2 /lib/connector/sabre/directory.php | |
parent | a2aebbd742a56c2b63e0986bb5530223f40a52e3 (diff) | |
download | nextcloud-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.php | 4 |
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); + } } |