Commit e16c78c
committed
Reject path-traversal entries in test fixture ZIP extraction
Copilot review on #426 flagged that extract_addon_from_zip() trusted
the zip entry path after only checking the addons/godot_ai/ prefix;
a member like addons/godot_ai/../../outside would let target_addon/rel
escape the fixture directory. The runtime installer's
_is_safe_zip_addon_file() in update_reload_runner.gd already rejects
absolute paths and "." / ".." segments; mirror that guard in the
Python test helper.
Live-verified: a synthetic zip with an addons/godot_ai/../../escape.txt
member now raises ValueError with a clear message; clean zips still
extract normally. 903 pytest tests pass.
https://claude.ai/code/session_01VgXf3Lqv2ypt36g6EqpRYg1 parent 0e1ae91 commit e16c78c
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
282 | 287 | | |
283 | 288 | | |
284 | 289 | | |
| |||
0 commit comments