Skip to content
Snippets Groups Projects
Commit 0b2c9b82 authored by Vincent Petry's avatar Vincent Petry
Browse files

Prevent using root as mount point for external storage

Fixes #5981
parent 3e1ade43
Branches
No related tags found
No related merge requests found
......@@ -266,6 +266,11 @@ class OC_Mount_Config {
$mountType,
$applicable,
$isPersonal = false) {
$mountPoint = OC\Files\Filesystem::normalizePath($mountPoint);
if ($mountPoint === '' || $mountPoint === '/') {
// can't mount at root
return false;
}
if ($isPersonal) {
// Verify that the mount point applies for the current user
// Prevent non-admin users from mounting local storage
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment