25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

XEP-0198: Gracefully handle broken 'previd'

Produce a proper error message instead of crashing when the 'previd'
value of a <resume/> request has an unexpected format.
This commit is contained in:
Holger Weiss 2014-08-15 01:54:41 +02:00
parent 2daf95e93f
commit 848e1497d1

View File

@ -2938,7 +2938,7 @@ inherit_session_state(#state{user = U, server = S} = StateData, ResumeID) ->
end;
{term, {_WrongU, _WrongS, _R, _Time}} ->
{error, <<"Previous JID doesn't match authenticated JID">>};
error ->
_ ->
{error, <<"Invalid 'previd' value">>}
end.