mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
BUG: Support RFC2317 by allowing slash in CNAME target (#1360)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
@@ -36,7 +36,10 @@ func checkTarget(target string) error {
|
||||
if target == "" {
|
||||
return fmt.Errorf("empty target")
|
||||
}
|
||||
if strings.ContainsAny(target, `'" +,|!£$%&/()=?^*ç°§;:<>[]()@`) {
|
||||
if strings.ContainsAny(target, `'" +,|!£$%&()=?^*ç°§;:<>[]()@`) {
|
||||
return fmt.Errorf("target (%v) includes invalid char", target)
|
||||
}
|
||||
if !strings.HasSuffix(target, ".in-addr.arpa.") && strings.Contains(target, "/") {
|
||||
return fmt.Errorf("target (%v) includes invalid char", target)
|
||||
}
|
||||
// If it contains a ".", it must end in a ".".
|
||||
|
Reference in New Issue
Block a user