Changeset

4843:d91dda67647a

Merge with backout
author Matthew Wild <mwild1@gmail.com>
date Fri, 11 May 2012 01:45:36 +0100
parents 4841:ce793cea9f10 (current diff) 4842:88101f652174 (diff)
children 4845:f56eeff93847
files plugins/mod_dialback.lua
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_dialback.lua	Fri May 11 01:32:46 2012 +0100
+++ b/plugins/mod_dialback.lua	Fri May 11 01:45:36 2012 +0100
@@ -79,7 +79,11 @@
 		local compat_check;
 		if not origin.from_host then
 			-- Just used for friendlier logging
-			origin.from_host = attr.from;
+			origin.from_host = nameprep(attr.from);
+			if not origin.from_host then
+				origin.log("debug", "We need to know where to connect but remote server blindly refuses to tell us and to comply to specs, closing connection.");
+				origin:close("invalid-from");
+			end
 		end
 		if not origin.to_host then
 			-- Just used for friendlier logging