Skip to content

Commit 3877721

Browse files
committed
Merge branch '1.5.3-sec' into 1.6.5-sec
2 parents 08ffd65 + 6446298 commit 3877721

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

src/ajax.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var r20 = /%20/g,
1111
rnoContent = /^(?:GET|HEAD)$/,
1212
rprotocol = /^\/\//,
1313
rquery = /\?/,
14-
rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script\s*>/gi,
14+
rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*< *\/ *script *>?/gi,
1515
rselectTextarea = /^(?:select|textarea)/i,
1616
rspacesAjax = /\s+/,
1717
rts = /([?&])_=[^&]*/,

test/unit/core.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,36 @@ test("jQuery('html', context)", function() {
575575
equals($span.length, 1, "Verify a span created with a div context works, #1763");
576576
});
577577

578+
test("XSS via location.hash", function() {
579+
expect(1);
580+
581+
stop();
582+
jQuery._check9521 = function(x){
583+
ok( x, "script called from #id-like selector with inline handler" );
584+
jQuery("#check9521").remove();
585+
delete jQuery._check9521;
586+
};
587+
588+
var $eCheck9521 = jQuery( '#<img id="check9521" src="no-such-.gif" onerror="jQuery._check9521(false)"' );
589+
590+
if($eCheck9521.length) {
591+
$eCheck9521.appendTo("#main");
592+
}
593+
else {
594+
jQuery._check9521(true);
595+
}
596+
597+
start();
598+
599+
});
600+
601+
test( "jQuery.extend( true, ... ) Object.prototype pollution", function( assert ) {
602+
expect( 1 );
603+
604+
jQuery.extend( true, {}, JSON.parse( "{\"__proto__\": {\"devMode\": true}}" ) );
605+
ok( !( "devMode" in {} ), "Object.prototype not polluted" );
606+
} );
607+
578608
if ( !isLocal ) {
579609
test("jQuery(selector, xml).text(str) - Loaded via XML document", function() {
580610
expect(2);

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.6.5-sec
1+
1.6.5-sec

0 commit comments

Comments
 (0)