Small fixes (#13333)

* add missing catch

* use replaceAll instead

* add explicit expects to fix juint result reporting

* fix path traversal

* try make this more stable

* use a loop to make this more stable against autoclosing menus

* plugins are somewhat unpredictable so adding some slck
This commit is contained in:
Matthias Mair authored and GitHub committed 2026-11-22 08:45:01 +11:00
1 parent 7933454b89
commit 6c5cb2910a
9 files changed
+70 -33

No files matched your search

+7 -1
View File
@@ -145,7 +145,13 @@ def _copy_plugin_static_files(slug: str):
continue
relative_path = item.relative_to(source_path).as_posix()
target = staging_path / relative_path
target = staging_path.joinpath(relative_path)
try:
target.relative_to(staging_path, walk_up=False)
except ValueError:
raise ValueError(
f"Target path '{target}' is not within staging path '{staging_path}'"
)
target.parent.mkdir(parents=True, exist_ok=True)
target.write_bytes(item.read_bytes())