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:
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user