Skip to content

Commit 2d67a71

Browse files
committed
fix new prototype pollution vulnerability
1 parent 577f529 commit 2d67a71

File tree

4 files changed

+8838
-32
lines changed

4 files changed

+8838
-32
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
## Unreleased (2022-01-30)
2+
13
## <small>1.0.1 (2020-07-25)</small>
24

35
- add prettier and `npm run build` ([1f34461](https://github.com/skratchdot/object-path-set/commit/1f34461))
46
- adding contributors ([5bf6e83](https://github.com/skratchdot/object-path-set/commit/5bf6e83))
57
- Bump eslint from 4.18.1 to 4.18.2 ([1756583](https://github.com/skratchdot/object-path-set/commit/1756583))
68
- fix prototype pollution vulnerability ([55f06d7](https://github.com/skratchdot/object-path-set/commit/55f06d7))
7-
- formatting ([6bddc79](https://github.com/skratchdot/object-path-set/commit/6bddc79))
9+
- formatting ([577f529](https://github.com/skratchdot/object-path-set/commit/577f529))
810
- rename tonic to runkit ([9c2f1ea](https://github.com/skratchdot/object-path-set/commit/9c2f1ea))
911
- small readme tweaks ([9750b7a](https://github.com/skratchdot/object-path-set/commit/9750b7a))
1012
- travis runs node 6+ ([ac1969b](https://github.com/skratchdot/object-path-set/commit/ac1969b))

index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

33
// https://github.com/jonschlinkert/assign-deep/commit/90bf1c551d05940898168d04066bbf15060f50cc
44
var isValidKey = function (key) {
5-
return key !== '__proto__' && key !== 'constructor' && key !== 'prototype';
5+
return (
6+
typeof key === 'string' &&
7+
key !== '__proto__' &&
8+
key !== 'constructor' &&
9+
key !== 'prototype'
10+
);
611
};
712

813
var setPath = function (obj, path, value, delimiter) {

0 commit comments

Comments
 (0)