Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2022-09-09 19:27:49 +0300
committerHolger Weiss <holger@zedat.fu-berlin.de>2022-09-09 19:27:49 +0300
commitb017207ac1ec9365ded321dd213e6eb7aca49634 (patch)
tree3e5f67dab82ed74622faa8d0a162458b870937e4
parent3312eaa51dcd48797a068eb3f1786bd133b93d61 (diff)
mod_admin_extra: Handle empty roster group names
Don't let 'add_rosteritem' create a roster group with an empty name. Thanks to Licaon_Kter for reporting the issue.
-rw-r--r--src/mod_admin_extra.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mod_admin_extra.erl b/src/mod_admin_extra.erl
index b0dffd2d6..12e775cfb 100644
--- a/src/mod_admin_extra.erl
+++ b/src/mod_admin_extra.erl
@@ -1409,7 +1409,7 @@ push_roster_item(LU, LS, R, U, S, Action) ->
xmpp:set_from_to(ResIQ, jid:remove_resource(LJID), LJID)).
build_roster_item(U, S, {add, Nick, Subs, Group}) ->
- Groups = binary:split(Group,<<";">>, [global]),
+ Groups = binary:split(Group,<<";">>, [global, trim]),
#roster_item{jid = jid:make(U, S),
name = Nick,
subscription = misc:binary_to_atom(Subs),