mirror of
https://github.com/Luzifer/named-blacklist.git
synced 2024-09-19 16:23:00 +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
@ -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 New Issue
Block a user