comparison util/xmppstream.lua @ 14123:166ac7d65cb6 13.0

util.xmppstream: Reduce default stanza size limit to 10k for safety To provide a safe default in case the limit is forgotten.
author Kim Alvefur <zash@zash.se>
date Tue, 07 Apr 2026 20:44:41 +0200
parents d10957394a3c
children 6c7549964d4d
comparison
equal deleted inserted replaced
14122:8a4417d32b0f 14123:166ac7d65cb6
20 -- COMPAT: w/LuaExpat 1.1.0 20 -- COMPAT: w/LuaExpat 1.1.0
21 local lxp_supports_doctype = pcall(lxp.new, { StartDoctypeDecl = false }); 21 local lxp_supports_doctype = pcall(lxp.new, { StartDoctypeDecl = false });
22 local lxp_supports_xmldecl = pcall(lxp.new, { XmlDecl = false }); 22 local lxp_supports_xmldecl = pcall(lxp.new, { XmlDecl = false });
23 local lxp_supports_bytecount = not not lxp.new({}).getcurrentbytecount; 23 local lxp_supports_bytecount = not not lxp.new({}).getcurrentbytecount;
24 24
25 local default_stanza_size_limit = 1024*1024*1; -- 1MB 25 local default_stanza_size_limit = 10000; -- Minimum stanza size limit
26 26
27 local _ENV = nil; 27 local _ENV = nil;
28 -- luacheck: std none 28 -- luacheck: std none
29 29
30 local new_parser = lxp.new; 30 local new_parser = lxp.new;