diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2016-01-14 01:39:19 +0100 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2016-01-14 01:39:19 +0100 |
commit | 35ec0d58a47dea0d0ea494706ea456fa8d59d854 (patch) | |
tree | e97578ed1f04af80449b212fb0f402fa9c88fd6a /src/mod_mam.erl | |
parent | mod_mam: Remove unused variable (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.erl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mod_mam.erl b/src/mod_mam.erl index 16b62300..05bb401d 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) |