mirror of
https://github.com/nextcloud/server.git
synced 2026-07-16 13:23:11 -04:00
Merge pull request #11265 from owncloud/fix-11264
Check for blacklisted characters
This commit is contained in:
commit
66a17cac31
1 changed files with 6 additions and 0 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue