-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Labels
Area: AuthIncludes regular credentials API and implementation. Also includes advancedtls, authz, rbac etc.Includes regular credentials API and implementation. Also includes advancedtls, authz, rbac etc.Type: Bug
Description
The HTTP2 :authority header frequently contains the port along with the hostname. The ValidateAuthority method should strip the port, if it exists, before calling VerifyHostname.
Lines 57 to 67 in 50c6321
| func (t TLSInfo) ValidateAuthority(authority string) error { | |
| var errs []error | |
| for _, cert := range t.State.PeerCertificates { | |
| var err error | |
| if err = cert.VerifyHostname(authority); err == nil { | |
| return nil | |
| } | |
| errs = append(errs, err) | |
| } | |
| return fmt.Errorf("credentials: invalid authority %q: %v", authority, errors.Join(errs...)) | |
| } |
We should also add a test to verify the correct behaviour.
Metadata
Metadata
Assignees
Labels
Area: AuthIncludes regular credentials API and implementation. Also includes advancedtls, authz, rbac etc.Includes regular credentials API and implementation. Also includes advancedtls, authz, rbac etc.Type: Bug