file_manager: disallow drilling down protected folders
Signed-off-by: Kurt Haenen <kurt.haenen@gmail.com>
This commit is contained in:
parent
6f43940270
commit
130c2a48f0
|
@ -491,6 +491,7 @@ class FileManager:
|
|||
if not os.path.isdir(path):
|
||||
raise self.server.error(
|
||||
f"Directory does not exist ({path})")
|
||||
self.check_reserved_path(path, False)
|
||||
flist: Dict[str, Any] = {'dirs': [], 'files': []}
|
||||
for fname in os.listdir(path):
|
||||
full_path = os.path.join(path, fname)
|
||||
|
|
Loading…
Reference in New Issue