24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-08 21:43:07 +02:00

PubSub: Use configured 'max_items' by default

If clients don't ask for a specific 'max_items' limit, use the value of
mod_pubsub's 'max_items_node' option as default, rather than the
hard-coded ?MAXITEMS value.  This makes sure clients cannot circumvent a
smaller, configured limit.
This commit is contained in:
Holger Weiss 2021-07-28 18:53:15 +02:00
parent 103e98b8da
commit 2050cdffb4

View File

@ -3406,7 +3406,7 @@ max_items(Host, Options) ->
case get_option(Options, max_items) of case get_option(Options, max_items) of
I when is_integer(I), I < 0 -> 0; I when is_integer(I), I < 0 -> 0;
I when is_integer(I) -> I; I when is_integer(I) -> I;
_ -> ?MAXITEMS _ -> get_max_items_node(Host)
end; end;
false -> false ->
case get_option(Options, send_last_published_item) of case get_option(Options, send_last_published_item) of