mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
* DNSIMPLE: do not support unpaired double quotes in TXT DNSimple supports multiple double-quotes strings in a TXT record, but does not correctly support unpaired or escaped double-quotes currently. IE the following are valid ``` asdf "asdf" "asdf" "asdf" !@#$ %^&*()([][{}{<></'`:;-_=+\ ``` however `as\"df` and `as"df` are not This removes the extra string processing in getTargetRecordPriority as all tests pass without it and currently only double-quotes cause problems in our TXT validations. I added another test to prove additional quoting is not needed. We can remove it if undesired. Also applied small lint changes to make my editor happy. * Use backticks to prevent escaping * Set TXT target record content to GetTargetRFC1035Quoted() Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
16 lines
378 B
Go
16 lines
378 B
Go
package dnsimple
|
|
|
|
import (
|
|
"github.com/StackExchange/dnscontrol/v3/models"
|
|
"github.com/StackExchange/dnscontrol/v3/pkg/recordaudit"
|
|
)
|
|
|
|
// AuditRecords returns an error if any records are not
|
|
// supportable by this provider.
|
|
func AuditRecords(records []*models.RecordConfig) error {
|
|
if err := recordaudit.TxtNoDoubleQuotes(records); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|