We had already upgraded XF 2.2 to use jQuery 3.4.x but we have made the decision to bring that change forward to account for a potential XSS in jQuery 3.3.1, which you can read about here: https://xenforo.com/community/threads/jquery-3-3-1-cross-site-scripting-vulnerability.177281/
To be clear, we do not believe XF to be exploitable with this out of the box and it is generally unlikely to be, even with add-on and other third party code.
However, with this, we need to make you aware of a few deprecations.
As an example, if you have some code which looks like:
You would change this to:
We recommend searching all of your JavaScript code (and jQuery code from vendors) to see if these positional selectors have been used:
If they have been used we recommend making changes now so that when we upgrade to a future version of jQuery and those selectors are removed your code will continue to work.
To be clear, we do not believe XF to be exploitable with this out of the box and it is generally unlikely to be, even with add-on and other third party code.
However, with this, we need to make you aware of a few deprecations.
While the positional selectors will still work, for now, we recommend you make changes for now to avoid code breakages when they are finally removed.Deprecating positional selectors and the sunset of Sizzle
...
Specifically, jQuery 3.4.0 is deprecating:first
,:last
,:eq
,:even
,:odd
,:lt
,:gt
, and:nth
. When we remove Sizzle, we’ll replace it with a small wrapper around querySelectorAll, and it would be almost impossible to reimplement these selectors without a larger selector engine.
We think this trade-off is worth it. Keep in mind we will still support the positional methods, such as.first
,.last
, and.eq
. Anything you can do with positional selectors, you can do with positional methods instead. They perform better anyway.
As an example, if you have some code which looks like:
JavaScript:
var $header = $content.find('.block-header:first');
JavaScript:
var $header = $content.find('.block-header').first();
We recommend searching all of your JavaScript code (and jQuery code from vendors) to see if these positional selectors have been used:
:first
, :last
, :eq
, :even
, :odd
, :lt
, :gt
, and :nth
.If they have been used we recommend making changes now so that when we upgrade to a future version of jQuery and those selectors are removed your code will continue to work.