Diff

plugins/mod_c2s.lua @ 6364:4e93e8768c36

mod_c2s, mod_s2s: Log received invalid stream headers
author Matthew Wild <mwild1@gmail.com>
date Sat, 23 Aug 2014 09:29:17 +0100
parent 6279:16d5b55c8d8d
child 6367:769a3577dd85
child 6380:4220ffb87b22
line wrap: on
line diff
--- a/plugins/mod_c2s.lua	Sat Aug 23 09:22:05 2014 +0100
+++ b/plugins/mod_c2s.lua	Sat Aug 23 09:29:17 2014 +0100
@@ -91,7 +91,7 @@
 
 function stream_callbacks.error(session, error, data)
 	if error == "no-stream" then
-		session.log("debug", "Invalid opening stream header");
+		session.log("debug", "Invalid opening stream header (%s)", (data:gsub("^([^\1]+)\1", "{%1}")));
 		session:close("invalid-namespace");
 	elseif error == "parse-error" then
 		(session.log or log)("debug", "Client XML parse error: %s", tostring(data));