1
0
Fork 0
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:
Knut Ahlers 2019-08-25 21:14:30 +02:00
parent 14afe29601
commit 8b5f0a60ef
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -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