mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-28 16:34:13 +01:00
Match all possible values in mod_privilege checks, or we get crashes
This commit is contained in:
parent
53870c854e
commit
bb58307190
@ -98,7 +98,7 @@ process_message(#message{from = #jid{luser = <<"">>, lresource = <<"">>} = From,
|
|||||||
case proplists:get_value(message, Access, none) of
|
case proplists:get_value(message, Access, none) of
|
||||||
outgoing ->
|
outgoing ->
|
||||||
forward_message(Msg);
|
forward_message(Msg);
|
||||||
none ->
|
_ ->
|
||||||
Txt = <<"Insufficient privilege">>,
|
Txt = <<"Insufficient privilege">>,
|
||||||
Err = xmpp:err_forbidden(Txt, Lang),
|
Err = xmpp:err_forbidden(Txt, Lang),
|
||||||
ejabberd_router:route_error(Msg, Err)
|
ejabberd_router:route_error(Msg, Err)
|
||||||
@ -172,7 +172,7 @@ process_presence_in({#presence{
|
|||||||
true ->
|
true ->
|
||||||
ok
|
ok
|
||||||
end;
|
end;
|
||||||
none ->
|
_ ->
|
||||||
ok
|
ok
|
||||||
end
|
end
|
||||||
end, dict:to_list(Permissions)),
|
end, dict:to_list(Permissions)),
|
||||||
|
Loading…
Reference in New Issue
Block a user