Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2016-01-14 03:39:19 +0300
committerHolger Weiss <holger@zedat.fu-berlin.de>2016-01-14 03:39:19 +0300
commit35ec0d58a47dea0d0ea494706ea456fa8d59d854 (patch)
treee97578ed1f04af80449b212fb0f402fa9c88fd6a /src/mod_mam.erl
parent11afa45646779a67b660e4b554e5cb04f453a44d (diff)
mod_mam: Reject <index/>-based paging
If an <index/> is specified in the MAM request, reject the request rather than ignoring the desired index and returning wrong results. XEP-0059 says that the server "MAY return a <feature-not-implemented/> error."
Diffstat (limited to 'src/mod_mam.erl')
-rw-r--r--src/mod_mam.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mod_mam.erl b/src/mod_mam.erl
index 16b623003..05bb401de 100644
--- a/src/mod_mam.erl
+++ b/src/mod_mam.erl
@@ -466,6 +466,8 @@ process_iq(LServer, #jid{luser = LUser} = From, To, IQ, SubEl, Fs, MsgType) ->
end, {none, [], none, none}, Fs) of
{'EXIT', _} ->
IQ#iq{type = error, sub_el = [SubEl, ?ERR_BAD_REQUEST]};
+ {_Start, _End, _With, #rsm_in{index = Index}} when is_integer(Index) ->
+ IQ#iq{type = error, sub_el = [SubEl, ?ERR_FEATURE_NOT_IMPLEMENTED]};
{Start, End, With, RSM} ->
select_and_send(LServer, From, To, Start, End,
With, RSM, IQ, MsgType)