25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

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

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