Skip to content

fix: prototype pollution in several npm packages#4337

Merged
jdalton merged 1 commit intolodash:npm-packagesfrom
Kirill89:fix/prototype-pollution-packages
Jun 24, 2019
Merged

fix: prototype pollution in several npm packages#4337
jdalton merged 1 commit intolodash:npm-packagesfrom
Kirill89:fix/prototype-pollution-packages

Conversation

newValue = toPlainObject(objValue);
}
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
else if (!isObject(objValue) || isFunction(objValue)) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newValue = toPlainObject(objValue);
}
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
else if (!isObject(objValue) || isFunction(objValue)) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* @returns {*} Returns the property value.
*/
function safeGet(object, key) {
if (key === 'constructor' && typeof object[key] === 'function') {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fix from the other PR: #4336

function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
var objValue = object[key],
srcValue = source[key],
var objValue = safeGet(object, key),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jdalton jdalton added the bug label Jun 24, 2019
@jdalton
Copy link
Copy Markdown
Member

jdalton commented Jun 24, 2019

Thank you @Kirill89!

@jdalton jdalton merged commit bb2e678 into lodash:npm-packages Jun 24, 2019
@lodash lodash locked and limited conversation to collaborators Jul 17, 2019
@lodash lodash deleted a comment from schmod Nov 16, 2021
@jdalton jdalton added issue bankruptcy Closing the issue/PR to start fresh and removed issue bankruptcy Closing the issue/PR to start fresh labels Sep 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants