check if the user is trying to scan a valid path
This commit is contained in:
parent
4edfadac96
commit
f74525c349
1 changed files with 3 additions and 0 deletions
|
@ -131,6 +131,9 @@ class Scanner extends PublicEmitter {
|
|||
* @throws \OC\ForbiddenException
|
||||
*/
|
||||
public function scan($dir = '') {
|
||||
if (!Filesystem::isValidPath($dir)) {
|
||||
throw new \InvalidArgumentException('Invalid path to scan');
|
||||
}
|
||||
$mounts = $this->getMounts($dir);
|
||||
foreach ($mounts as $mount) {
|
||||
if (is_null($mount->getStorage())) {
|
||||
|
|
Loading…
Reference in a new issue