Skip to content
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

Improve XSS check for <a href> #100

Merged
merged 5 commits into from Dec 10, 2015

Conversation

@etpinard
Copy link
Member

commented Dec 10, 2015

@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'];

This comment has been minimized.

Copy link
@etpinard

etpinard Dec 10, 2015

Author Member

anything else?

@alexcjohnson

This comment has been minimized.

Copy link
Contributor

commented Dec 10, 2015

Easy. 💃

@scjody

This comment has been minimized.

Copy link
Contributor

commented Dec 10, 2015

💃. Nice tests!

etpinard added a commit that referenced this pull request Dec 10, 2015
Merge pull request #100 from plotly/href-xss
Improve XSS check for <a href>

@etpinard etpinard merged commit d06de72 into master Dec 10, 2015

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@etpinard etpinard deleted the href-xss branch Dec 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.