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

Remove length checking from TxtNoMultipleStrings (#1308)

All functions in should test for only one condition. There already is a
function that tests for long TXT records: TxtNoLongStrings.
Add calls to TxtNoLongStrings in all providers that use
TxtNoMultipleStrings, to keep functionality, except for NS1 and ClouDNS,
which allow for any TXT record length, but not for multiple strings per
TXT.
This commit is contained in:
norman-zon
2021-11-23 20:35:01 +01:00
committed by GitHub
parent 3405757271
commit 58a5a4bcf0
4 changed files with 9 additions and 17 deletions

View File

@@ -97,8 +97,6 @@ func TxtNoMultipleStrings(records []*models.RecordConfig) error {
if rc.HasFormatIdenticalToTXT() { // TXT and similar:
if len(rc.TxtStrings) > 1 {
return fmt.Errorf("multiple strings in one txt")
} else if len(rc.TxtStrings) == 1 && len(rc.TxtStrings[0]) > 255 {
return fmt.Errorf("strings >255 octets")
}
}