Diff

mod_smacks/mod_smacks.lua @ 3477:1f2381492c9f

mod_smacks: no crash on <a> without @h, fix #1317
author Georg Lukas <georg@op-co.de>
date Wed, 06 Mar 2019 21:25:47 +0100
parent 3450:9b6206f23151
child 3478:f6319346e2a3
line wrap: on
line diff
--- a/mod_smacks/mod_smacks.lua	Wed Mar 06 17:46:57 2019 +0100
+++ b/mod_smacks/mod_smacks.lua	Wed Mar 06 21:25:47 2019 +0100
@@ -344,6 +344,7 @@
 	local h = tonumber(stanza.attr.h);
 	if not h then
 		origin:close{ condition = "invalid-xml"; text = "Missing or invalid 'h' attribute"; };
+		return;
 	end
 	local handled_stanza_count = h-origin.last_acknowledged_stanza;
 	local queue = origin.outgoing_stanza_queue;