From 003e8f633a79dffc877315b75e1791b1f645409a Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 10 Apr 2021 14:45:03 +0200 Subject: core.certmanager: Check for complete filename Prevents a false positive match on files with fullchain.pem as suffix --- core/certmanager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/certmanager.lua b/core/certmanager.lua index 4bc98935..ce0b4b5c 100644 --- a/core/certmanager.lua +++ b/core/certmanager.lua @@ -78,7 +78,7 @@ local function find_cert(user_certs, name) if crt_path == key_path then if key_path:sub(-4) == ".crt" then key_path = key_path:sub(1, -4) .. "key"; - elseif key_path:sub(-13) == "fullchain.pem" then + elseif key_path:sub(-14) == "/fullchain.pem" then key_path = key_path:sub(1, -14) .. "privkey.pem"; end end -- cgit v1.2.3