diff --git a/PLANS.md b/PLANS.md index 3ac4a56..8bd2c70 100644 --- a/PLANS.md +++ b/PLANS.md @@ -18,3 +18,17 @@ fix: single query with `WHERE t.album_id = ANY($1::uuid[])` — already batched ### verification `comfortGenerator` and `deepDiveGenerator` are tested in `generators.test.ts` + +## 2. SSRF guard (images.routes.ts) + +current: only checks `url.startsWith('http://') || url.startsWith('https://')` — trivial bypass +fix: add domain allowlist of known image hosts, validate after redirect + +allowed domains: +- coverartarchive.org + *.coverartarchive.org +- lastfm.freetls.fastly.net +- i.scdn.co (spotify) +- images.genius.com +- *.musicbrainz.org +- commons.wikimedia.org +- e.snmc.io