Mercurial > prosody-modules
comparison mod_s2s_auth_dane/mod_s2s_auth_dane.lua @ 1362:920ac9a8480b
mod_s2s_auth_dane: Fix tb when no hostname sent by remote
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 19 Mar 2014 19:48:06 +0100 |
parents | 74769c0c79f8 |
children | 103d685e2153 |
comparison
equal
deleted
inserted
replaced
1361:b9213ddb860f | 1362:920ac9a8480b |
---|---|
48 local enabled_uses = set.intersection(implemented_uses, configured_uses) / function(use) return use_map[use] end; | 48 local enabled_uses = set.intersection(implemented_uses, configured_uses) / function(use) return use_map[use] end; |
49 | 49 |
50 local function dane_lookup(host_session, cb, a,b,c,e) | 50 local function dane_lookup(host_session, cb, a,b,c,e) |
51 if host_session.dane ~= nil then return end | 51 if host_session.dane ~= nil then return end |
52 if host_session.direction == "incoming" then | 52 if host_session.direction == "incoming" then |
53 local name = idna_to_ascii(host_session.from_host); | 53 local name = host_session.from_host and idna_to_ascii(host_session.from_host); |
54 if not name then return end | 54 if not name then return end |
55 host_session.dane = dns_lookup(function (answer) | 55 host_session.dane = dns_lookup(function (answer) |
56 if not answer.secure then | 56 if not answer.secure then |
57 if cb then return cb(a,b,c,e); end | 57 if cb then return cb(a,b,c,e); end |
58 return; | 58 return; |