Merge with 0.6

Wed, 25 Nov 2009 15:41:04 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 25 Nov 2009 15:41:04 +0000
changeset 2170
2abca9cc78b1
parent 2166
fb01f0906564 (current diff)
parent 2169
c06fdb6b57bd (diff)
child 2209
141896297cea
child 2210
c418f2ee3ead

Merge with 0.6

net/xmppclient_listener.lua file | annotate | diff | comparison | revisions
util/dependencies.lua file | annotate | diff | comparison | revisions
--- a/net/xmppclient_listener.lua	Wed Nov 25 03:30:41 2009 +0000
+++ b/net/xmppclient_listener.lua	Wed Nov 25 15:41:04 2009 +0000
@@ -61,7 +61,7 @@
 		function session.data(conn, data)
 			local ok, err = parser:parse(data);
 			if ok then return; end
-			log("debug", "Received invalid XML (%s) %d bytes: %s", tostring(err), #data, data:sub(1, 300):gsub("[\r\n]+", " "));
+			log("debug", "Received invalid XML (%s) %d bytes: %s", tostring(err), #data, data:sub(1, 300):gsub("[\r\n]+", " "):gsub("[%z\1-\31]", "_"));
 			session:close("xml-not-well-formed");
 		end
 		
--- a/util/dependencies.lua	Wed Nov 25 03:30:41 2009 +0000
+++ b/util/dependencies.lua	Wed Nov 25 15:41:04 2009 +0000
@@ -75,6 +75,11 @@
 				["Source"] = "http://www.inf.puc-rio.br/~brunoos/luasec/";
 			}, "SSL/TLS support will not be available");
 	end
+else
+	local major, minor, veryminor, patched = ssl._VERSION:match("(%d+)%.(%d+)%.?(%d*)(M?)");
+	if not major or ((tonumber(major) == 0 and (tonumber(minor) or 0) <= 3 and (tonumber(veryminor) or 0) <= 2) and patched ~= "M") then
+		log("error", "This version of LuaSec contains a known bug that causes disconnects, see http://prosody.im/doc/depends");
+	end
 end
 
 local encodings, err = softreq "util.encodings"

mercurial