OCM-18900 | fix: Improve proxy validation error messages for special characters in passwords#3052
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3052 +/- ##
==========================================
+ Coverage 23.91% 24.08% +0.17%
==========================================
Files 317 330 +13
Lines 35202 35941 +739
==========================================
+ Hits 8418 8657 +239
- Misses 26143 26631 +488
- Partials 641 653 +12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fc09c54 to
aa528ca
Compare
00638f4 to
120a803
Compare
|
/retest-required |
2260456 to
c6b94b4
Compare
|
/retest-required |
|
/retest-required |
hunterkepley
left a comment
There was a problem hiding this comment.
The test case in the bug ticket does not seem to pass:
E: parse "http://proxyuser:QvoZjyy/trkCiY5@10.0.0.161:8080": invalid port ":QvoZjyy" after host
I think there may be a bug in the parse code
|
@hunterkepley I just did some tests here, and it seems to be working after the fix, did you test it with the branch locally ? |
96029c9 to
a50904c
Compare
|
/retest-required |
1 similar comment
|
/retest-required |
9502aa4 to
2637639
Compare
|
/test e2e-presubmits-pr-rosa-hcp-advanced |
|
/test e2e-presubmits-pr-rosa-sts-advanced |
34c6edf to
875a547
Compare
|
@olucasfreitas: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/retest |
875a547 to
4fe55d7
Compare
4fe55d7 to
a51e1b8
Compare
f7318dc to
3d09b7b
Compare
3d09b7b to
770854f
Compare
770854f to
48eb409
Compare
48eb409 to
c4925eb
Compare
c4925eb to
dde1c46
Compare
|
/retest |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: marcolan018, olucasfreitas The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Details
This PR fixes a usability issue where
rosa create cluster --http-proxywas displaying unhelpful error messages when proxy passwords contained special characters like forward slashes, making it difficult for users to understand what was wrong with their input.Problem (Before)
rosa create cluster --http-proxy "http://proxyuser:QvoZjyy/trkCiY5@10.0.0.161:8080"Output:
The user has no idea what's wrong with the URL.
Fixed Behavior (After)
./rosa create cluster --http-proxy "http://proxyuser:QvoZjyy/trkCiY5@10.0.0.161:8080"Output:
Now the user knows exactly what's wrong.
Additional Validations
The implementation validates special characters in both username and password fields:
Forward slash in password:
rosa edit cluster --cluster=my-cluster --http-proxy "http://user:pass/word@10.0.0.161:8080"Output:
@ symbol in password:
rosa edit cluster --cluster=my-cluster --http-proxy "http://user:p@ssword@10.0.0.161:8080"Output:
Question mark in password:
rosa edit cluster --cluster=my-cluster --http-proxy "http://user:pass?word@10.0.0.161:8080"Output:
Hash in password:
rosa edit cluster --cluster=my-cluster --http-proxy "http://user:pass#word@10.0.0.161:8080"Output:
Invalid character in username:
rosa edit cluster --cluster=my-cluster --http-proxy "http://us/er:password@10.0.0.161:8080"Output:
Missing scheme:
rosa edit cluster --cluster=my-cluster --http-proxy "user:password@10.0.0.161:8080"Output:
HTTPS proxy validation:
rosa edit cluster --cluster=my-cluster --https-proxy "https://user:pass/word@10.0.0.161:8080"Output:
Ticket
Closes OCM-18900