-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Fix/xss issues on data attributes #27047
Conversation
5fd1134
to
ae29b6a
Compare
@@ -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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I understand 👍
There was a problem hiding this comment.
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
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