diff options
-rw-r--r-- | plugins/mod_s2s.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/mod_s2s.lua b/plugins/mod_s2s.lua index a8e707a0..afed3575 100644 --- a/plugins/mod_s2s.lua +++ b/plugins/mod_s2s.lua @@ -772,6 +772,11 @@ local function initialize_session(session) end if t then t = filter("bytes/out", tostring(t)); + if session.outgoing_stanza_size_limit and #t > session.outgoing_stanza_size_limit then + log("warn", "Attempt to send a stanza exceeding session limit of %dB (%dB)!", session.outgoing_stanza_size_limit, #t); + -- TODO Pass identifiable error condition back to allow appropriate handling + return false + end if t then return w(conn, t); end |