TRANSIP: Fix quoting of TXT records (#1918)

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
Vincent Hagen 2023-01-09 16:24:23 +01:00 committed by GitHub
parent 01829a2dc0
commit 0403b2c82d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -236,8 +236,6 @@ func removeOtherNS(dc *models.DomainConfig) {
func getTargetRecordContent(rc *models.RecordConfig) string {
switch rtype := rc.Type; rtype {
case "CAA":
return rc.GetTargetCombined()
case "SSHFP":
return fmt.Sprintf("%d %d %s", rc.SshfpAlgorithm, rc.SshfpFingerprint, rc.GetTargetField())
case "DS":
@ -245,6 +243,6 @@ func getTargetRecordContent(rc *models.RecordConfig) string {
case "SRV":
return fmt.Sprintf("%d %d %s", rc.SrvWeight, rc.SrvPort, rc.GetTargetField())
default:
return rc.GetTargetCombined()
return models.StripQuotes(rc.GetTargetCombined())
}
}