Skip to content

Commit

Permalink
fix for infinite route loop which is triggered by muc_light
Browse files Browse the repository at this point in the history
the loop is triggered when someone sends special affiliation change stanza.
When someone tries to invite a user to a room and the user is wrongly named in
the invitation stanza (muclight.localhost domain instead of localhost), the
infinite loop of ejabberd_router:route/3 fun will be called.
  • Loading branch information
ludwikbukowski committed Jan 11, 2017
1 parent 4ff66f5 commit 3fc33e0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/ejabberd/src/mod_muc_light.erl
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ process_packet(From, #jid{ luser = RoomU } = To, {ok, RequestToRoom}, OrigPacket
process_packet(From, To, {error, _} = Err, OrigPacket) ->
mod_muc_light_codec_backend:encode_error(
Err, From, To, OrigPacket, fun ejabberd_router:route/3);
process_packet(_From, _To, ignore, _OrigPacket) ->
ok;
process_packet(From, To, _InvalidReq, OrigPacket) ->
mod_muc_light_codec_backend:encode_error(
{error, bad_request}, From, To, OrigPacket, fun ejabberd_router:route/3).
Expand Down

0 comments on commit 3fc33e0

Please sign in to comment.