[Bug]: Authenticated images are sent as publicly cacheable and immutable

Aperta
#107 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
backend, security

Direzione di ricerca

Start at the header construction in src/api/images.rs around line 16, where Cache-Control: public, max-age=604800, immutable is emitted, and check which image routes sit behind auth so only those switch to private. Read src/api/library.rs for the existing ?v=…&l=… versioning scheme, then apply it to the poster URLs built in src/automation/series.rs, src/automation/import.rs and src/api/automation.rs. Done means authenticated image responses are privately cacheable and the automation/notification URLs change when artwork does; note the report was from code reading, so confirm on a running server if you can.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

[!NOTE]
This issue was written by Claude (Claude Opus 5.5) from a code review session with @PhrolovaMoe. It was found by reading the code and hasn't been reproduced on a running server.

Version

0.40.0 (feat/desktop, 017a837b)

Area

Other

What happened?

Item art, season posters and stills are only for signed-in users with library access, but are sent with Cache-Control: public, max-age=604800, immutable (src/api/images.rs:16), so a shared cache or proxy may store and serve them to others. Also, the poster URLs built by automation and notifications (/api/images/item/{id}/poster, e.g. in src/automation/series.rs, src/automation/import.rs, src/api/automation.rs) have no ?v=, so after artwork changes browsers keep the old picture for a week.

Expected behavior

Private caching for authenticated images, and URLs that change when the artwork does.

Suggested fix

Use private, max-age=604800, immutable for everything behind auth, and add the same ?v=…&l=… versioning src/api/library.rs uses to the automation/notification URLs.

Lingua principale
TypeScript
Stelle
4
Fork
1
Merge medio
4h 49m
PR unite (30g)
5

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tinystream-dev/tinystream

Tutte le issue di tinystream-dev/tinystream

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.