aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2021-01-31 23:33:53 +0100
committerBadlop <badlop@process-one.net>2021-02-01 00:10:33 +0100
commitbb397bb424f6219d5f3f60da7aefc21e1ebaa8e5 (patch)
tree76f1043396fd1c3f0729d175d1469e16ba6ad0f3
parentFix bug in send_message introduced in 7fc500dae (#3485) (diff)
Fix bug handling jid:decode/1 return, introduced in cdb286d1d (#3461)
-rw-r--r--src/mod_shared_roster_ldap.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mod_shared_roster_ldap.erl b/src/mod_shared_roster_ldap.erl
index 97bc710c9..93c08e0c3 100644
--- a/src/mod_shared_roster_ldap.erl
+++ b/src/mod_shared_roster_ldap.erl
@@ -409,9 +409,10 @@ get_member_jid(#state{user_jid_attr = UserJIDAttr, user_uid = UIDAttr} = State,
[] ->
{error, error};
[#eldap_entry{attributes = [{UserJIDAttr, [MemberJID | _]}]} | _] ->
- case jid:decode(MemberJID) of
- error -> {error, Host};
+ try jid:decode(MemberJID) of
#jid{luser = U, lserver = S} -> {U, S}
+ catch
+ error:{bad_jid, _} -> {error, Host}
end
end.