Changeset

1411:8626abe100e2

mod_s2s_auth_dane: Fix traceback if session.srv_hosts is nil
author Kim Alvefur <zash@zash.se>
date Thu, 08 May 2014 15:43:58 +0200
parents 1410:f4e497a53c6e
children 1412:d85695be0441
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	Wed May 07 17:08:47 2014 +0200
+++ b/mod_s2s_auth_dane/mod_s2s_auth_dane.lua	Thu May 08 15:43:58 2014 +0200
@@ -231,7 +231,7 @@
 		end
 	else
 		if session.cert_chain_status == "valid" and session.cert_identity_status ~= "valid"
-		and session.srv_hosts.answer and session.srv_hosts.answer.secure then
+		and session.srv_hosts and session.srv_hosts.answer and session.srv_hosts.answer.secure then
 			local srv_hosts, srv_choice, srv_target = session.srv_hosts, session.srv_choice;
 			for i = srv_choice or 1, srv_choice or #srv_hosts do
 				srv_target = nameprep(idna_to_unicode(session.srv_hosts[i].target:gsub("%.?$","")));