Skip to content

[6.x] Harden SVG sanitization - #15095

Open
duncanmcclean wants to merge 2 commits into
6.xfrom
svg-sanitization-extension-case
Open

[6.x] Harden SVG sanitization#15095
duncanmcclean wants to merge 2 commits into
6.xfrom
svg-sanitization-extension-case

Conversation

@duncanmcclean

Copy link
Copy Markdown
Member

This pull request fixes an issue where SVG sanitization was skipped for uppercase or mixed-case .svg extensions (e.g. image.SVG), since Uploader::write() checked the extension case-sensitively.

This PR fixes it by lowercasing the destination path before checking its extension.

`Uploader::write()` used a case-sensitive check against `.svg`, so
files like `image.SVG` would bypass `Svg::sanitize()` entirely.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant