Skip to content

Incomplete multi-character sanitization on utils.js getQueryParam function #443

Closed
@JiatangDong

Description

@JiatangDong

Our company enforced a CodeQL scan against our built bundle. And an incomplete multi-character sanitization error is reported from this line

param = param.replace(/[[]/, '\\[').replace(/[\]]/, '\\]');

This should be easily fixed by adding a 'g' in regex

param = param.replace(/[[]/g, '\\[').replace(/[\]]/g, '\\]');

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