Image size ignores EXIF orientation, and the SVG sanitizer keeps external references
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- C#
- Stars
- 569
- Forks
- 107
- Avg merge
- 2h 49m
- Merged PRs (30d)
- 397
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fluentcms/FluentCMS
-
area:host area:operations type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area:build security type:chore
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area:sdk security type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area:content security type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
area:build type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
All issues in fluentcms/FluentCMS
Similar issues
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
microsoft/microsoft-ui-reactor#1567 ·
Maintainers usually reply within 1 day
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
openclaw/openclaw-windows-node#2287 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
kind:ux needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
elsa-workflows/elsa-foundation#4742 ·
Maintainers usually reply within 1 day
-
priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue help wanted new-language
Difficulty 2/5 1-3 hours Newbie friendliness 82/100