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 ;-))
This commit is contained in:
parent
75e45ac786
commit
aeb516c3c9
1 changed files with 6 additions and 0 deletions
|
@ -24,6 +24,12 @@ $owner = $_POST['owner'];
|
||||||
$name = $_POST['name'];
|
$name = $_POST['name'];
|
||||||
$password = $_POST['password'];
|
$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(
|
$externalManager = new \OCA\Files_Sharing\External\Manager(
|
||||||
\OC::$server->getDatabaseConnection(),
|
\OC::$server->getDatabaseConnection(),
|
||||||
\OC\Files\Filesystem::getMountManager(),
|
\OC\Files\Filesystem::getMountManager(),
|
||||||
|
|
Loading…
Reference in a new issue