mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
fix(slides): resolve prototype pollution in swiper v5 (#23344)
resolves #23342
This commit is contained in:
@ -970,10 +970,11 @@ const Utils = {
|
||||
},
|
||||
extend(...args) {
|
||||
const to = Object(args[0]);
|
||||
const noExtend = ['__proto__', 'constructor', 'prototype'];
|
||||
for (let i = 1; i < args.length; i += 1) {
|
||||
const nextSource = args[i];
|
||||
if (nextSource !== undefined && nextSource !== null) {
|
||||
const keysArray = Object.keys(Object(nextSource));
|
||||
const keysArray = Object.keys(Object(nextSource)).filter((key) => noExtend.indexOf(key) < 0);
|
||||
for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {
|
||||
const nextKey = keysArray[nextIndex];
|
||||
const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
|
||||
@ -6403,7 +6404,6 @@ const components = [
|
||||
Browser$1,
|
||||
Resize,
|
||||
Observer$1,
|
||||
|
||||
];
|
||||
|
||||
if (typeof Swiper.use === 'undefined') {
|
||||
|
Reference in New Issue
Block a user