diff options
author | Kim Alvefur <zash@zash.se> | 2021-04-10 14:45:03 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-04-10 14:45:03 +0200 |
commit | 003e8f633a79dffc877315b75e1791b1f645409a (patch) | |
tree | dca83f15d214d7d68a2981567d6b1dcb3f133fe4 | |
parent | 02cead40db8fc72d21eb88a3ea7f211ef124655f (diff) | |
download | prosody-003e8f633a79dffc877315b75e1791b1f645409a.tar.gz prosody-003e8f633a79dffc877315b75e1791b1f645409a.zip |
core.certmanager: Check for complete filename
Prevents a false positive match on files with fullchain.pem as suffix
-rw-r--r-- | core/certmanager.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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 |