Skip to content
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

🚀 Feature: Support of SVG files view with file storage #2811

Open
2 tasks done
kamal951 opened this issue Feb 18, 2022 · 2 comments
Open
2 tasks done

🚀 Feature: Support of SVG files view with file storage #2811

kamal951 opened this issue Feb 18, 2022 · 2 comments
Labels
enhancement New feature or request product / console Console, UI and UX issues

Comments

@kamal951
Copy link

🔖 Feature description

You should add the possibility to be able to see SVG files when we do the "view file" request.

For now, it works great for other types like png or jpeg but when we try to see an svg, we have plain text.

🎤 Pitch

This feature should be implemented because SVG files are generally lighter than other types so we could store more images and the perfomances would be better.

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@kamal951 kamal951 changed the title 🚀 Feature: Support of SVG files in strorage 🚀 Feature: Support of SVG files in storage Feb 18, 2022
@kamal951 kamal951 changed the title 🚀 Feature: Support of SVG files in storage 🚀 Feature: Support of SVG files view with file storage Feb 18, 2022
@MarvinJWendt
Copy link

If this gets implemented, it should be made sure that there aren't any XSS vulnerabilities, since user uploaded SVGs could potentially execute any JavaScript and steal the appwrite session token, which would grant access to the admin interface.

Reference

And yes, this works with modern browsers too 😉

@lohanidamodar lohanidamodar added the enhancement New feature or request label Mar 20, 2022
@stnguyen90 stnguyen90 added the product / console Console, UI and UX issues label Jan 6, 2023
@SkypLabs
Copy link

If this gets implemented, it should be made sure that there aren't any XSS vulnerabilities, since user uploaded SVGs could potentially execute any JavaScript and steal the appwrite session token, which would grant access to the admin interface.

Precisely. I actually stumbled upon this issue while doing research on the way AppWrite handles uploaded files' content type in responses, in particular about SVG files to avoid potential XSS problems.

One way to deal with it is to use a different hostname for accessing uploaded files. This way, the AppWrite's session cookie would not be accessible via JavaScript even if an XSS is triggered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request product / console Console, UI and UX issues
Projects
None yet
Development

No branches or pull requests

5 participants