Diff

mod_s2s_auth_dane/mod_s2s_auth_dane.lua @ 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
parent 2035:39774b078dde
child 2181:f00cbfb812cd
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