Skip to content

Commit 5398f16

Browse files
Potential fix for code scanning alert no. 3: Prototype-polluting function (#687)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent d1dfc4b commit 5398f16

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

js-legacy/jsmind.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,9 @@
994994
},
995995
merge: function (b, a) {
996996
for (var o in a) {
997+
if (o === '__proto__' || o === 'constructor' || o === 'prototype') {
998+
continue;
999+
}
9971000
if (o in b) {
9981001
if (typeof b[o] === 'object' &&
9991002
Object.prototype.toString.call(b[o]).toLowerCase() == '[object object]' &&

0 commit comments

Comments
 (0)