INWX: Fix PTR test failing/unexpected PTR modify operation (#2430)

This commit is contained in:
Patrik Kernstock 2023-06-08 18:34:03 +01:00 committed by GitHub
parent e166160072
commit 3250681821
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -308,7 +308,14 @@ func (api *inwxAPI) GetZoneRecords(domain string, meta map[string]string) (model
Records with empty targets (i.e. records with target ".") Records with empty targets (i.e. records with target ".")
are not allowed. are not allowed.
*/ */
if record.Type == "CNAME" || record.Type == "MX" || record.Type == "NS" || record.Type == "SRV" { var rtypeAddDot = map[string]bool{
"CNAME": true,
"MX": true,
"NS": true,
"SRV": true,
"PTR": true,
}
if rtypeAddDot[record.Type] {
record.Content = record.Content + "." record.Content = record.Content + "."
} }