Skip to content

Conversation

@mrooney
Copy link

@mrooney mrooney commented Jun 11, 2011

Without this fix, a link such as:

http://xss.com/"onmouseover=alert('XSS');//

is a vulnerability.

I don't know how to minify the code so it would need a regen of the minified code, but this addresses the issue AFAIK.

…ding arbitrary scripts in onmouseover/onclick
@jbaudanza
Copy link

The problem with this is that non-malicious links will already be properly URI encoded. Calling encodeURI will double encode them. Perhaps something like this would be more appropriate:

if (href) {
  href = href.replace('"', '%22');
}

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants