mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +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:
parent
a0603ad3b7
commit
3081c151bd
2
pihole
2
pihole
@ -86,7 +86,7 @@ scanList(){
|
|||||||
method="${3}"
|
method="${3}"
|
||||||
|
|
||||||
if [[ ${method} == "-exact" ]]; then
|
if [[ ${method} == "-exact" ]]; then
|
||||||
grep -i -E -l "(^|\/)${domain}($|\/)" ${list}
|
grep -i -E -l "(^|\s|\/)${domain}($|\s|\/)" ${list}
|
||||||
else
|
else
|
||||||
grep -i "${domain}" ${list}
|
grep -i "${domain}" ${list}
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user