mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-10-03 10:24:26 +08:00
AXFRDDNS: Canonicalize key name as per RFC 2845 3.4.2 (#2966)
This commit is contained in:
parent
1f4c4c65f5
commit
b3787ab8f7
1 changed files with 1 additions and 4 deletions
|
@ -216,10 +216,7 @@ func readKey(raw string, kind string) (*Key, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot decode Base64 secret (%s) in AXFRDDNS.TSIG", kind)
|
return nil, fmt.Errorf("cannot decode Base64 secret (%s) in AXFRDDNS.TSIG", kind)
|
||||||
}
|
}
|
||||||
id := arr[1]
|
id := dns.CanonicalName(arr[1])
|
||||||
if !strings.HasSuffix(id, ".") {
|
|
||||||
id += "."
|
|
||||||
}
|
|
||||||
return &Key{algo: algo, id: id, secret: arr[2]}, nil
|
return &Key{algo: algo, id: id, secret: arr[2]}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue