mirror of
https://github.com/fumiama/terasu-cloudflared.git
synced 2026-06-07 01:50:23 +08:00
5
vendor/github.com/miekg/dns/defaults.go
generated
vendored
5
vendor/github.com/miekg/dns/defaults.go
generated
vendored
@@ -218,6 +218,11 @@ func IsDomainName(s string) (labels int, ok bool) {
|
||||
|
||||
wasDot = false
|
||||
case '.':
|
||||
if i == 0 && len(s) > 1 {
|
||||
// leading dots are not legal except for the root zone
|
||||
return labels, false
|
||||
}
|
||||
|
||||
if wasDot {
|
||||
// two dots back to back is not legal
|
||||
return labels, false
|
||||
|
||||
Reference in New Issue
Block a user