Image size ignores EXIF orientation, and the SVG sanitizer keeps external references
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Read src/plugins/FluentCMS.Plugins.Media/ImageSize.cs, MediaService.cs, SkiaImageProcessor.cs, and SvgDocument.cs, then review linked issue #3281 because it changes the same image processing. Trace how dimensions and SVG references are handled, and check the media tests. Done means EXIF-oriented dimensions are reported correctly, existing assets are backfilled, external SVG references and escaped @import are removed, and each behavior has a test.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
- Stored width and height ignore EXIF orientation. The size is read from the raw header (
src/plugins/FluentCMS.Plugins.Media/ImageSize.cs:65-122, used atMediaService.cs:927), while transforms swap for a turned image (SkiaImageProcessor.cs:41,99). A portrait phone JPEG reports its width and height swapped to API consumers. - The SVG sanitizer keeps external references. Remote
href/xlink:href,<use>,<image>andurl(https://…)are kept; onlyjavascript:,vbscript:and non-imagedata:are dropped (SvgDocument.cs:133-153).@importis removed by a string match (:155-159) that a CSS escape such as@\69mportpasses. The CSP sandbox covers a file served by the CMS (MediaEndpoints.cs:30,165-167), not an inlined SVG or a CDN that drops the header.
Proposal
- Take the size from
IImageProcessor.IdentifyAsync; backfill existing assets with a job. - Allow only same-document
#fragmentreferences, strip remoteurl(), and match@importafter unescaping.
Done together with #3281, which changes the same image processing.
Acceptance
- An image with a turned EXIF orientation reports the size it displays at
- Existing assets are corrected by the backfill
- A sanitized SVG contains no reference outside the document
- An escaped
@importis removed - Tests for each
Found in the code review of 17 Nov 2026.
- Lenguaje dominante
- C#
- Estrellas
- 569
- Forks
- 107
- Merge medio
- 2 h 49 min
- PR fusionados (30 d)
- 397
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de fluentcms/FluentCMS
-
area:host area:operations type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
area:build security type:chore
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
area:sdk security type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
area:content security type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
area:build type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
Todos los issues de fluentcms/FluentCMS
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
microsoft/microsoft-ui-reactor#1567 ·
Los mantenedores suelen responder en 1 día
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
openclaw/openclaw-windows-node#2287 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
kind:ux needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
elsa-workflows/elsa-foundation#4742 ·
Los mantenedores suelen responder en 1 día
-
priority:P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100