-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
XSS protection - hook on runtime vnode patching? #8657
Comments
eem, I'm not sure about this.
What I think would make more sense is to either add an entry to the cookbook or a page about XSS in the docs cc @chrisvfritz @sdras |
Agreed on the possible performance impact. I will try to do the xss filter check in compile phase. Meanwhile, more detailed XSS explanation in docs could be great. |
Btw, this is what I have so far in our upcoming security guide regarding this specific issue:
Feedback welcome. 🙂 |
Mention Also, it just occur to me: if security checks may impact performance, is it possible to do that checking in development mode, warning people about these potential xss vulnerabilities when detected? |
It's not really possible to add a warning in development mode as we cannot know if the data is untrusted. So we could only warn if we find something like |
@OpenGG I do mention event attributes like that. 🙂 |
What problem does this feature solve?
The following code is vulnerable to XSS attacks:
Web devs can do filtering in application level, via custom filters. However there are problems too:
What really interests me is xss filtering in renderer or vnode level, while being kept transparent to application code.
What does the proposed API look like?
Vue.vnodeHooks.prepatch(vnode => {})
, called before patching, for every vnode.The text was updated successfully, but these errors were encountered: