Skip to content

LGTM.com - false positive [Node.JS Express] #8807

@asportnoy

Description

@asportnoy

The error is saying that the query parameter could be either a string or an array, which could allow users to bypass sanitizing/validation. However, I have validation middleware which checks the type and ensures it is not an array. If I open that route with the query string specified multiple times (which is what would cause it to be an array), the validator correctly sends me an error and prevents the flagged code from running.

LGTM page
Code

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions