refactor(artifacts): extract resolve_artifact_path to shared module

Move artifact path validation + symlink-escape check out of the
admin-gated download endpoint into decnet/artifacts/paths.py so the
TTP EmailLifter can disk-reach .eml files at tag-time without
duplicating regex/root logic (DEBT-047).

The router now catches ArtifactPathError and re-raises HTTPException(400);
behavior is unchanged.
This commit is contained in:
2026-05-02 20:02:47 -04:00
parent cdbb3d3571
commit 7036a86e76
6 changed files with 186 additions and 49 deletions

View File