blocklists: sanitize hosts entries

Remove \r\n\t\s from the end of each line of a blocklist.

If the entries of a list had these characters caused to not match
connections and not apply the rule.

closes #429
This commit is contained in:
Gustavo Iñiguez Goia 2021-08-22 23:07:25 +02:00
parent e85ba18a17
commit 96722ed740

View file

@ -127,6 +127,8 @@ func (o *Operator) readList(fileName string) (dups uint64) {
if host == "local" || host == "localhost" || host == "localhost.localdomain" || host == "broadcasthost" {
continue
}
host = core.Trim(host)
if _, found := o.lists[host]; found {
dups++
continue