Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(node): Support IPv6 as DSN (#2996) #17708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
xgedev wants to merge 2 commits into getsentry:develop
base: develop
Choose a base branch
Loading
from xgedev:develop

Conversation

Copy link

@xgedev xgedev commented Sep 19, 2025

Setting an IPv6 URL as a DSN does not work, see #2996.
This updates the DSN_REGEX to correctly match IPv6 and fixes the then occuring issue that the brackets "[" and "]" are in the request's hostname and prevent the request from being made.

seer-by-sentry[bot] reacted with hooray emoji

/** Regular expression used to parse a Dsn. */
const DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;
const DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[0-9a-fA-F:]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;
Copy link

@cursor cursor bot Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: IPv6 DSN Parsing Fails for Mapped Addresses

The DSN_REGEX update for IPv6 addresses is too restrictive. The IPv6 host pattern [0-9a-fA-F:]+ is missing dots for IPv4-mapped IPv6 addresses and percent signs for zone identifiers, causing valid DSNs with these formats to fail parsing.

Fix in Cursor Fix in Web

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

@cursor cursor[bot] cursor[bot] left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /