Skip to content

Fix websocket proxy auth with colon in password - #2740

Closed
tilakraj-hub wants to merge 1 commit into
kubernetes-client:masterfrom
tilakraj-hub:fix/websocket-proxy-auth
Closed

tilakraj-hub wants to merge 1 commit into
kubernetes-client:masterfrom
tilakraj-hub:fix/websocket-proxy-auth

Conversation

@tilakraj-hub

Copy link
Copy Markdown

What type of PR is this?

/kind bug

What this PR does / why we need it:

Fixes websocket proxy authentication when the proxy password contains a colon (:).

Previously, proxy credentials were parsed using split(':'), which caused passwords containing colons to be truncated. This change uses split(':', 1) so the credentials are split only at the username/password separator and the complete password is preserved.

Which issue(s) this PR fixes:

Fixes #2734

Special notes for your reviewer:

The change is limited to the proxy authentication credential parsing in websocket_proxycare().

The reported issue was reproduced before the fix and verified after the change with a password containing multiple colons.

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs, usage docs, etc.:

NONE

@kubernetes-prow kubernetes-prow Bot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. labels Oct 13, 2026
@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: tilakraj-hub / name: Tilak Raj Lunia (f857da4)

@kubernetes-prow kubernetes-prow Bot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Oct 13, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

Welcome @tilakraj-hub!

It looks like this is your first PR to kubernetes-client/python 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-client/python has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@kubernetes-prow kubernetes-prow Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 13, 2026
@kubernetes-prow
kubernetes-prow Bot requested review from roycaihw and yliaog October 13, 2026 18:20
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tilakraj-hub
Once this PR has been reviewed and has the lgtm label, please assign yliaog for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tilakraj-hub
tilakraj-hub force-pushed the fix/websocket-proxy-auth branch from 075cadd to f857da4 Compare October 13, 2026 19:08
@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Oct 13, 2026
@roycaihw

Copy link
Copy Markdown
Member

Thanks for the PR @tilakraj-hub! Issue #2734 is already being addressed by earlier PR #2738, which also adds unit test coverage in ws_client_test.py and guards against IndexError when credentials lack a colon. Closing as duplicate in favor of #2738.

@roycaihw roycaihw closed this Oct 14, 2026
@tilakraj-hub

Copy link
Copy Markdown
Author

@roycaihw Thank you for reviewing my PR and for the clarification. I understand that this issue is already being addressed by PR #2738.
I’m still very interested in contributing to the Kubernetes Python ecosystem. If there are any other Python-related issues or repositories where you think I could make a useful contribution, I’d really appreciate it if you could point me in the right direction.
I’d be happy to work on another issue and contribute where needed. Thank you for your time and guidance!

@roycaihw

Copy link
Copy Markdown
Member

Thanks for your interest in contributing @tilakraj-hub! Glad to see your CNCF CLA is now sorted out.

If you're looking for issues to tackle, a few good places to start:

Feel free to join the #kubernetes-client channel on Kubernetes Slack (https://slack.k8s.io/) if you'd like to chat or ask questions!

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

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Websocket proxy auth truncates passwords that contain a colon

2 participants