aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2022-09-09 18:27:49 +0200
committerHolger Weiss <holger@zedat.fu-berlin.de>2022-09-09 18:27:49 +0200
commitb017207ac1ec9365ded321dd213e6eb7aca49634 (patch)
tree3e5f67dab82ed74622faa8d0a162458b870937e4
parentAdd more examples of podman usage (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),