-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
fix: Parse hostname correctly from repoURL to fetch correct CA cert #19488
Conversation
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #19488 +/- ##
==========================================
+ Coverage 55.79% 55.83% +0.04%
==========================================
Files 316 316
Lines 43735 43737 +2
==========================================
+ Hits 24402 24421 +19
+ Misses 16780 16752 -28
- Partials 2553 2564 +11 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
b0f5d74
to
32c5186
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…rgoproj#19488) Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com> Co-authored-by: Jann Fischer <jann@mistrust.net> Signed-off-by: ChichiCaleb <ChichiCaleb@chichiuchenna@gmail.com>
…rgoproj#19488) Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com> Co-authored-by: Jann Fischer <jann@mistrust.net> Signed-off-by: ChichiCaleb <ChichiCaleb@chichiuchenna@gmail.com> Signed-off-by: ChichiCaleb <chichiuchenna@gmail.com>
Thanks @jannfis. @ishitasequeira - It would be great if this could be backported to 2.12.x and 2.11.x. |
/cherry-pick release-2.12 |
…19488) Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com> Co-authored-by: Jann Fischer <jann@mistrust.net>
/cherry-pick release-2.11 |
…19488) Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com> Co-authored-by: Jann Fischer <jann@mistrust.net>
Fixes #19138
getCAPath
func doesn't correctly return the path for the tls cert if the repoURL passed contains path or port number without a schema. This is mainly because how theurl.Parse()
treats a url without schema. Stackoverflow REFeg:
Below changes are made to ensure the hostname is correctly parsed to return a valid cert path(if present) belonging to the repoURL. The new change works like before for oci case where the schema
oci://
is not part of repoURL string, no separate handling is required.Change:
net/url
correctly parse the hostname.net/url
'sHostname()
func.Checklist: