[Pkg-owncloud-commits] [owncloud] 100/131: check if the user is trying to scan a valid path
David Prévot
taffit at moszumanska.debian.org
Tue Aug 11 15:58:39 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v8.1.1
in repository owncloud.
commit c910ac1f475a9494b7122bcf2b302b47a41678c9
Author: Robin Appelman <icewind at owncloud.com>
Date: Sun Jul 26 19:13:31 2015 +0200
check if the user is trying to scan a valid path
---
lib/private/files/utils/scanner.php | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/private/files/utils/scanner.php b/lib/private/files/utils/scanner.php
index 3d68eb5..c70f4be 100644
--- a/lib/private/files/utils/scanner.php
+++ b/lib/private/files/utils/scanner.php
@@ -131,6 +131,9 @@ class Scanner extends PublicEmitter {
* @throws \OC\ForbiddenException
*/
public function scan($dir = '') {
+ if (!Filesystem::isValidPath($dir)) {
+ throw new \InvalidArgumentException('Invalid path to scan');
+ }
$mounts = $this->getMounts($dir);
foreach ($mounts as $mount) {
if (is_null($mount->getStorage())) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list