Provide a way to validate SVG files
Describe the bug
Orchard Core version
main
To Reproduce
Expected behavior
<PackageReference Include="Svg" Version="3.4.7" />
Logs and screenshots
Can you rephrase your questions? Is your problem that SVG tags are not rendered correctly?
No. Because Media module allows .SVG WHICH IS RISK FOR ATTACK
So your issue is that when users allow svg files to be uploaded they could be a threat? I believe svg files are allowed by default based on this doc https://docs.orchardcore.net/en/latest/reference/modules/Media/#configuration
1- You can disable this extension, the same way .exe or .zip are not allowed by default 2- We could add a feature that would allow custom implementations to validate file when they are uploaded (independently of the extension) to add some validation (size, format, threats, ...)
We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).
This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.
For 2., that could be a new method in IMediaEventHandler.
For 1, I had #17840
It seems that this issue didn't really move for quite a while despite us asking the author for further feedback. Is this something you'd like to revisit any time soon or should we close? Please reply.
Closing this issue because it didn't receive further feedback from the author for very long. If you think this is still relevant, feel free to reopen it with the requested details.