Skip to content

Commit

Permalink
fix(vulnerability): Prototype Pollution Vulnerability (#105)
Browse files Browse the repository at this point in the history
* fix: prevent prototype injection/derivatives bugs

* fix: indent

* fix: indent
  • Loading branch information
zero734kr committed Aug 29, 2021
1 parent daa2d86 commit 46ccc2a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ cleanParsingErrors = (string) =>
if typeof done is 'undefined' and typeof options is 'function'
done = options
options = {}

if addr == '__proto__'
done new Error 'lookup: __proto__ is not allowed to lookup'
return

_.defaults options,
follow: 2
Expand Down

0 comments on commit 46ccc2a

Please sign in to comment.