Skip to content

sortQueryParameters buggy handling of search parameters #189

@nomagick

Description

@nomagick

normalize-url/index.js

Lines 245 to 248 in 4869023

// Calling `.sort()` encodes the search parameters, so we need to decode them again.
try {
urlObject.search = decodeURIComponent(urlObject.search);
} catch {}

When the query string contains %2F or / like in some S3 signed token, the extra decodeURIComponent breaks the URL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions