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

Abierto
#107 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
74/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
rust
Área
backend, security

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
4
Forks
1
Merge medio
4 h 49 min
PR fusionados (30 d)
5

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de tinystream-dev/tinystream

Todos los issues de tinystream-dev/tinystream

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.