1
0
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:
Hampton
2022-01-03 10:24:33 -05:00
committed by GitHub
parent 2dcc9b1c11
commit 998a25aa08

View File

@@ -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 ".".