Comparison

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
comparison
equal deleted inserted replaced
2179:a90c7d7e7413 2180:5e0102a07fdc
225 -- New incoming connections 225 -- New incoming connections
226 module:hook("s2s-stream-features", on_new_s2s, 10); 226 module:hook("s2s-stream-features", on_new_s2s, 10);
227 227
228 module:hook("s2s-authenticated", function(event) 228 module:hook("s2s-authenticated", function(event)
229 local session = event.session; 229 local session = event.session;
230 if session.dane and next(session.dane) ~= nil and not session.secure then 230 if session.dane and type(session.dane) == "table" and next(session.dane) ~= nil and not session.secure then
231 -- TLSA record but no TLS, not ok. 231 -- TLSA record but no TLS, not ok.
232 -- TODO Optional? 232 -- TODO Optional?
233 -- Bogus replies should trigger this path 233 -- Bogus replies should trigger this path
234 -- How does this interact with Dialback? 234 -- How does this interact with Dialback?
235 session:close({ 235 session:close({