]> granicus.if.org Git - ejabberd/commitdiff
Match all possible values in mod_privilege checks, or we get crashes
authorPaweł Chmielowski <pchmielowski@process-one.net>
Tue, 30 Jan 2018 12:10:22 +0000 (13:10 +0100)
committerPaweł Chmielowski <pchmielowski@process-one.net>
Tue, 30 Jan 2018 12:10:22 +0000 (13:10 +0100)
src/mod_privilege.erl

index 1531375407e723f6b243d383af8daa44606d0867..8f2f446ee6f2520f7406d3699866867211186fd3 100644 (file)
@@ -98,7 +98,7 @@ process_message(#message{from = #jid{luser = <<"">>, lresource = <<"">>} = From,
            case proplists:get_value(message, Access, none) of
                outgoing ->
                    forward_message(Msg);
-               none ->
+               _ ->
                    Txt = <<"Insufficient privilege">>,
                    Err = xmpp:err_forbidden(Txt, Lang),
                    ejabberd_router:route_error(Msg, Err)
@@ -172,7 +172,7 @@ process_presence_in({#presence{
                         true ->
                              ok
                      end;
-                none ->
+                _ ->
                      ok
              end
       end, dict:to_list(Permissions)),