mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-04 08:34:40 +01:00
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:
parent
e85ba18a17
commit
96722ed740
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue