mod_s2s_auth_dane: Fix tb when no hostname sent by remote
authorKim Alvefur <zash@zash.se>
Wed, 19 Mar 2014 19:48:06 +0100
changeset 1362 920ac9a8480b
parent 1361 b9213ddb860f
child 1363 478b3288192f
mod_s2s_auth_dane: Fix tb when no hostname sent by remote
mod_s2s_auth_dane/mod_s2s_auth_dane.lua
--- a/mod_s2s_auth_dane/mod_s2s_auth_dane.lua	Wed Mar 19 19:39:03 2014 +0100
+++ b/mod_s2s_auth_dane/mod_s2s_auth_dane.lua	Wed Mar 19 19:48:06 2014 +0100
@@ -50,7 +50,7 @@
 local function dane_lookup(host_session, cb, a,b,c,e)
 	if host_session.dane ~= nil then return end
 	if host_session.direction == "incoming" then
-		local name = idna_to_ascii(host_session.from_host);
+		local name = host_session.from_host and idna_to_ascii(host_session.from_host);
 		if not name then return end
 		host_session.dane = dns_lookup(function (answer)
 			if not answer.secure then