Skip to content

fix all CVEs in 1.6.4 #1

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

Open
wants to merge 27 commits into
base: 1.6.4-branch
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ee931ed
Include distribution in release tag
timmywil Feb 12, 2014
13e9cde
Include distribution in release tag
timmywil Feb 12, 2014
9b20df0
Include distribution in release tag
timmywil Feb 12, 2014
dbce0ce
Include distribution in release tag
timmywil Feb 12, 2014
af543e2
🔒️ fix CVE-2015-9251
ctcpip Dec 11, 2023
eb69988
🔒️ fix CVE-2012-6708
ctcpip Dec 11, 2023
ab024c1
🔒️ fix CVE-2019-11358
ctcpip Dec 11, 2023
a92926c
🔒️ fix CVE-2020-11022
ctcpip Dec 11, 2023
e5a5d49
🔒️ fix CVE-2020-11023
ctcpip Dec 11, 2023
9048c5a
🔒️ fix CVE-2020-7656
ctcpip Dec 11, 2023
ac067d7
fix support reference
ctcpip Dec 15, 2023
fe5ca13
fix script regex
ctcpip Dec 15, 2023
08ffd65
test fixes
ctcpip Dec 18, 2023
c70c7ba
🔒️ fix CVE-2011-4969
ctcpip Dec 20, 2023
8bdec18
🔒️ fix CVE-2012-6708
ctcpip Dec 20, 2023
654d925
🔒️ fix CVE-2019-11358
ctcpip Dec 21, 2023
ae1140f
🔒️ fix CVE-2020-11022
ctcpip Dec 21, 2023
8158bf0
🔒️ fix CVE-2020-7656
ctcpip Feb 10, 2024
6767dbc
🔒️ fix CVE-2020-11023
ctcpip Feb 10, 2024
8f1483b
💚 commit built jquery from latest
ctcpip Feb 15, 2024
f400223
Merge branch '1.2.7-sec' into 1.3.3-sec
ctcpip Feb 15, 2024
5affbad
Merge branch '1.3.3-sec' into 1.4.5-sec
ctcpip Feb 15, 2024
d0fef0a
✅ fix tests
ctcpip Feb 15, 2024
634d27d
🔒️ fix CVE-2015-9251
ctcpip Feb 16, 2024
fa65c2b
♻️ update old node code, prevent jslint exception
ctcpip Feb 16, 2024
6446298
Merge branch '1.4.5-sec' into 1.5.3-sec
ctcpip Feb 16, 2024
3877721
Merge branch '1.5.3-sec' into 1.6.5-sec
ctcpip Feb 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
🔒️ fix CVE-2015-9251
  • Loading branch information
ctcpip committed Dec 11, 2023
commit af543e212250421fe0816a815cf6c3fb9b455e35
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "src/sizzle"]
path = src/sizzle
url = git://github.com/jquery/sizzle.git
url = https://github.com/jquery/sizzle.git
[submodule "test/qunit"]
path = test/qunit
url = git://github.com/jquery/qunit.git
url = https://github.com/qunitjs/qunit.git
2 changes: 1 addition & 1 deletion build/jslint-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var e = JSLINT.errors, found = 0, w;
for ( var i = 0; i < e.length; i++ ) {
w = e[i];

if ( !ok[ w.reason ] ) {
if ( w && !ok[ w.reason ] ) {
found++;
print( "\n" + w.evidence + "\n" );
print( " Problem at line " + w.line + " character " + w.character + ": " + w.reason );
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name" : "jquery",
"version" : "1.6.4",
"version" : "1.6.5-sec",
"main" : "./jquery.js",
"dependencies": {
}
Expand Down
15 changes: 11 additions & 4 deletions jquery.js
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery JavaScript Library v1.6.4
* jQuery JavaScript Library v1.6.5-sec
* http://jquery.com/
*
* Copyright 2011, John Resig
Expand All @@ -11,7 +11,7 @@
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Mon Sep 12 18:54:48 2011 -0400
* Date: Wed Feb 12 09:58:38 2014 -0800
*/
(function( window, undefined ) {

Expand Down Expand Up @@ -213,7 +213,7 @@ jQuery.fn = jQuery.prototype = {
selector: "",

// The current version of jQuery being used
jquery: "1.6.4",
jquery: "1.6.5-sec",

// The default length of a jQuery object is 0
length: 0,
Expand Down Expand Up @@ -7756,6 +7756,13 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {



// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
jQuery.ajaxPrefilter( function( s ) {
if ( s.crossDomain ) {
s.contents.script = false;
}
} );

// Install script dataType
jQuery.ajaxSetup({
accepts: {
Expand Down Expand Up @@ -9043,4 +9050,4 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {

// Expose jQuery to the global object
window.jQuery = window.$ = jQuery;
})(window);
})(window);
7 changes: 7 additions & 0 deletions src/ajax/script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
(function( jQuery ) {

// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
jQuery.ajaxPrefilter( function( s ) {
if ( s.crossDomain ) {
s.contents.script = false;
}
} );

// Install script dataType
jQuery.ajaxSetup({
accepts: {
Expand Down
48 changes: 48 additions & 0 deletions test/unit/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,54 @@ test("jQuery.ajax() - success callbacks - (url, options) syntax", function() {
}, 13);
});

ajaxTest( "jQuery.ajax() - do not execute js (crossOrigin)", 2, function( assert ) {
return {
create: function( options ) {
options.crossDomain = true;
return jQuery.ajax( url( "data/script.php?header=ecma" ), options );
},
success: function() {
assert.ok( true, "success" );
},
complete: function() {
assert.ok( true, "complete" );
}
};
} );

ajaxTest( "jQuery.ajax() - execute js for crossOrigin when dataType option is provided", 3,
function( assert ) {
return {
create: function( options ) {
options.crossDomain = true;
options.dataType = "script";
return jQuery.ajax( url( "data/script.php?header=ecma" ), options );
},
success: function() {
assert.ok( true, "success" );
},
complete: function() {
assert.ok( true, "complete" );
}
};
}
);

ajaxTest( "jQuery.ajax() - do not execute js (crossOrigin)", 2, function( assert ) {
return {
create: function( options ) {
options.crossDomain = true;
return jQuery.ajax( url( "data/script.php" ), options );
},
success: function() {
assert.ok( true, "success" );
},
complete: function() {
assert.ok( true, "complete" );
}
};
} );

test("jQuery.ajax() - success callbacks (late binding)", function() {
expect( 8 );

Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.4
1.6.5-sec