Software /
code /
prosody
Diff
core/certmanager.lua @ 11531:2bd91d4a0fcf
core.certmanager: Check for complete filename
Prevents a false positive match on files with fullchain.pem as suffix
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 10 Apr 2021 14:45:03 +0200 |
parent | 11368:0bc3acf37428 |
child | 11532:c0c859425c22 |
line wrap: on
line diff
--- a/core/certmanager.lua Wed May 05 16:25:33 2021 +0200 +++ b/core/certmanager.lua Sat Apr 10 14:45:03 2021 +0200 @@ -78,7 +78,7 @@ 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