From 12427ff6f87e6aeb762b82617d70bdf71b1970ed Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sat, 5 Jan 2019 21:29:59 +0100 Subject: [PATCH] Minor update --- waf/wordfence.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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