Changeset

3287:f0e19a77f81e

mod_s2s_auth_posh: Ensure JWK data decodes to a table
author Kim Alvefur <zash@zash.se>
date Sat, 25 Aug 2018 20:00:45 +0200
parents 3286:4d1f6d47c889
children 3288:3eee4029ac6c
files mod_s2s_auth_posh/mod_s2s_auth_posh.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_s2s_auth_posh/mod_s2s_auth_posh.lua	Sat Aug 25 17:55:16 2018 +0200
+++ b/mod_s2s_auth_posh/mod_s2s_auth_posh.lua	Sat Aug 25 20:00:45 2018 +0200
@@ -54,7 +54,7 @@
 		end
 		log("debug", "Received POSH response");
 		local jwk = json.decode(response);
-		if not jwk then
+		if not jwk or type(jwk) ~= "table" then
 			log("error", "POSH response is not valid JSON!\n%s", tostring(response));
 			resume();
 			return;