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

Offen
#107 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
Ein halber Tag
Anfängerfreundlichkeit
74/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
rust
Bereich
backend, security

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
TypeScript
Sterne
4
Forks
1
Ø Merge
4 Std. 49 Min.
Gemergte PRs (30 T.)
5

Entwicklungsumgebung

  • Enthält ein Dockerfile oder eine Docker-Compose-Datei
  • Keine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus tinystream-dev/tinystream

Alle Issues in tinystream-dev/tinystream

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.