changeset 2180:5e0102a07fdc

mod_s2s_auth_dane: Make sure dane field has correct type
author Kim Alvefur <zash@zash.se>
date Thu, 26 May 2016 15:31:32 +0200
parents a90c7d7e7413
children f00cbfb812cd
files mod_s2s_auth_dane/mod_s2s_auth_dane.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_s2s_auth_dane/mod_s2s_auth_dane.lua	Tue May 24 11:59:25 2016 +0200
+++ b/mod_s2s_auth_dane/mod_s2s_auth_dane.lua	Thu May 26 15:31:32 2016 +0200
@@ -227,7 +227,7 @@
 
 	module:hook("s2s-authenticated", function(event)
 		local session = event.session;
-		if session.dane and next(session.dane) ~= nil and not session.secure then
+		if session.dane and type(session.dane) == "table" and next(session.dane) ~= nil and not session.secure then
 			-- TLSA record but no TLS, not ok.
 			-- TODO Optional?
 			-- Bogus replies should trigger this path