NodeName can include non-printable characters and thats causing troubles
Open
type/bug
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
I cannot think of a good use case for non-printable characters in a node name. It also causes problems:
* if it is a server participating in WAN, the non printable char will mess up the node name: https://github.com/hashicorp/consul/blob/65dd14daf304adf012cf1ba220ad0306ec952703/agent/consul/server_serf.go#L40
* the node name is not correctly shown on startup: https://github.com/hashicorp/consul/blob/65dd14daf304adf012cf1ba220ad0306ec952703/command/agent/agent.go#L243
* http api doesn't work with node name with non-printable char
```
$ consul agent -dev -node $(printf "node\x01")
```
Contributor guide
Assessment
This issue has not been assessed yet.