1
0
mirror of https://github.com/Luzifer/named-blacklist.git synced 2024-09-19 00:02:59 +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