vendor: 2,812 bytes, lines 1-83
1/* 2 3`extend` function of jquery (jQuery < 3.4.0) is known to have Prototype Pollution vulnerability. 4This IIFE is used to rebind `extend` function with its patched implementation. 5 6TODO: Remove this file and all its uses after upgrading to version >= 3.4.0 7 8*/ 9 10(function(){ 11 12 jQuery.extend = jQuery.fn.extend = function() { 13 var options, name, src, copy, copyIsArray, clone, 14 target = arguments[ 0 ] || {}, 15 i = 1, 16 length = arguments.length, 17 deep = false; 18 19 // Handle a deep copy situation 20 if ( typeof target === "boolean" ) { 21 deep = target; 22 23 // Skip the boolean and the target 24 target = arguments[ i ] || {}; 25 i++; 26 } 27 28 // Handle case when target is a string or something (possible in deep copy) 29 if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { 30 target = {}; 31 } 32 33 // Extend jQuery itself if only one argument is passed 34 if ( i === length ) { 35 target = this; 36 i--; 37 } 38 39 for ( ; i < length; i++ ) { 40 41 // Only deal with non-null/undefined values 42 if ( ( options = arguments[ i ] ) != null ) { 43 44 // Extend the base object 45 for ( name in options ) { 46 copy = options[ name ]; 47 48 // Prevent Object.prototype pollution 49 // Prevent never-ending loop 50 if ( name === "__proto__" || target === copy ) { 51 continue; 52 } 53 54 // Recurse if we're merging plain objects or arrays 55 if ( deep && copy && ( jQuery.isPlainObject( copy ) || 56 ( copyIsArray = Array.isArray( copy ) ) ) ) { 57 src = target[ name ]; 58 59 // Ensure proper type for the source value 60 if ( copyIsArray && !Array.isArray( src ) ) { 61 clone = []; 62 } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { 63 clone = {}; 64 } else { 65 clone = src; 66 } 67 copyIsArray = false; 68 69 // Never move original objects, clone them 70 target[ name ] = jQuery.extend( deep, clone, copy ); 71 72 // Don't bring in undefined values 73 } else if ( copy !== undefined ) { 74 target[ name ] = copy; 75 } 76 } 77 } 78 } 79 80 // Return the modified object 81 return target; 82 }; 83})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.