tailscale / tailscale/tailscale
util/dnsname: ToFQDN doesn't validate labels
- Dominant language
- Go
- Stars
- 36.5k
- Forks
- 3.2k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 132
Description
the `dnsname` package contains:
```
func ToFQDN(s string) (FQDN, error) {
```
It validates things like the total length (253) and per-label length (63) but doesn't validate that the labels aren't binary gibberish.
There's also:
```
// ValidLabel reports whether label is a valid DNS label.
func ValidLabel(label string) error {
```
But `ToFQDN` doesn't use that.
/cc @danderson @maisem
Contributor guide
Research direction
Start with the util/dnsname package and inspect ToFQDN alongside ValidLabel. Trace which validation ToFQDN currently performs, then verify that invalid label contents are rejected consistently; completion means ToFQDN no longer accepts binary-gibberish labels.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100