aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_auth_anonymous.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2012-07-07 03:42:31 +0200
committerKim Alvefur <zash@zash.se>2012-07-07 03:42:31 +0200
commitd7bbafcd372997dbec05e0dec67c1da41968050f (patch)
treeb7a638e033c6d4786ff84917770d69aa30c4dbbf /plugins/mod_auth_anonymous.lua
parente7bc372d777d323eaea50a88469b6a421d8d81be (diff)
downloadprosody-d7bbafcd372997dbec05e0dec67c1da41968050f.tar.gz
prosody-d7bbafcd372997dbec05e0dec67c1da41968050f.zip
mod_auth_anonymous: Attach a fake roster to the session, so the null storage backend can be used
Diffstat (limited to 'plugins/mod_auth_anonymous.lua')
-rw-r--r--plugins/mod_auth_anonymous.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_auth_anonymous.lua b/plugins/mod_auth_anonymous.lua
index c080177d..3cb7cf98 100644
--- a/plugins/mod_auth_anonymous.lua
+++ b/plugins/mod_auth_anonymous.lua
@@ -32,9 +32,10 @@ function new_default_provider(host)
return nil, "Account creation/modification not supported.";
end
- function provider.get_sasl_handler()
+ function provider.get_sasl_handler(session)
local anonymous_authentication_profile = {
anonymous = function(sasl, username, realm)
+ session.roster = {}; -- so that the null storage backend doesn't upset rostermanager
return true; -- for normal usage you should always return true here
end
};