Skip to content

TypeError: decodeComponents(...).join is not a function #5

@KatsuragiCSL

Description

@KatsuragiCSL

Crash occured when %ea%ba%5a%ba is parsed by decodeUriComponent

This function is used in some other nodejs projects for decoding query strings and hash strings in url, for example the hash # kun%ea%ba%5a%ba is valid and should be parsed correctly as { ' kun%ea%ba%5a%ba': null }

For example in chrome's development tools' console the url https://google.com# kun%ea%ba%5a%ba can be parsed without problems:

const url = new URL("https://google.com#  kun%ea%ba%5a%ba");
url

image

Code to reproduce

const decodeUriComponent = require('decode-uri-component');

var x = decodeUriComponent('%ea%ba%5a%ba');

console.log(x);

Results

TypeError: decodeComponents(...).join is not a function

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