mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
prevent pubsub filtering too much packets
This commit is contained in:
parent
75053cf40d
commit
a67539075f
@ -3995,6 +3995,8 @@ feature_check_packet(allow, _User, Server, Pres, {From, _To, El}, in) ->
|
||||
feature_check_packet(Acc, _User, _Server, _Pres, _Packet, _Direction) ->
|
||||
Acc.
|
||||
|
||||
is_feature_supported(_, []) ->
|
||||
true;
|
||||
is_feature_supported(#xmlel{name = 'presence', children = Els}, Feature) ->
|
||||
case mod_caps:read_caps(Els) of
|
||||
nothing -> false;
|
||||
|
@ -3759,8 +3759,8 @@ odbc_conn(Host) ->
|
||||
lists:dropwhile(fun(A) -> A/=$. end, Host) -- ".".
|
||||
|
||||
%% escape value for database storage
|
||||
escape({U, H, R})->
|
||||
ejabberd_odbc:escape(exmpp_jid:to_list(U, H, R));
|
||||
escape({_U, _H, _R}=JID)->
|
||||
ejabberd_odbc:escape(exmpp_jid:to_list(JID));
|
||||
escape(Value)->
|
||||
ejabberd_odbc:escape(Value).
|
||||
%%%% helpers
|
||||
@ -3867,6 +3867,8 @@ feature_check_packet(allow, _User, Server, Pres, {From, _To, El}, in) ->
|
||||
feature_check_packet(Acc, _User, _Server, _Pres, _Packet, _Direction) ->
|
||||
Acc.
|
||||
|
||||
is_feature_supported(_, []) ->
|
||||
true;
|
||||
is_feature_supported(#xmlel{name = 'presence', children = Els}, Feature) ->
|
||||
case mod_caps:read_caps(Els) of
|
||||
nothing -> false;
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- mod_pubsub.erl 2010-06-02 16:46:29.000000000 +0200
|
||||
+++ mod_pubsub_odbc.erl 2010-06-02 16:46:33.000000000 +0200
|
||||
--- mod_pubsub.erl 2010-06-10 14:25:01.000000000 +0200
|
||||
+++ mod_pubsub_odbc.erl 2010-06-10 14:25:09.000000000 +0200
|
||||
@@ -42,7 +42,7 @@
|
||||
%%% 6.2.3.1, 6.2.3.5, and 6.3. For information on subscription leases see
|
||||
%%% XEP-0060 section 12.18.
|
||||
|
Loading…
Reference in New Issue
Block a user