Skip to content

$utils::is_token_false_positive is fiddly and unstable #68

@jrfnl

Description

@jrfnl

The Utils::is_token_false_positive() method required sniffs to pass two tokens. The second token is calculated, not retrieved via token walking and may therefore be incorrect.

The method basically expects code to be written like so:

$_SERVER['key'];

... but all of the below are valid PHP and would fail the check because of the token calculation:

$_SERVER ['key'];
$_SERVER[ 'key' ];
$_SERVER[/*comment*/ 'key' ];
... etc...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions