* SB/PC: limit the number of hashes in request to 4

This commit is contained in:
Simon Zolin
2020-06-23 12:39:19 +03:00
parent 2c47053cfe
commit 0ee3505e1f
2 changed files with 19 additions and 0 deletions

View File

@@ -146,6 +146,12 @@ func TestEtcHostsMatching(t *testing.T) {
// SAFE BROWSING
func TestSafeBrowsingHash(t *testing.T) {
q, hashes := hostnameToHashParam("1.2.3.4.5.6")
assert.Equal(t, "0132d0fa.b5413b4e.5fa067c1.e7f6c011.", q)
assert.Equal(t, 4, len(hashes))
}
func TestSafeBrowsing(t *testing.T) {
d := NewForTest(&Config{SafeBrowsingEnabled: true}, nil)
defer d.Close()