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

Fix/xss issues on data attributes #27047

Merged

Conversation

@don-spyker
Copy link

@don-spyker don-spyker commented Aug 10, 2018

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-spyker don-spyker closed this Aug 10, 2018
@don-spyker don-spyker reopened this Aug 10, 2018
@don-spyker don-spyker force-pushed the fix/xss-issues-on-data-attributes branch from 5fd1134 to ae29b6a Aug 10, 2018
@don-spyker don-spyker mentioned this pull request Aug 10, 2018
@@ -16,7 +16,9 @@
var Affix = function (element, options) {
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
Member

@Johann-S Johann-S Aug 10, 2018

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

Loading

Copy link
Author

@don-spyker don-spyker Aug 10, 2018

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.

Loading

Copy link
Member

@Johann-S Johann-S Aug 10, 2018

Choose a reason for hiding this comment

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

Ok I understand 👍

Loading

Copy link
Member

@Johann-S Johann-S left a comment

You need unit test for each plugins you changed

Loading

@Johann-S Johann-S merged commit 2a5ba23 into twbs:v3.4.0-dev Aug 13, 2018
1 check passed
Loading
XhmikosR added a commit that referenced this issue Sep 19, 2018
* fix(collapse): xss CVE-2018-14040

Fixes #26625

* fix(tooltip): xss CVE-2018-14042

Fixes #26628

* fix(tooltip): XSS on data-viewport attribute

Fixes #27044

* fix(affix): XSS on target config

Fixes #27045
XhmikosR added a commit that referenced this issue Sep 19, 2018
* fix(collapse): xss CVE-2018-14040

Fixes #26625

* fix(tooltip): xss CVE-2018-14042

Fixes #26628

* fix(tooltip): XSS on data-viewport attribute

Fixes #27044

* fix(affix): XSS on target config

Fixes #27045
XhmikosR added a commit that referenced this issue Sep 19, 2018
* fix(collapse): xss CVE-2018-14040

Fixes #26625

* fix(tooltip): xss CVE-2018-14042

Fixes #26628

* fix(tooltip): XSS on data-viewport attribute

Fixes #27044

* fix(affix): XSS on target config

Fixes #27045
XhmikosR added a commit that referenced this issue Sep 19, 2018
* fix(collapse): xss CVE-2018-14040

Fixes #26625

* fix(tooltip): xss CVE-2018-14042

Fixes #26628

* fix(tooltip): XSS on data-viewport attribute

Fixes #27044

* fix(affix): XSS on target config

Fixes #27045
XhmikosR added a commit that referenced this issue Sep 19, 2018
* fix(collapse): xss CVE-2018-14040

Fixes #26625

* fix(tooltip): xss CVE-2018-14042

Fixes #26628

* fix(tooltip): XSS on data-viewport attribute

Fixes #27044

* fix(affix): XSS on target config

Fixes #27045
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants