Skip to content

Commit 6e4be76

Browse files
committed
✨ jQuery v1.7.3-sec
1 parent 3dd9e78 commit 6e4be76

File tree

4 files changed

+33
-16
lines changed

4 files changed

+33
-16
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ In a perfect world, at least every MAJOR EOL jQuery release line would have a se
1313
|| `1.4.4` | `1.4.5-sec` | [1.4.5-sec] | [PR][1.4.5-pr] | | [CVE-2011-4969] \| [CVE-2012-6708] \| [CVE-2015-9251] \| [CVE-2019-11358] \| [CVE-2020-7656] \| [CVE-2020-11022] \| [CVE-2020-11023] |
1414
|| `1.5.2` | `1.5.3-sec` | [1.5.3-sec] | [PR][1.5.3-pr] | | [CVE-2011-4969] \| [CVE-2012-6708] \| [CVE-2015-9251] \| [CVE-2019-11358] \| [CVE-2020-7656] \| [CVE-2020-11022] \| [CVE-2020-11023] |
1515
|| `1.6.4` | `1.6.5-sec` | [1.6.5-sec] | [PR][1.6.5-pr] | | [CVE-2012-6708] \| [CVE-2015-9251] \| [CVE-2019-11358] \| [CVE-2020-7656] \| [CVE-2020-11022] \| [CVE-2020-11023] |
16-
| 🚧 | `1.7.2` | `1.7.3-sec` | | | | [CVE-2012-6708] \| [CVE-2015-9251] \| [CVE-2019-11358] \| [CVE-2020-7656] \| [CVE-2020-11022] \| [CVE-2020-11023] |
16+
| | `1.7.2` | `1.7.3-sec` | [1.7.3-sec] | [PR][1.7.3-pr] | | [CVE-2012-6708] \| [CVE-2015-9251] \| [CVE-2019-11358] \| [CVE-2020-7656] \| [CVE-2020-11022] \| [CVE-2020-11023] |
1717
| 🚧 | `1.8.3` | `1.8.4-sec` | | | | [CVE-2012-6708] \| [CVE-2015-9251] \| [CVE-2019-11358] \| [CVE-2020-7656] \| [CVE-2020-11022] \| [CVE-2020-11023] |
1818
| 🚧 | `1.12.4` | `1.12.5-sec` | | | | [CVE-2015-9251] \| [CVE-2019-11358] \| [CVE-2020-11022] \| [CVE-2020-11023] |
1919
| 🚧 | `2.2.4` | `2.2.5-sec` | | | | [CVE-2015-9251] \| [CVE-2019-11358] \| [CVE-2020-11022] \| [CVE-2020-11023] \| [CVE-2020-23064] |
@@ -68,6 +68,8 @@ Ultimately, our hope is that these patched versions can be approved and accepted
6868
[1.5.3-pr]: https://github.com/ctcpip/jquery-security-patches/pull/6
6969
[1.6.5-sec]: https://github.com/ctcpip/jquery-security-patches/tree/1.6.5-sec
7070
[1.6.5-pr]: https://github.com/ctcpip/jquery-security-patches/pull/1
71+
[1.7.3-sec]: https://github.com/ctcpip/jquery-security-patches/tree/1.7.3-sec
72+
[1.7.3-pr]: https://github.com/ctcpip/jquery-security-patches/pull/7
7173
[CVE-2011-4969]: https://github.com/advisories/GHSA-579v-mp3v-rrw5
7274
[CVE-2012-6708]: https://github.com/advisories/GHSA-2pqj-h3vj-pqgw
7375
[CVE-2015-9251]: https://github.com/advisories/GHSA-rmxg-73gg-4p98

security/README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,13 @@
6565
#### 1.6.4 / 1.6.5-sec
6666

6767
- Checkout the `1.6.4` or `1.6.5-sec` branch
68-
- Run php server from the root folder of the repo: `php -S 127.0.0.1:8000`
68+
- Run php server from the root folder of the repo: `php -S 127.0.0.1:8000 -t test`
69+
- Open `127.0.0.1:8000/tests/index.html` in your browser
70+
71+
#### 1.7.2 / 1.7.3-sec
72+
73+
- Checkout the `1.7.2` or `1.7.3-sec` branch
74+
- Run php server from the root folder of the repo: `php -S 127.0.0.1:8000 -t test`
6975
- Open `127.0.0.1:8000/tests/index.html` in your browser
7076

7177
### A/B end-to-end acceptance tests
@@ -136,3 +142,10 @@ You can run the A/B tests locally in CI mode or manually in the browser
136142
- From the root folder of the repo:
137143
- Run `make`
138144
- This will output `./dist/jquery.js`
145+
146+
#### 1.7.2 / 1.7.3-sec
147+
148+
- Checkout the `1.7.2` or `1.7.3-sec` branch
149+
- From the root folder of the repo:
150+
- Run `make`
151+
- This will output `./dist/jquery.js`

