-
Notifications
You must be signed in to change notification settings - Fork 20
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
URL XSS issue #183
Labels
Comments
Additional tiny improvement might be added by updating format_xss.js function of function isUriAttribute(name) {
return name === 'href' || name === 'src';
} into function isUriAttribute(name) {
return name === 'href' || name === 'src' || name === 'srcset';
} as I believe that |
it's a bit more complicated: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attr-srcset |
tripodsan
added a commit
that referenced
this issue
Jun 30, 2020
tripodsan
added a commit
that referenced
this issue
Jun 30, 2020
🎉 This issue has been resolved in version 4.5.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the xss_api.js there is a function for sanitize URL which does not allow for not correct URL to be rendered.
What is is odd for me is the way it is constructed.
The following URL
https://via.placeholder.com/1280x550&text=desktop%201280x550
is marked as invalid.
The problematic part is an escaped space character
%20
. Because its escaped version looks like this:https://via.placeholder.com/1280x550&text=desktop 1280x550
which is not a valid URL
To make this valid you need to double escape the space
%20
->%2520
:https://via.placeholder.com/1280x550&text=desktop%25201280x550
Why the test function decodes the
url
before checking if it is a valid URI?The text was updated successfully, but these errors were encountered: