fix(model): TXT сравнивается байт-точно (без схлопывания пробелов)
This commit is contained in:
@@ -54,10 +54,11 @@ func normalizeName(name string) string {
|
||||
|
||||
// normalizeValue canonicalizes a single RR value for comparison.
|
||||
func normalizeValue(t RecordType, content string) string {
|
||||
if t == TXT {
|
||||
return content // byte-exact — case and whitespace are significant (DKIM/SPF/DMARC)
|
||||
}
|
||||
c := strings.Join(strings.Fields(content), " ") // collapse whitespace
|
||||
switch t {
|
||||
case TXT:
|
||||
return c // case-sensitive — keep as is
|
||||
case MX:
|
||||
parts := strings.SplitN(c, " ", 2)
|
||||
if len(parts) == 2 {
|
||||
|
||||
Reference in New Issue
Block a user