Skip to content

--no-duplicate-keys false positive when key is constructor #23

Closed
@hyperupcall

Description

@hyperupcall

Reproduction

#!/usr/bin/env sh
cat <<"EOF"
{
  "constructor": "value"
}
EOF
npx  @prantlf/jsonlint --quiet --no-duplicate-keys file.json

Output:

File: file.json
Parse error on line 2, column 18:
{    "constructor": "value"}
------------------^
Duplicate key: "constructor"

This may potentially be a prototype pollution vulnerability for constructor? Anyways, thank you for the work you have done on this package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions