Fix permissive regex
The `\.?` is too permissive, letting in anything that ends in the domain Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
@@ -24,5 +24,5 @@ convert_wildcard_to_regex() {
|
||||
# Remove repeated domains (may have been inserted two times due to A and AAAA blocking)
|
||||
uniquedomains="$(uniq <<< "${domains}")"
|
||||
# Automatically generate regex filters and remove old wildcards file
|
||||
awk '{print "\\.?"$0"$"}' <<< "${uniquedomains}" >> "${regexFile:?}" && rm "${wildcardFile}"
|
||||
awk '{print "(^|\\.)"$0"$"}' <<< "${uniquedomains}" >> "${regexFile:?}" && rm "${wildcardFile}"
|
||||
}
|
||||
|
Reference in New Issue
Block a user