summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-09-17 15:36:41 +0200
committerLukas Reschke <lukas@owncloud.com>2014-09-17 15:36:41 +0200
commitc88d517e8879c56755bc26f604d515d9772b35b3 (patch)
tree12673823f88f730ec0bdf157ab1b7f49d8d9fa96 /apps
parentb644e8a5e7f3dfb63bbc40ebda437719aed0ba46 (diff)
parent33c0d2f743c82facc7847b62497913952baef296 (diff)
downloadnextcloud-server-c88d517e8879c56755bc26f604d515d9772b35b3.tar.gz
nextcloud-server-c88d517e8879c56755bc26f604d515d9772b35b3.zip
Merge pull request #10622 from owncloud/recursive-delete-forbidden
Fix isDeletable
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/lib/google.php3
-rw-r--r--apps/files_external/lib/streamwrapper.php2
-rw-r--r--apps/files_external/lib/swift.php2
3 files changed, 5 insertions, 2 deletions
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
index 88d82d51e2e..5d238a363de 100644
--- a/apps/files_external/lib/google.php
+++ b/apps/files_external/lib/google.php
@@ -204,6 +204,9 @@ class Google extends \OC\Files\Storage\Common {
}
public function rmdir($path) {
+ if (!$this->isDeletable($path)) {
+ return false;
+ }
if (trim($path, '/') === '') {
$dir = $this->opendir($path);
if(is_resource($dir)) {
diff --git a/apps/files_external/lib/streamwrapper.php b/apps/files_external/lib/streamwrapper.php
index 44bd9a0161a..b55bcf94af8 100644
--- a/apps/files_external/lib/streamwrapper.php
+++ b/apps/files_external/lib/streamwrapper.php
@@ -21,7 +21,7 @@ abstract class StreamWrapper extends Common {
}
public function rmdir($path) {
- if ($this->file_exists($path)) {
+ if ($this->file_exists($path) && $this->isDeletable($path)) {
$dh = $this->opendir($path);
while (($file = readdir($dh)) !== false) {
if ($this->is_dir($path . '/' . $file)) {
diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php
index 1c56d180e2f..6a1e12986fb 100644
--- a/apps/files_external/lib/swift.php
+++ b/apps/files_external/lib/swift.php
@@ -187,7 +187,7 @@ class Swift extends \OC\Files\Storage\Common {
public function rmdir($path) {
$path = $this->normalizePath($path);
- if (!$this->is_dir($path)) {
+ if (!$this->is_dir($path) || !$this->isDeletable($path)) {
return false;
}