From efbc18d787da6433ec7409396babe0ff7ea8cc1c Mon Sep 17 00:00:00 2001 From: Joona Hoikkala Date: Fri, 13 Dec 2019 19:29:56 +0200 Subject: [PATCH] Remove the trailing slash --- certbot-apache/certbot_apache/_internal/parser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/certbot-apache/certbot_apache/_internal/parser.py b/certbot-apache/certbot_apache/_internal/parser.py index 6267fa1bb..884df0a6a 100644 --- a/certbot-apache/certbot_apache/_internal/parser.py +++ b/certbot-apache/certbot_apache/_internal/parser.py @@ -628,7 +628,8 @@ class ApacheParser(object): found = re.search(block, path[startidx:], flags=re.IGNORECASE) while found: if found: - block_paths.append(path[:found.end()]) + # Don't include the trailing slash + block_paths.append(path[:found.end()-1]) startidx = found.end() found = re.search(block, path[startidx:], flags=re.IGNORECASE) # We want the list to be from the leaf to the root