plugins/mod_dialback.lua
changeset 4843 d91dda67647a
parent 4841 ce793cea9f10
parent 4842 88101f652174
child 4846 3bc3498df0a0
--- 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