anything escaped in domain name is legal
Allow all character after a \ in a domainname. It's escaped, it's legal.
This commit is contained in:
parent
5d84523f5b
commit
6ee0baab56
|
@ -7,6 +7,7 @@
|
|||
* Make compare/split labels faster
|
||||
* Ratelimiting?
|
||||
* Have infrastructure to keep track of outbound queries and hold some
|
||||
* Check if \DDD is properly parsed: text/network/etc.
|
||||
|
||||
## Nice to have
|
||||
|
||||
|
|
|
@ -189,7 +189,11 @@ func IsDomainName(s string) (uint8, uint8, bool) { // copied from net package.
|
|||
c = s[i]
|
||||
switch {
|
||||
default:
|
||||
return 0, uint8(l - longer), false
|
||||
// anything escaped is legal
|
||||
if last != '\\' {
|
||||
return 0, uint8(l - longer), false
|
||||
}
|
||||
partlen++
|
||||
case 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' || c == '_' || c == '*' || c == '/':
|
||||
ok = true
|
||||
partlen++
|
||||
|
|
Loading…
Reference in New Issue