Merge pull request #7535 from mcmonkey4eva/fix-symlink-extra-network
fix symlinks in extra networks ui
This commit is contained in:
commit
3993aa43e9
@ -26,7 +26,7 @@ def add_pages_to_demo(app):
|
|||||||
def fetch_file(filename: str = ""):
|
def fetch_file(filename: str = ""):
|
||||||
from starlette.responses import FileResponse
|
from starlette.responses import FileResponse
|
||||||
|
|
||||||
if not any([Path(x).resolve() in Path(filename).resolve().parents for x in allowed_dirs]):
|
if not any([Path(x).absolute() in Path(filename).absolute().parents for x in allowed_dirs]):
|
||||||
raise ValueError(f"File cannot be fetched: {filename}. Must be in one of directories registered by extra pages.")
|
raise ValueError(f"File cannot be fetched: {filename}. Must be in one of directories registered by extra pages.")
|
||||||
|
|
||||||
ext = os.path.splitext(filename)[1].lower()
|
ext = os.path.splitext(filename)[1].lower()
|
||||||
|
Loading…
Reference in New Issue
Block a user