aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/xmppclient_listener.lua2
-rw-r--r--util/dependencies.lua5
2 files changed, 6 insertions, 1 deletions
diff --git a/net/xmppclient_listener.lua b/net/xmppclient_listener.lua
index 4fd51db6..223fa89b 100644
--- a/net/xmppclient_listener.lua
+++ b/net/xmppclient_listener.lua
@@ -61,7 +61,7 @@ local function session_reset_stream(session)
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
diff --git a/util/dependencies.lua b/util/dependencies.lua
index 06f742e4..b1d02921 100644
--- a/util/dependencies.lua
+++ b/util/dependencies.lua
@@ -75,6 +75,11 @@ if not ssl then
["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"