mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-17 17:51:20 +08:00
* fix: prevent path traversal in backup importer (CWE-22) Validate that all file write targets resolve within their expected base directories before writing. This prevents crafted backup ZIP files from writing to arbitrary filesystem locations via malicious path values in attachment records, media file paths, or directory entries. * fix: use Path.is_relative_to for robust path containment check * fix: add explicit strict=False to Path.resolve() calls * style: format backup importer --------- Co-authored-by: 邹永赫 <1259085392@qq.com>