Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skipping unsafe key #1860

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

skipping unsafe key #1860

wants to merge 5 commits into from

Conversation

Shivanshu-07
Copy link
Contributor

Description:

  1. Sanitising keys for config file.
  2. Skipping unsafe keys.

fixed coverage

added test cases

fixed lint

fixed test
@@ -66,4 +68,28 @@ export function normalize(object, options) {
});
}

// Utility function to prevent prototype pollution
export function isSafeKey(key) {
const unsafeKeys = ['__proto__', 'constructor', 'prototype', 'toString', 'valueOf',
Copy link
Contributor

Choose a reason for hiding this comment

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

move this const outside method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants