-
Notifications
You must be signed in to change notification settings - Fork 93
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
Security options #227
Comments
I agree that PHP-SVG is currently lacking in the security department. I think there are two different aspects here (please correct me if I misunderstood):
For (1.) we would need to audit the code for weaknesses in the implementation, create test cases, and implement fixes. Setting configurable limits e.g. for the size of embedded images would also be a possibility, along with additional input validation. For (2.) we would need to design an API for sanitizing the output of PHP-SVG. Either we make it generic in some way, such that users can filter out anything they want easily, or we design it with specific options for each thing that someone may want to filter. In the latter case, we'd need a list of each such thing. You suggest distant files and scripts: Perhaps someone also wants to filter stylesheets, or fonts (perhaps every font, perhaps only external fonts), or embedded images (all of them or only some URLs?). I don't have a plan right now. Anyone is welcome to suggest something to fit their use case, however :) |
Yep i was more thinking about the second one, but your 1 is very valid too. Did you look at the Sylmfony HtmlSanitizer source code ? I guess we could take inspiration there t create a SvgSanitizer ? (and -full disclosure- this would 100% be something i'd gladly use in UxIcons afterwards) |
@smnandre there is |
On this repo i don't want anything :) I don't know enshrined/svg-sanitize i'll take a look thanks! ... and i'm not sure you'll often see me ask for aditional lirbaries .. as for me the perfect PR removes dependencies :) |
Yeah i also like less dependencies :D |
Do you have any plans concerning security? As i see it, there are two things i'd like to limit/control
Do you have any plan / vision on the matter? How would you handle those, can i help you and how?
The text was updated successfully, but these errors were encountered: