Page MenuHomePhorge

Pholio support for .svg file extension
Closed, ResolvedPublic

Asked by CryingWolf on Mar 14 2024, 15:58.

Details

Greetings!

Recently I tried adding a .svg file to a Mock as it might be a neat way to track changes to such a file over time. However, instead of seeing my uploaded .svg as an 'image', all I can see is a spooky ghost.

image.png (559×575 px, 25 KB)

Would it be possible to add support for this type of file in Mock, or are there reasons why that may not be a good idea?

Thanks in advance!

Answers

avivey
Updated 281 Days Ago

That would be hard - SVGs are unsafe (At least as of a few years ago) - https://secure.phabricator.com/T6445#157697

SVGs are in practice just tiny programs that run in the browser; Rendering one is not much different from allowing users to upload JS file and run that.

There are some possible ways to work around that - like filtering some of the content of the SVG or rendering it to PNG server-side, but all of them are complex and have their limitations.

It's really time for someone to specify a safe variant/alternative for SVG;

New Answer

Answer

This question has been marked as closed, but you can still leave a new answer.