Skip to content

Commit 67b3be2

Browse files
committed
Added additional checks for DOM nodes and window to isPlainObject, IE 8 was still letting those pass through. Fixes #5669.
1 parent 5e81114 commit 67b3be2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,8 @@ jQuery.extend({
433433
isPlainObject: function( obj ) {
434434
// Must be an Object.
435435
// Because of IE, we also have to check the presence of the constructor property.
436-
if ( !obj || toString.call(obj) !== "[object Object]" || !("constructor" in obj) ) {
436+
// Make sure that DOM nodes and window objects don't pass through, as well
437+
if ( !obj || toString.call(obj) !== "[object Object]" || !("constructor" in obj) || obj.nodeType || obj.setInterval ) {
437438
return false;
438439
}
439440

0 commit comments

Comments
 (0)