Skip to content

fix(UserDataBag): Handle bracketed IPv6 addresses in setIpAddress#2007

Open
cleptric wants to merge 1 commit intomasterfrom
fix/bracketed-ipv6-in-user-data-bag
Open

fix(UserDataBag): Handle bracketed IPv6 addresses in setIpAddress#2007
cleptric wants to merge 1 commit intomasterfrom
fix/bracketed-ipv6-in-user-data-bag

Conversation

@cleptric
Copy link
Member

Summary

  • Strip brackets from IPv6 addresses (e.g. [::1]::1) before validation in UserDataBag::setIpAddress()
  • Replace InvalidArgumentException with a debug log via the SDK logger when an invalid IP is provided, preventing crashes
  • Add tests for bracketed IPv6 address handling and invalid IP behavior

Fixes #2003

Strip brackets from IPv6 addresses (e.g. `[::1]` → `::1`) before
validation. Replace the exception with a debug log message via the
SDK logger when an invalid IP is provided, preventing crashes in
environments like ReactPHP where bracketed IPv6 addresses may appear.

Fixes #2003
Co-Authored-By: Claude <noreply@anthropic.com>
@cleptric cleptric force-pushed the fix/bracketed-ipv6-in-user-data-bag branch from 899da13 to 987d2bb Compare February 13, 2026 19:18
@cleptric cleptric marked this pull request as ready for review February 13, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The "[::1]" value is not a valid IP address.

2 participants