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

Work around extra whitespace in spf records (#361)

* handle empty spf parts from bad records

* update spf tool
This commit is contained in:
Craig Peterson
2018-05-03 10:03:38 -04:00
committed by GitHub
parent f77f202b65
commit 6c60eac7c7
5 changed files with 45077 additions and 32375 deletions

View File

@ -27,3 +27,15 @@ func TestParse(t *testing.T) {
}
t.Log(rec.Print())
}
func TestParseWithDoubleSpaces(t *testing.T) {
dnsres, err := NewCache("testdata-dns1.json")
if err != nil {
t.Fatal(err)
}
rec, err := Parse("v=spf1 ip4:192.111.0.0/24 ip4:192.111.1.0/24 -all", dnsres)
if err != nil {
t.Fatal(err)
}
t.Log(rec.Print())
}