mirror of
https://github.com/Luzifer/named-blacklist.git
synced 2024-11-09 16:00:09 +00:00
Fail on hosts-file format lines in domain-list
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
14afe29601
commit
8b5f0a60ef
1 changed files with 5 additions and 0 deletions
|
@ -33,6 +33,11 @@ func (p providerdomainList) GetDomainList(d providerDefinition) ([]entry, error)
|
|||
|
||||
domain := strings.TrimSpace(scanner.Text())
|
||||
|
||||
if strings.Contains(domain, " ") {
|
||||
logger.WithField("line", scanner.Text()).Warn("Invalid line found")
|
||||
continue
|
||||
}
|
||||
|
||||
if isBlacklisted(domain) {
|
||||
logger.WithField("domain", domain).Debug("Skipping because of blacklist")
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue