[Pkg-owncloud-commits] [owncloud] 50/239: Prevent using root as mount point for external storage

David Prévot taffit at moszumanska.debian.org
Fri Nov 29 01:32:18 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 0b2c9b823c7b421d4305cb25a85074dbde14bc12
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Thu Nov 21 17:21:51 2013 +0100

    Prevent using root as mount point for external storage
    
    Fixes #5981
---
 apps/files_external/lib/config.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 4364307..de42fe2 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -266,6 +266,11 @@ class OC_Mount_Config {
 										 $mountType,
 										 $applicable,
 										 $isPersonal = false) {
+		$mountPoint = OC\Files\Filesystem::normalizePath($mountPoint);
+		if ($mountPoint === '' || $mountPoint === '/') {
+			// can't mount at root
+			return false;
+		}
 		if ($isPersonal) {
 			// Verify that the mount point applies for the current user
 			// Prevent non-admin users from mounting local storage

-- 
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