Near-duplicate dedup rebuilt on three gates, backup credential leak closed, library consolidation started #255

Merged
bvandeusen merged 8 commits from dev into main 2026-09-21 11:11:39 -04:00
Showing only changes of commit 9728407539 - Show all commits
+6
View File
@@ -54,6 +54,12 @@ def _misplaced_conditions(images_root: Path, artist_id: int, slug: str) -> list:
`ara` would match every path under `arbuzbudesh/`, and the sweep would
report one artist's whole library as correctly placed while quietly
skipping another's.
`startswith` compiles to LIKE, where `_` and `%` are wildcards, and this
does not escape them. That is safe ONLY because `utils.slug.slugify`
reduces a slug to `[a-z0-9-]` — neither character can reach the pattern.
Widen that charset and this needs `autoescape=True`, or `poch4n_art`
starts matching `poch4nXart` too.
"""
prefix = f"{canonical_dir(images_root, slug)}/"
return [