Skip to content

Internal Assertion failed when parsing incorrect URL containing u200b Unicode character #51593

Closed
@heipei

Description

Version

v20.10.0

Platform

Linux blackbox 6.7.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 21 Jan 2024 22:14:10 +0000 x86_64 GNU/Linux

Subsystem

url

What steps will reproduce the bug?

Trying to parse this will crash the process instead of throwing an exception. Not sure what would be the intended behavior here:

u = new URL("http://​123.123.123.123")
u.username = ""

The URL contains a u200b unicode character in front of the first digit!

How often does it reproduce? Is there a required condition?

Always reproducible

What is the expected behavior? Why is that the expected behavior?

An exception that can be caught.

What do you see instead?

Process crashes with

node[1296311]: ../src/node_url.cc:309:static void node::url::BindingData::Update(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `out' failed.
 1: 0x604dba5723d5 node::Abort() [node]
 2: 0x604dba572731 node::Assert(node::AssertionInfo const&) [node]
 3: 0x604dba64cd18 node::url::BindingData::Update(v8::FunctionCallbackInfo<v8::Value> const&) [node]
 4: 0x604dba7ec1f6  [node]
 5: 0x604dba7ecd92 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
 6: 0x604dbb160df6  [node]

Additional information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.whatwg-urlIssues and PRs related to the WHATWG URL implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions