mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +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:
parent
2daf95e93f
commit
848e1497d1
@ -2938,7 +2938,7 @@ inherit_session_state(#state{user = U, server = S} = StateData, ResumeID) ->
|
|||||||
end;
|
end;
|
||||||
{term, {_WrongU, _WrongS, _R, _Time}} ->
|
{term, {_WrongU, _WrongS, _R, _Time}} ->
|
||||||
{error, <<"Previous JID doesn't match authenticated JID">>};
|
{error, <<"Previous JID doesn't match authenticated JID">>};
|
||||||
error ->
|
_ ->
|
||||||
{error, <<"Invalid 'previd' value">>}
|
{error, <<"Invalid 'previd' value">>}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user