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.
This commit is contained in:
Holger Weiss 2022-09-09 18:27:49 +02:00
parent 3312eaa51d
commit b017207ac1
1 changed files with 1 additions and 1 deletions

View File

@ -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),