1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 14:58:08 +00:00

Merge pull request #2735 from pi-hole/fix/gravity-blocked-domain

Fix incorrect adlist query when an adlist is blocked during gravity
This commit is contained in:
DL6ER 2019-05-04 23:14:49 +02:00 committed by GitHub
commit 8abeb2204b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -268,7 +268,7 @@ gravity_DownloadBlocklistFromUrl() {
port=443;
else port=80
fi
bad_list=$(pihole -q -adlist hosts-file.net | head -n1 | awk -F 'Match found in ' '{print $2}')
bad_list=$(pihole -q -adlist "${domain}" | head -n1 | awk -F 'Match found in ' '{print $2}')
echo -e "${OVER} ${CROSS} ${str} ${domain} is blocked by ${bad_list%:}. Using DNS on ${PIHOLE_DNS_1} to download ${url}";
echo -ne " ${INFO} ${str} Pending..."
cmd_ext="--resolve $domain:$port:$ip $cmd_ext"