Changeset

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
parents 3476:4ce945490a24
children 3478:f6319346e2a3
files mod_smacks/mod_smacks.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
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;