mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +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:
parent
3312eaa51d
commit
b017207ac1
@ -1409,7 +1409,7 @@ push_roster_item(LU, LS, R, U, S, Action) ->
|
|||||||
xmpp:set_from_to(ResIQ, jid:remove_resource(LJID), LJID)).
|
xmpp:set_from_to(ResIQ, jid:remove_resource(LJID), LJID)).
|
||||||
|
|
||||||
build_roster_item(U, S, {add, Nick, Subs, Group}) ->
|
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),
|
#roster_item{jid = jid:make(U, S),
|
||||||
name = Nick,
|
name = Nick,
|
||||||
subscription = misc:binary_to_atom(Subs),
|
subscription = misc:binary_to_atom(Subs),
|
||||||
|
Loading…
Reference in New Issue
Block a user