Skip to content

Commit

Permalink
Merge pull request #17024 from jmhbnz/backport-ssrf-fix
Browse files Browse the repository at this point in the history
[3.5] Backport disable following redirects when checking peer urls
  • Loading branch information
serathius authored Nov 28, 2023
2 parents d4e8610 + 9e21048 commit ce4ae2b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/etcdserver/cluster_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ func isCompatibleWithVers(lg *zap.Logger, vers map[string]*version.Versions, loc
func getVersion(lg *zap.Logger, m *membership.Member, rt http.RoundTripper) (*version.Versions, error) {
cc := &http.Client{
Transport: rt,
CheckRedirect: func(req *http.Request, via []*http.Request) error {
return http.ErrUseLastResponse
},
}
var (
err error
Expand Down

0 comments on commit ce4ae2b

Please sign in to comment.