25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

mod_privacy: Don't try to look up 'undefined' list

Don't crash if the <query/> element of an IQ of type 'set' contains
neither a <default/> nor an <active/> child.

This fixes a regression introduced in commit
8410a203ec.
This commit is contained in:
Holger Weiss 2019-07-24 10:45:30 +02:00
parent 9ef52f2b0f
commit 4218aecd1c

View File

@ -413,6 +413,8 @@ update_c2s_state_with_privacy_list(#iq{type = set,
State) -> State) ->
%% Match a IQ set containing a new active privacy list %% Match a IQ set containing a new active privacy list
case xmpp:get_subtag(IQ, #privacy_query{}) of case xmpp:get_subtag(IQ, #privacy_query{}) of
#privacy_query{active = undefined} ->
State;
#privacy_query{default = undefined, active = Active} -> #privacy_query{default = undefined, active = Active} ->
case Active of case Active of
none -> none ->