Skip to content

[12.x] Document image rule SVG security changes #10136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

SanderMuller
Copy link
Contributor

@SanderMuller SanderMuller commented Jan 25, 2025

This pull request updates the validation documentation to reflect the 12.x changes for image validation, focusing on secure defaults and better guidance for developers.

Key Updates:

  • SVG Default Exclusion:
    The documentation highlights that SVG files are excluded by default in the image and File::image() rules due to potential XSS risks.

  • Opt-In SVG Allowance:
    Provides examples for explicitly allowing SVGs using image:allow_svg or File::image(allowSvg: true). Developers are encouraged to sanitize SVGs manually if they enable this option.

  • Actionable Warnings:
    Adds warning blocks to raise developer awareness about SVG risks and encourage secure handling practices.

@taylorotwell
Copy link
Member

Can you undo all of the unrelated changes to the XSS stuff and resubmit please? It makes this hard to follow and those changes can be submitted separately to 11.x.

@taylorotwell taylorotwell marked this pull request as draft January 27, 2025 00:12
@SanderMuller SanderMuller marked this pull request as ready for review January 27, 2025 16:47
@SanderMuller
Copy link
Contributor Author

Can you undo all of the unrelated changes to the XSS stuff and resubmit please? It makes this hard to follow and those changes can be submitted separately to 11.x.

I think I've scoped it down to what you've asked for

@taylorotwell taylorotwell merged commit 38946b4 into laravel:master Jan 27, 2025
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.

2 participants