Skip to content

Incorrect splitting of query parameters parameters containing literal commas #202

@jmalins

Description

@jmalins

The current query string translation logic doesn't distinguish between repeated query string values (i.e. &key=a&key=b) and values that contain URL encoded literal commas (i.e. &key=a%2Cb). The former should map to a fastify array value, the latter should not. It appears the API GW V2.0 event format has this same hazard.

The two cases could be distinguished by parsing the rawQueryString value (or for performance reasons, doing this only when a potential split is detected).

if (event.queryStringParameters && event.version === '2.0') {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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