Skip to content

LGTM.com - false positive javascript/ql/src/Performance/ReDoS.ql #5964

@yarikoptic

Description

@yarikoptic

Description of the false positive

Happened on
https://github.com/sparkletown/sparkle/pull/1443/files#diff-06ebbfcf8e627f41bd6b15a2648431dc8a5dfd21f7d64f9bc798ed55051c0c58R97
with code

.match(/("[^"]*?"|[^"\s]+)+(?=\s*|\s*$)/g) 

stating:

Inefficient regular expression

This part of the regular expression may cause exponential backtracking on strings
containing many repetitions of '!'.

although regular expression does not have any ! and I am not aware of any special handling of ! in the source string which should somehow trigger such behavior.

URL to the alert on the project page on LGTM.com

unfortunately I am just a contributor and do not have access to those. May be @0xdevalias could help.

and here is the webshot

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions