mirror of
https://github.com/StevenBlack/hosts.git
synced 2026-07-01 02:36:52 +00:00
Correct 2nd Iter: Ignore subject with slashes (/).
Upon checking the lastest release after merging #2433, I noticed that some subjects with slashes goes through. This patch fixes that by ignoring subjects which contains slashes.
This commit is contained in:
@@ -1129,6 +1129,7 @@ def normalize_rule(rule, target_ip, keep_domain_comments):
|
||||
is_ip(hostname)
|
||||
or re.search(static_ip_regex, hostname)
|
||||
or "." not in hostname
|
||||
or "/" in hostname
|
||||
or ".." in hostname
|
||||
or ":" in hostname
|
||||
):
|
||||
@@ -1147,6 +1148,7 @@ def normalize_rule(rule, target_ip, keep_domain_comments):
|
||||
not re.search(static_ip_regex, split_rule[0])
|
||||
and ":" not in split_rule[0]
|
||||
and ".." not in split_rule[0]
|
||||
and "/" not in split_rule[0]
|
||||
and "." in split_rule[0]
|
||||
):
|
||||
# Deny anything that looks like an IP; doesn't container dots or INVALID.
|
||||
|
||||
Reference in New Issue
Block a user