From 35ec0d58a47dea0d0ea494706ea456fa8d59d854 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Thu, 14 Jan 2016 01:39:19 +0100 Subject: mod_mam: Reject -based paging If an 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 error." --- src/mod_mam.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mod_mam.erl') 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) -- cgit v1.2.3