mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-18 18:38:08 -05:00
Work around issue with UNIX domain sockets in api.Client addresses (#22523)
The Host part of the URL doesn't actually get used when we initiate connections to UNIX domain sockets. As of https://github.com/golang/go/issues/60374 (in the latest Go releases at the time of this writing), we must set it to something that looks like a hostname or requests will fail.
This commit is contained in:
parent
e4ce8729fd
commit
e29d98aadb
2 changed files with 4 additions and 1 deletions
|
|
@ -545,7 +545,7 @@ func (c *Config) ParseAddress(address string) (*url.URL, error) {
|
|||
// be pointing to the protocol used in the application layer and not to
|
||||
// the transport layer. Hence, setting the fields accordingly.
|
||||
u.Scheme = "http"
|
||||
u.Host = socket
|
||||
u.Host = "localhost"
|
||||
u.Path = ""
|
||||
} else {
|
||||
return nil, fmt.Errorf("attempting to specify unix:// address with non-transport transport")
|
||||
|
|
|
|||
3
changelog/22523.txt
Normal file
3
changelog/22523.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
api: Fix breakage with UNIX domain socket addresses introduced by newest Go versions as a security fix.
|
||||
```
|
||||
Loading…
Reference in a new issue