# HG changeset patch # User Kim Alvefur # Date 1362858570 -3600 # Node ID 720b8268778eb38dec1391889defbe4f26a90b6d # Parent 0a78ac54bd03f51f8681dd16b446d4ffe256c01b mod_smacks: Don't allow steam resumption onto a stream after resource binding diff -r 0a78ac54bd03 -r 720b8268778e mod_smacks/mod_smacks.lua --- a/mod_smacks/mod_smacks.lua Thu Mar 07 18:26:07 2013 +0100 +++ b/mod_smacks/mod_smacks.lua Sat Mar 09 20:49:30 2013 +0100 @@ -249,6 +249,14 @@ end); module:hook_stanza(xmlns_sm, "resume", function (session, stanza) + if session.full_jid then + session.log("debug", "Tried to resume after resource binding"); + session.send(st.stanza("failed", sm_attr) + :tag("unexpected-request", { xmlns = xmlns_errors }) + ); + return true; + end + local id = stanza.attr.previd; local original_session = session_registry[id]; if not original_session then