diff options
author | Matthew Wild <mwild1@gmail.com> | 2021-05-07 17:03:49 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2021-05-07 17:03:49 +0100 |
commit | 4c4e764e23cd7d103868a73a0cdb5a7bdcaa4bea (patch) | |
tree | 7aef7341dcea6d08c8fb676712d77982054b289c /plugins/mod_s2s/mod_s2s.lua | |
parent | 4c7989e7e4c95ccfbdc189abc5bdea9aa9e90b02 (diff) | |
download | prosody-4c4e764e23cd7d103868a73a0cdb5a7bdcaa4bea.tar.gz prosody-4c4e764e23cd7d103868a73a0cdb5a7bdcaa4bea.zip |
mod_c2s, mod_s2s, mod_component, mod_bosh, mod_websockets: Set default stanza size limits
c2s/bosh/ws streams will default to 256KB, s2s and components to 512KB.
These values are aligned with ejabberd's default settings, which should reduce
issues related to inconsistent size limits between servers on the XMPP network.
The previous default (10MB) is excessive for any production server, and allows
significant memory usage by even unauthenticated sessions.
Diffstat (limited to 'plugins/mod_s2s/mod_s2s.lua')
-rw-r--r-- | plugins/mod_s2s/mod_s2s.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua index 8e398f56..b2376b97 100644 --- a/plugins/mod_s2s/mod_s2s.lua +++ b/plugins/mod_s2s/mod_s2s.lua @@ -37,7 +37,7 @@ local secure_auth = module:get_option_boolean("s2s_secure_auth", false); -- One local secure_domains, insecure_domains = module:get_option_set("s2s_secure_domains", {})._items, module:get_option_set("s2s_insecure_domains", {})._items; local require_encryption = module:get_option_boolean("s2s_require_encryption", false); -local stanza_size_limit = module:get_option_number("s2s_stanza_size_limit"); -- TODO come up with a sensible default (util.xmppstream defaults to 10M) +local stanza_size_limit = module:get_option_number("s2s_stanza_size_limit", 1024*512); local measure_connections = module:measure("connections", "amount"); local measure_ipv6 = module:measure("ipv6", "amount"); |