-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix empty basic auth #1601
Fix empty basic auth #1601
Conversation
a71e50e
to
3382454
Compare
server/server.go
Outdated
@@ -843,7 +844,7 @@ func (server *Server) buildDefaultHTTPRouter() *mux.Router { | |||
return router | |||
} | |||
|
|||
func parseHealthCheckOptions(lb healthcheck.LoadBalancer, backend string, hc *types.HealthCheck, hcConfig HealthCheckConfig) *healthcheck.Options { | |||
func parseHealthCheckOptions(lb healthcheck.LoadBalancer, backend string, hc *types.HealthCheck, hcConfig *HealthCheckConfig) *healthcheck.Options { |
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.
Do we guarantee on the call site that hcConfig
is always != nil? Without that, we could run into a nil reference issue on line 852.
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.
Oops, I was thinking the same and I just saw you too :) Fixed.
Hmm, how's the health check configuration related to basic auth? I must be missing a piece of the puzzle... 🤔 |
3382454
to
2b2ba27
Compare
@timoreimann You are absolutely right. I just fixed this because it failed while I was writing the new tests and I thought it would be safer to remove the pointer dereferencing calling |
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. 👍
Signed-off-by: Emile Vauge <[email protected]>
2b2ba27
to
eaedc1b
Compare
Description
This PR fixes traefik crash when basic auth user is empty.
Fixes #1592