Skip to content

Improve XSS check for <a href> #100

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

Merged
merged 5 commits into from
Dec 10, 2015
Merged

Improve XSS check for <a href> #100

merged 5 commits into from
Dec 10, 2015

Conversation

etpinard
Copy link
Contributor

@scjody @alexcjohnson @bpostlethwaite @mdtusz @cldougl

plotly.js is currently vulnerable to

{
  title: '<a href="javascript:alert(\'attack\')">XSS</a>'
}

now only certain protocols can be set in plotly href tags.

@@ -221,6 +221,8 @@ var TAG_STYLES = {
em: 'font-style:italic;font-weight:bold'
};

var PROTOCOLS = ['http:', 'https:', 'mailto'];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anything else?

@alexcjohnson
Copy link
Collaborator

Easy. 💃

@scjody
Copy link
Contributor

scjody commented Dec 10, 2015

💃. Nice tests!

etpinard added a commit that referenced this pull request Dec 10, 2015
Improve XSS check for <a href>
@etpinard etpinard merged commit d06de72 into master Dec 10, 2015
@etpinard etpinard deleted the href-xss branch December 10, 2015 21:31
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.

3 participants