diff --git a/waf/wordfence.py b/waf/wordfence.py index 0a941c924..dadb8151f 100644 --- a/waf/wordfence.py +++ b/waf/wordfence.py @@ -16,8 +16,7 @@ def detect(get_page): for vector in WAF_ATTACK_VECTORS: page, _, _ = get_page(get=vector) - retval = re.search(r"This response was generated by Wordfence", page or "", re.I) is not None - retval |= re.search(r"Your access to this site has been limited", page or "", re.I) is not None + retval = any(_ in (page or "") for _ in ("A potentially unsafe operation has been detected in your request to this site", "Generated by Wordfence", "Your access to this site has been limited", "This response was generated by Wordfence")) if retval: break