changeset 3204:13f381f0c03f

mod_s2s_auth_posh: Abort if no fingerprints are found
author Kim Alvefur <zash@zash.se>
date Thu, 21 Dec 2017 03:23:58 +0100
parents b3e82e2b818e
children 7bfb25111ea6
files mod_s2s_auth_posh/mod_s2s_auth_posh.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_s2s_auth_posh/mod_s2s_auth_posh.lua	Thu Dec 21 03:23:46 2017 +0100
+++ b/mod_s2s_auth_posh/mod_s2s_auth_posh.lua	Thu Dec 21 03:23:58 2017 +0100
@@ -86,6 +86,11 @@
 	local jwk = posh and posh.jwk;
 	local fingerprints = jwk and jwk.fingerprints;
 
+	if not fingerprints then
+		log("debug", "No POSH authentication data available");
+		return;
+	end
+
 	local cert_der = pem2der(cert:pem());
 	local cert_hashes = {};
 	for i = 1, #hash_order do