1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 06:48:07 +00:00

Perform EXACT searches on HOSTS lists correctly

`\s` on the end may be overkill, but it is the existing scanList() behaviour.
This commit is contained in:
WaLLy3K 2017-05-11 09:13:32 +10:00 committed by GitHub
parent a0603ad3b7
commit 3081c151bd

2
pihole
View File

@ -86,7 +86,7 @@ scanList(){
method="${3}"
if [[ ${method} == "-exact" ]]; then
grep -i -E -l "(^|\/)${domain}($|\/)" ${list}
grep -i -E -l "(^|\s|\/)${domain}($|\s|\/)" ${list}
else
grep -i "${domain}" ${list}
fi