From 8045d656c8a61f3ca2e1dda534c6ec053363037f Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 14 Mar 2022 15:01:27 +0000 Subject: [PATCH] [FW][FIX] web/lib: backport jquery bugfixes opw-2793379 closes odoo/odoo#86416 X-original-commit: 0dd7c78b06726543825008a48d3dc004d2af4557 --- addons/web/static/lib/jquery.ba-bbq/jquery.ba-bbq.js | 1 + addons/web/static/lib/jquery/jquery.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/web/static/lib/jquery.ba-bbq/jquery.ba-bbq.js b/addons/web/static/lib/jquery.ba-bbq/jquery.ba-bbq.js index 3a5995d2b6c..39f2892e932 100644 --- a/addons/web/static/lib/jquery.ba-bbq/jquery.ba-bbq.js +++ b/addons/web/static/lib/jquery.ba-bbq/jquery.ba-bbq.js @@ -468,6 +468,7 @@ coerce_types = { 'true': !0, 'false': !1, 'null': null }; // Iterate over all name=value pairs. + if (params.indexOf('__proto__') !== -1) { return obj; } $.each( params.replace( /\+/g, ' ' ).split( '&' ), function(j,v){ var param = v.split( '=' ), key = decode( param[0] ), diff --git a/addons/web/static/lib/jquery/jquery.js b/addons/web/static/lib/jquery/jquery.js index 01b858f1bf7..0e6cacae756 100644 --- a/addons/web/static/lib/jquery/jquery.js +++ b/addons/web/static/lib/jquery/jquery.js @@ -262,7 +262,7 @@ jQuery.extend = jQuery.fn.extend = function() { copy = options[ name ]; // Prevent never-ending loop - if ( target === copy ) { + if ( name === '__proto__' || target === copy ) { continue; }