Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-09-12 11:03:29 +0300
committerGitHub <noreply@github.com>2017-09-12 11:03:29 +0300
commitcb6178b82888c46ad98f45b6b365bb2996c322d1 (patch)
tree18470cad09c42ad7a7bd79e249786ab86b417554
parentc1690da20b235a968e4fef58f51e3fadc154e661 (diff)
parentd25ea6ae1cf6c030429df41f85d1b8037a106117 (diff)
Merge pull request #6443 from nextcloud/backport-6064-absolute-path-must-be-relative-to-files-on-theming-update
[stable12] Still throw a locked exception when the path is not relative to $user/files/
-rw-r--r--lib/private/Files/View.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index bc16511bdab..da1c67471ab 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -1950,11 +1950,18 @@ class View {
);
}
} catch (\OCP\Lock\LockedException $e) {
- // rethrow with the a human-readable path
- throw new \OCP\Lock\LockedException(
- $this->getPathRelativeToFiles($absolutePath),
- $e
- );
+ try {
+ // rethrow with the a human-readable path
+ throw new \OCP\Lock\LockedException(
+ $this->getPathRelativeToFiles($absolutePath),
+ $e
+ );
+ } catch (\InvalidArgumentException $e) {
+ throw new \OCP\Lock\LockedException(
+ $absolutePath,
+ $e
+ );
+ }
}
}
@@ -2059,7 +2066,7 @@ class View {
return ($pathSegments[2] === 'files') && (count($pathSegments) > 3);
}
- return true;
+ return strpos($path, '/appdata_') !== 0;
}
/**