Skip to content
New issue

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

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

Already on GitHub? # to your account

Preserve brackets around literal IPv6 hosts #2552

Merged
merged 3 commits into from
May 24, 2024

Conversation

tim-hutchinson
Copy link
Contributor

@tim-hutchinson tim-hutchinson commented May 24, 2024

Description

Fixes #2551

When a literal IPv6 address is in the url, remove_url_credentials drops the [ ] around the hostname needed for disambiguation.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Added unit tests for the remove_url_credentials function to cover hostname + ipv4 and ipv6 cases.

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

Copy link

linux-foundation-easycla bot commented May 24, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: tim-hutchinson / name: Tim Hutchinson (a6ed42e, 597eb52)
  • ✅ login: lzchen / name: Leighton Chen (61e9b4c)

@tim-hutchinson tim-hutchinson force-pushed the fix-ipv6-url-credentials branch from 7119d30 to 597eb52 Compare May 24, 2024 03:51
@tim-hutchinson tim-hutchinson changed the title Create safe URL by dropping the auth part of the netloc Preserve brackets around literal ipv6 hosts May 24, 2024
@tim-hutchinson tim-hutchinson changed the title Preserve brackets around literal ipv6 hosts Preserve brackets around literal IPv6 hosts May 24, 2024
@tim-hutchinson tim-hutchinson marked this pull request as ready for review May 24, 2024 03:59
@tim-hutchinson tim-hutchinson requested a review from a team May 24, 2024 03:59
@lzchen lzchen merged commit 65b4f85 into open-telemetry:main May 24, 2024
314 checks passed
shadchin pushed a commit to shadchin/opentelemetry-python-contrib that referenced this pull request May 29, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remove_url_credentials drops brackets from IPv6 hostnames
2 participants