Sanitize file names taken from server metadata (closes #9) #78

Merged
clawbot merged 1 commits from issue-9-sanitize-filenames into next2 2026-09-23 02:04:32 +02:00
1 Commits
Author SHA1 Message Date
sneak 047f63c776 Sanitize file names taken from server metadata (closes #9)
check / check (push) Successful in 30s
A file title or album name decrypted from server data could name a path
outside the chosen directory (`../../.ssh/authorized_keys`). One module,
src/filename.ts, now makes such names safe for `quak get`/`get-thumb`
without `--out`, downloadFile/downloadThumbnail without outPath, and the
backup and metadata backup trees. Originals-cache extensions are limited to
letters and digits. A user-supplied path is still used as is. decryptFile
reads a missing or non-string title as "" and rejects metadata that is not
a JSON object.

Model: opus-5-5
2026-09-22 23:41:58 +00:00