[Pkg-owncloud-commits] [owncloud] 139/258: Check for blacklisted characters

David Prévot taffit at moszumanska.debian.org
Sat Oct 11 17:22:29 UTC 2014


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

taffit pushed a commit to branch master
in repository owncloud.

commit 00bb0e122f10437b0a3e51142d9530234cccc471
Author: Lukas Reschke <lukas at owncloud.com>
Date:   Tue Sep 23 19:30:32 2014 +0200

    Check for blacklisted characters
    
    Fixes https://github.com/owncloud/core/issues/11264
    
    (This should in future get moved to the mountpoint class - but that is something for @icewind1991 ;-))
---
 apps/files_sharing/ajax/external.php | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/apps/files_sharing/ajax/external.php b/apps/files_sharing/ajax/external.php
index 0dbd3ab..5caa29e 100644
--- a/apps/files_sharing/ajax/external.php
+++ b/apps/files_sharing/ajax/external.php
@@ -24,6 +24,12 @@ $owner = $_POST['owner'];
 $name = $_POST['name'];
 $password = $_POST['password'];
 
+// Check for invalid name
+if(!\OCP\Util::isValidFileName($name)) {
+	\OCP\JSON::error(array('data' => array('message' => $l->t('The mountpoint name contains invalid characters.'))));
+	exit();
+}
+
 $externalManager = new \OCA\Files_Sharing\External\Manager(
 	\OC::$server->getDatabaseConnection(),
 	\OC\Files\Filesystem::getMountManager(),

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