security/site/vendor/jquery-1.7.3-sec.js

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* jQuery JavaScript Library v1.7.2
2+
* jQuery JavaScript Library v1.7.3-sec
33
* http://jquery.com/
44
*
55
* Copyright 2011, John Resig
@@ -11,7 +11,7 @@
1111
* Copyright 2011, The Dojo Foundation
1212
* Released under the MIT, BSD, and GPL Licenses.
1313
*
14-
* Date: Wed Mar 21 12:46:34 2012 -0700
14+
* Date: Fri Feb 16 00:55:01 2024 -0600
1515
*/
1616
(function( window, undefined ) {
1717

@@ -38,7 +38,8 @@ var jQuery = function( selector, context ) {
3838

3939
// A simple way to check for HTML strings or ID strings
4040
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
41-
quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
41+
// Strict HTML recognition (#11290: must start with <)
42+
quickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,
4243

4344
// Check if a string has a non-whitespace character in it
4445
rnotwhite = /\S/,
@@ -355,8 +356,9 @@ jQuery.extend = jQuery.fn.extend = function() {
355356
src = target[ name ];
356357
copy = options[ name ];
357358

359+
// Prevent Object.prototype pollution
358360
// Prevent never-ending loop
359-
if ( target === copy ) {
361+
if ( name === "__proto__" || target === copy ) {
360362
continue;
361363
}
362364

@@ -3645,7 +3647,7 @@ if ( !jQuery.support.submitBubbles ) {
36453647
});
36463648
// return undefined since we don't need an event listener
36473649
},
3648-
3650+
36493651
postDispatch: function( event ) {
36503652
// If form was submitted by the user, bubble the event up the tree
36513653
if ( event._submit_bubble ) {
@@ -5735,7 +5737,6 @@ var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figca
57355737
"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
57365738
rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
57375739
rleadingWhitespace = /^\s+/,
5738-
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
57395740
rtagName = /<([\w:]+)/,
57405741
rtbody = /<tbody/i,
57415742
rhtml = /<|&#?\w+;/,
@@ -5747,7 +5748,6 @@ var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figca
57475748
rscriptType = /\/(java|ecma)script/i,
57485749
rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
57495750
wrapMap = {
5750-
option: [ 1, "<select multiple='multiple'>", "</select>" ],
57515751
legend: [ 1, "<fieldset>", "</fieldset>" ],
57525752
thead: [ 1, "<table>", "</table>" ],
57535753
tr: [ 2, "<table><tbody>", "</tbody></table>" ],
@@ -5758,7 +5758,6 @@ var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figca
57585758
},
57595759
safeFragment = createSafeFragment( document );
57605760

5761-
wrapMap.optgroup = wrapMap.option;
57625761
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
57635762
wrapMap.th = wrapMap.td;
57645763

@@ -5936,13 +5935,10 @@ jQuery.fn.extend({
59365935
null;
59375936
}
59385937

5939-
59405938
if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
59415939
( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
59425940
!wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
59435941

5944-
value = value.replace( rxhtmlTag, "<$1></$2>" );
5945-
59465942
try {
59475943
for (; i < l; i++ ) {
59485944
// Remove element nodes and prevent memory leaks
@@ -6387,8 +6383,6 @@ jQuery.extend({
63876383
if ( !rhtml.test( elem ) ) {
63886384
elem = context.createTextNode( elem );
63896385
} else {
6390-
// Fix "XHTML"-style tags in all browsers
6391-
elem = elem.replace(rxhtmlTag, "<$1></$2>");
63926386

63936387
// Trim whitespace, otherwise indexOf won't work as expected
63946388
var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(),
@@ -6979,7 +6973,7 @@ var r20 = /%20/g,
69796973
rnoContent = /^(?:GET|HEAD)$/,
69806974
rprotocol = /^\/\//,
69816975
rquery = /\?/,
6982-
rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
6976+
rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*< *\/ *script *>?/gi,
69836977
rselectTextarea = /^(?:select|textarea)/i,
69846978
rspacesAjax = /\s+/,
69856979
rts = /([?&])_=[^&]*/,
@@ -8046,6 +8040,13 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
80468040

80478041

80488042

8043+
// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
8044+
jQuery.ajaxPrefilter( function( s ) {
8045+
if ( s.crossDomain ) {
8046+
s.contents.script = false;
8047+
}
8048+
} );
8049+
80498050
// Install script dataType
80508051
jQuery.ajaxSetup({
80518052
accepts: {

security/test/test.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const patchedVersions = [
1212
'1.4.5-sec',
1313
'1.5.3-sec',
1414
'1.6.5-sec',
15+
'1.7.3-sec',
1516
];
1617

1718
function banner(txt, {borderColor = 'magenta', textColor = 'cyan'} = {borderColor: 'magenta', textColor: 'cyan'}) {

0 commit comments

Comments
 (0)