Skip to content

Fix/xss issues on data attributes - #27047

Merged
Johann-S merged 5 commits into
twbs:v3.4.0-devfrom
don-spyker:fix/xss-issues-on-data-attributes
Aug 13, 2018
Merged

Fix/xss issues on data attributes#27047
Johann-S merged 5 commits into
twbs:v3.4.0-devfrom
don-spyker:fix/xss-issues-on-data-attributes

Conversation

@don-spyker

@don-spykerdon-spyker commented Aug 10, 2018

Copy link
Copy Markdown

fix of xss issues that have been fixed in v4.x already + fix of two additional xss issues

Fixes#26625 / CVE-2018-14040
Fixes#26628 / CVE-2018-14042
Fixes#27044 / CVE-2018-20676
Fixes#27045 / CVE-2018-20677

@don-spykerdon-spyker reopened this Aug 10, 2018
@don-spyker
don-spykerforce-pushed the fix/xss-issues-on-data-attributes branch from 5fd1134 to ae29b6aCompareAugust 10, 2018 12:41
@don-spykerdon-spyker mentioned this pull request Aug 10, 2018
Comment threadjs/affix.js
this.options = $.extend({}, Affix.DEFAULTS, options)

this.$target = $(this.options.target)
var target = this.options.target === Affix.DEFAULTS.target ? $(this.options.target) : $(document).find(this.options.target)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is no need for your ternary here: $(document).find(this.options.target) is enough

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I tried that first, but that broke the functionality as the default is "window" and $(document).find('window') didn't work while $(window) evaluates correctly.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok I understand 👍

@Johann-SJohann-S left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You need unit test for each plugins you changed

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@don-spyker@Johann-S