mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 09:49:18 +02:00
Don't crash in mod_shared_roster_ldap:get_member_jid on empty output
This based on crash from issue #3614
This commit is contained in:
parent
dd2efc360b
commit
1818a29c29
1 changed files with 3 additions and 3 deletions
|
@ -395,14 +395,14 @@ get_member_jid(#state{user_jid_attr = UserJIDAttr, user_uid = UIDAttr} = State,
|
||||||
[{<<"%u">>, UID}])],
|
[{<<"%u">>, UID}])],
|
||||||
[UserJIDAttr]),
|
[UserJIDAttr]),
|
||||||
case Entries of
|
case Entries of
|
||||||
[] ->
|
|
||||||
{error, error};
|
|
||||||
[#eldap_entry{attributes = [{UserJIDAttr, [MemberJID | _]}]} | _] ->
|
[#eldap_entry{attributes = [{UserJIDAttr, [MemberJID | _]}]} | _] ->
|
||||||
try jid:decode(MemberJID) of
|
try jid:decode(MemberJID) of
|
||||||
#jid{luser = U, lserver = S} -> {U, S}
|
#jid{luser = U, lserver = S} -> {U, S}
|
||||||
catch
|
catch
|
||||||
error:{bad_jid, _} -> {error, Host}
|
error:{bad_jid, _} -> {error, Host}
|
||||||
end
|
end;
|
||||||
|
_ ->
|
||||||
|
{error, error}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
extract_members(State, Extractor, AuthChecker, #eldap_entry{attributes = Attrs}, {DescAcc, JIDsAcc}) ->
|
extract_members(State, Extractor, AuthChecker, #eldap_entry{attributes = Attrs}, {DescAcc, JIDsAcc}) ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue