GCORE: Fix handling very long TXT records (#2744)

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
Yuhui Xu 2024-01-02 11:15:46 -08:00 committed by GitHub
parent fe4e07b3bb
commit 8ed137aff5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,7 +86,7 @@ func recordsToNative(rcs []*models.RecordConfig, expectedKey models.RecordKey) *
}
case "TXT": // Avoid double quoting for TXT records
rr = dnssdk.ResourceRecord{
Content: convertTxtSliceToSdkAnySlice(r.GetTargetTXTSegmented()),
Content: convertTxtSliceToSdkAnySlice(r.GetTargetTXTJoined()),
Meta: nil,
Enabled: true,
}
@ -119,11 +119,8 @@ func recordsToNative(rcs []*models.RecordConfig, expectedKey models.RecordKey) *
return result
}
func convertTxtSliceToSdkAnySlice(records []string) []any {
result := []any{}
for _, record := range records {
result = append(result, record)
}
func convertTxtSliceToSdkAnySlice(record string) []any {
result := []any{record}
return result
}