From f0fe59dcf773047256a50bd01080c352256eb355 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 26 Apr 2022 17:44:24 +0000 Subject: [PATCH] [FIX] web/lib: backport jquery bugfixes opw-2793379 closes odoo/odoo#90463 X-original-commit: 684e3fc983e91168dfaef8536fcd1f71ce7f7fdc --- 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..3339d9371fd 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 @@ -520,6 +520,7 @@ // * Rinse & repeat. for ( ; i <= keys_last; i++ ) { key = keys[i] === '' ? cur.length : keys[i]; + if ( key === "__proto__" || key === "prototype" || key === "constructor" ) break; cur = cur[key] = i < keys_last ? cur[key] || ( keys[i+1] && isNaN( keys[i+1] ) ? {} : [] ) : val; 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; }