plugins/mod_c2s.lua
changeset 11774 d2a9aa1c7ac8
parent 11751 9f723b54e111
child 11782 f254fd16218a
--- a/plugins/mod_c2s.lua	Sun Sep 05 18:42:44 2021 +0200
+++ b/plugins/mod_c2s.lua	Mon Sep 06 23:21:25 2021 +0200
@@ -339,7 +339,11 @@
 				if not ok then
 					log("debug", "Received invalid XML (%s) %d bytes: %q", err, #data, data:sub(1, 300));
 					if err == "stanza-too-large" then
-						session:close({ condition = "policy-violation", text = "XML stanza is too big" });
+						session:close({
+							condition = "policy-violation",
+							text = "XML stanza is too big",
+							extra = st.stanza("stanza-too-big", { xmlns = 'urn:xmpp:errors' }),
+						});
 					else
 						session:close("not-well-formed");
 					end