-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
respond-proxy.html has XSS issue #359
Comments
Confirmed. |
@scottjehl any update on this? |
So, deprecating the cross-domain proxy is definitely the first thing I'd like to do. A server proxy, while annoying, is likely the better way to handle this situation. I hope you agree. The proxy has been deprecated in the readme since October, so I think a new point release should remove it. |
I added the following in respond-proxy.html#L87 in order to have a minimal protection. // XSS protection
if(domain.toLowerCase().indexOf('javascript') !== -1) {
domain = null;
} Not sure if it is possible to pass through. |
Can we not do whitelisting, i.e. only accept URLs starting with http:// and https://? |
For example:
http://yourcdn.com/respond-proxy.html?url=javascript:alert(19890611520);&css=http://yourcdn.com/test.css
Code: https://github.com/scottjehl/Respond/blob/master/cross-domain/respond-proxy.html#L90
The text was updated successfully, but these errors were encountered: