Skip to content

Conversation

@Atul1710
Copy link

@Atul1710 Atul1710 commented Nov 25, 2025

Fixes: #8719

Splits the host and port in the HTTP2 :authority header in ValidateAuthority before calling VerifyHostname. Added test cases to check multiple different types of values possible for :authority

Release notes:

  • tls: strip port before validating authority override.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 25, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@Atul1710 Atul1710 changed the title Splitting host and port of authority header Splitting host and port of authority header Nov 25, 2025
@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.33%. Comparing base (cdbafd3) to head (cf93c27).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8726      +/-   ##
==========================================
+ Coverage   83.25%   83.33%   +0.07%     
==========================================
  Files         419      419              
  Lines       32427    32432       +5     
==========================================
+ Hits        26997    27026      +29     
+ Misses       4047     4034      -13     
+ Partials     1383     1372      -11     
Files with missing lines Coverage Δ
credentials/tls.go 91.53% <100.00%> (+2.56%) ⬆️

... and 28 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Atul1710 Atul1710 changed the title Splitting host and port of authority header credentials/tls: Splitting host and port of authority header Nov 25, 2025
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing tests for authority override are located here:

  1. Tests for successful override
  2. Tests for invalid override

Could you please add a new test case to the list of successful cases? For the invalid override tests, it would be great if you could refactor them into a table-driven test (similar to the success cases) and include a case for the changes in this PR. This will help avoid code duplication.

@arjan-bal arjan-bal assigned Atul1710 and unassigned arjan-bal Nov 27, 2025
@arjan-bal arjan-bal added this to the 1.78 Release milestone Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tls: Authority validation doesn't strip ports before validation

2 participants