Skip to content

Rule Proposal: no-v-html to prevent potential XSS attacks #434

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

Closed
n-zeplo opened this issue Mar 16, 2018 · 1 comment
Closed

Rule Proposal: no-v-html to prevent potential XSS attacks #434

n-zeplo opened this issue Mar 16, 2018 · 1 comment

Comments

@n-zeplo
Copy link
Contributor

n-zeplo commented Mar 16, 2018

Please describe what the rule should do:

This rule errors or warns developers of the use of v-html and its potential to lead to XSS attacks.

What category of rule is this? (place an "X" next to just one item)

[ ] Enforces code style
[ ] Warns about a potential error
[ ] Suggests an alternate way of doing something
[X] Other (please specify:) Security enhancement

Provide 2-3 code examples that this rule will warn about:

    Why should this rule be included?

    Injecting unescaped html into the view can be unsafe depending on the source of the html. If it ties into user input it has the potential for XSS attacks. This rule should be able to set as warning and optional as this directive might be needed for trusted HTML coming from the server side.

    Similar implementation in react eslint ruleset.

    @michalsnik
    Copy link
    Member

    Released in v4.7.0 :) Thanks @n-zeplo !

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants