Giter Site home page Giter Site logo

Comments (9)

luceos avatar luceos commented on July 17, 2024

Good point, allowing svg is a must have! Feel free to do a PR (you can even do this with the Github editor).

from upload.

jtojnar avatar jtojnar commented on July 17, 2024

I love SVGs but they also bring wide range of vulnerabilities. When inserted as an image, the contained scripts will not be executed but once the image is uploaded on the server, user just needs to be convinced to visit the link for havoc to be wrought.

from upload.

pierstitus avatar pierstitus commented on July 17, 2024

With great features come vulnerabilities, but that should be decided by the forum admin by allowing the svg mimetype or not. It would be nice though to be able to choose whether images are inserted as images or as links.

from upload.

jtojnar avatar jtojnar commented on July 17, 2024

I agree that admins should have say in this but if flagrow/upload is striving to be a secure software, it should

  1. inform the user about possible consequences, and
  2. try to mitigate the risk (at least by using SVG sanitizer).

Either way, security minefields should not be enabled by default.

from upload.

luceos avatar luceos commented on July 17, 2024

@jtojnar thanks for that link I think it would make for a great optional add-on feature. A solution for now would be to add a settings input field that would allow configuration of mime types being shown as images. Wouldn't that solve this all together?

from upload.

jtojnar avatar jtojnar commented on July 17, 2024

@luceos Showing the SVGs as images (via img tag) is actually safe. The issue occurs when the uploaded file is visited directly.

from upload.

luceos avatar luceos commented on July 17, 2024

I've merged the PR but adding SVG sanitizer makes sense.

from upload.

sijad avatar sijad commented on July 17, 2024

maybe it can be possible to force some specified extension (like svg) be download via php with Content-Disposition: attachment header. it might be aslo possible achieve same thing using .htaccess for Apache.

from upload.

imorland avatar imorland commented on July 17, 2024

Resolved in 1.2.3

from upload.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.