Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# [2.0.1]
###### Unreleased

###### Changed
- Replacing `deep-get-set` with `object-path` to fix security issue with [prototype pollution](https://github.com/advisories/GHSA-mjjj-6p43-vhhv).

# [2.0.0]
###### 2022-02-14

Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Dependencies
const deep = require('deep-get-set');
const objectPath = require('object-path');
const kindOf = require('kind-of');

// Default options, see README.md
Expand All @@ -24,7 +24,7 @@ function postCSSReplace(opts = defaults) {
}

const replacementArgs = options.data && options.data.replaceAll != null ? [regex, options.data.replaceAll] : [regex, (match, key) => {
const replace = deep(options.data, key);
const replace = objectPath.get(options.data, key);

if (typeof replace !== 'string') {
return match;
Expand Down
Loading