1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

TXT records should check length at check/preview time (#947)

* TXT records should check length
* Add validation to TXT generator
* Split and validate long TXT targets
* Add a metaparameter to TXT records to indicate autosplit is requested.
* SPF_BUILDER marks TXT records as needing to be autosplit.
* Validate should check for overly-long TXT targets
This commit is contained in:
Tom Limoncelli
2020-11-18 07:05:26 -05:00
committed by GitHub
parent 550fa436ed
commit 13a1360779
8 changed files with 333 additions and 143 deletions

View File

@ -23,6 +23,9 @@ so that it is easy to do things the right way in preparation.
// GetTargetField returns the target. There may be other fields (for example
// an MX record also has a .MxPreference field.
func (rc *RecordConfig) GetTargetField() string {
if rc.Type == "TXT" {
return strings.Join(rc.TxtStrings, "")
}
return rc.Target
}