diff options
author | Morris Jobke <hey@morrisjobke.de> | 2014-09-24 00:37:42 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-09-24 00:37:42 +0200 |
commit | 66a17cac31f6f0ac3aebdf75e722be4a68beddc1 (patch) | |
tree | 29a5f1795d95e737c7f6ab9ac98ef4dbc4dc26d8 | |
parent | e5793e8e0c9802ecd066e8684cdaf3921ea4d070 (diff) | |
parent | aeb516c3c9d8c21231ffb91233407c1e0043c625 (diff) | |
download | nextcloud-server-66a17cac31f6f0ac3aebdf75e722be4a68beddc1.tar.gz nextcloud-server-66a17cac31f6f0ac3aebdf75e722be4a68beddc1.zip |
Merge pull request #11265 from owncloud/fix-11264
Check for blacklisted characters
-rw-r--r-- | apps/files_sharing/ajax/external.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_sharing/ajax/external.php b/apps/files_sharing/ajax/external.php index 544a97e80be..6d68b5f7f82 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(), |