aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2018-08-17 17:56:23 +0300
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2018-08-17 17:56:23 +0300
commitf0f3ec211e362d1df3312d6fdba897f3df01cec0 (patch)
tree6ef9036d9d948495d511dca621a1454a2a16b6b8
parentUpdate xmpp (diff)
Disable cache for anonymous auth backend
Fixes #2566
-rw-r--r--src/ejabberd_auth_anonymous.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ejabberd_auth_anonymous.erl b/src/ejabberd_auth_anonymous.erl
index 9d4b3aff5..e3be79a43 100644
--- a/src/ejabberd_auth_anonymous.erl
+++ b/src/ejabberd_auth_anonymous.erl
@@ -31,6 +31,7 @@
-export([start/1,
stop/1,
+ use_cache/1,
allow_anonymous/1,
is_sasl_anonymous_enabled/1,
is_login_anonymous_enabled/1,
@@ -60,6 +61,9 @@ stop(Host) ->
ejabberd_hooks:delete(sm_remove_connection_hook, Host,
?MODULE, unregister_connection, 100).
+use_cache(_) ->
+ false.
+
%% Return true if anonymous is allowed for host or false otherwise
allow_anonymous(Host) ->
lists:member(?MODULE, ejabberd_auth:auth_modules(Host)).