Coder Social home page Coder Social logo

Comments (7)

meteficha avatar meteficha commented on July 23, 2024

It looks like a bug for me.

from shakespeare.

snoyberg avatar snoyberg commented on July 23, 2024

This is the intended behavior. Whether we should change it, or how we should document it, are good questions. Can you raise them on the mailing list?

from shakespeare.

gregwebs avatar gregwebs commented on July 23, 2024

I also think this behavior is problematic. We should be documenting how to avoid any hassles from automatic safety, not how to make things safe.

from shakespeare.

snoyberg avatar snoyberg commented on July 23, 2024

This is far from a simple matter, which is why I closed the issue in favor of discussing it on the mailing list. The presumption underlying it is that Julius interpolation is fixated on values which will be included in JS string literals. I'm not convinced that this is what people are expecting: it may be quite disconcerting for a user to try and interpolate some JS code and have to escaped as if it were appearing inside of string.

from shakespeare.

gregwebs avatar gregwebs commented on July 23, 2024

Yeah, so from a security standpoint it matters little whether it will be a string literal or something else. To be secure we shouldn't allow any code whatsoever, only JS values.
This is plausible: if someone wants to insert JS code, they can insert a widget.
It would also be a major change: instead of ToJavascript we would probably need to use ToJSON.

from shakespeare.

snoyberg avatar snoyberg commented on July 23, 2024

So should we only interpolate Data.Aeson.Value values? When we
interpolate a Text, should it have quotes automatically added? Should we
apply entity escaping as well to properly avoid XSS attacks? There are a
lot of questions, and I think this is anything but obvious. That's why I'd
rather close the issue and discuss it on the list.

from shakespeare.

gregwebs avatar gregwebs commented on July 23, 2024

@joeyadams do you want to ask this on the mail list?

from shakespeare.

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.