From 4127e2f6cbc0fb2f51b1c9ea67b64d269e0f120e Mon Sep 17 00:00:00 2001 From: Joona Hoikkala Date: Fri, 13 Dec 2019 17:47:16 +0200 Subject: [PATCH] Fix regex it --- certbot-apache/certbot_apache/_internal/parser.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/certbot-apache/certbot_apache/_internal/parser.py b/certbot-apache/certbot_apache/_internal/parser.py index a4fc93b4b..6267fa1bb 100644 --- a/certbot-apache/certbot_apache/_internal/parser.py +++ b/certbot-apache/certbot_apache/_internal/parser.py @@ -617,12 +617,13 @@ class ApacheParser(object): """ block_paths = [] # type: List[str] - # Find blocks in the middle of path as well as in the end - block = "/{}(/|$)".format(block) - # Not found if block.lower() not in path.lower(): return block_paths + + # Find blocks in the middle of path as well as in the end + block = "/{}(/|$)".format(block) + startidx = 0 found = re.search(block, path[startidx:], flags=re.IGNORECASE) while found: