25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-24 17:29:28 +01:00

Don't crash on empty avatar data

This commit is contained in:
Evgeny Khramtsov 2019-06-24 17:00:51 +03:00
parent c2cbb4d879
commit d0b65a3c95

View File

@ -219,6 +219,11 @@ get_avatar_data(JID, ItemID) ->
xmpp:format_error(Why)]),
{error, invalid_data}
end;
#pubsub_item{payload = []} ->
?WARNING_MSG("Empty avatar data detected "
"for ~s@~s with item id ~s",
[LUser, LServer, ItemID]),
{error, invalid_data};
{error, #stanza_error{reason = 'item-not-found'}} ->
{error, notfound};
{error, Reason} ->