SVG files can contain embedded script or even SVG content + something else content and finfo_file will still consider the file as SVG. We need to sanitize the SVG file. @Renarde-dev has found this dedicated library https://github.com/darylldoyle/svg-sanitizer
SVG files can contain embedded script or even SVG content + something else content and `finfo_file` will still consider the file as SVG. We need to sanitize the SVG file. @Renarde-dev has found this dedicated library https://github.com/darylldoyle/svg-sanitizer
<!-- github-sync-id:4330556443 -->
I tested the library with a lot of valid and malicious SVGs, everything works.
SVG that contains MSL or href to local files are detected.
I tested the library with a lot of valid and malicious SVGs, everything works.
SVG that contains MSL or `href` to local files are detected.
<!-- github-comment-id:4335724761 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
SVG files can contain embedded script or even SVG content + something else content and
finfo_filewill still consider the file as SVG. We need to sanitize the SVG file. @Renarde-dev has found this dedicated library https://github.com/darylldoyle/svg-sanitizerI tested the library with a lot of valid and malicious SVGs, everything works.
SVG that contains MSL or
hrefto local files are detected.