Pull request 1769: 5584-invalid-host-panic

Merge in DNS/adguard-home from 5584-invalid-host-panic to master

Updates #5584.

Squashed commit of the following:

commit a09b59e279089c86b785b3c839dff10b3f327779
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Tue Mar 14 17:05:12 2023 +0300

    all: upd golibs, add test
This commit is contained in:
Eugene Burkov
2023-03-14 17:23:01 +03:00
parent 595484e0b3
commit c6706445c9
4 changed files with 30 additions and 18 deletions

View File

@@ -608,6 +608,11 @@ func TestUniqueRules_ParseLine(t *testing.T) {
line: ``,
wantIP: netip.Addr{},
wantHosts: nil,
}, {
name: "bad_hosts",
line: ipStr + ` bad..host bad._tld empty.tld. ok.host`,
wantIP: ip,
wantHosts: []string{"ok.host"},
}}
for _, tc := range testCases {