mirror of
https://github.com/gnh1201/caterpillar.git
synced 2024-11-26 15:31:45 +00:00
This commit is contained in:
parent
0d543d2da9
commit
a7371b1fa2
|
@ -72,7 +72,7 @@ class Fediverse(Extension):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# check if the text contains any of the bad domains
|
# check if the text contains any of the bad domains
|
||||||
bad_domains = list(filter(None, map(str.strip, bad_domain.split(",")))
|
bad_domains = list(filter(None, map(str.strip, bad_domain.split(","))))
|
||||||
if bool(re.search(r"https://(" + "|".join(re.escape(domain) for domain in bad_domains) + ")", text)):
|
if bool(re.search(r"https://(" + "|".join(re.escape(domain) for domain in bad_domains) + ")", text)):
|
||||||
logger.warning("[*] Found a bad reputation domain.")
|
logger.warning("[*] Found a bad reputation domain.")
|
||||||
logger.warning("[*] BLOCKED MESSAGE: %s" % (text))
|
logger.warning("[*] BLOCKED MESSAGE: %s" % (text))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user