Changeset

4944:72a2eec4204a

mod_auth_anonymous: Attach a fake roster to the session, so the null storage backend can be used
author Kim Alvefur <zash@zash.se>
date Sat, 07 Jul 2012 03:42:31 +0200
parents 4943:50f63f07245f
children 4945:06635b834e76 4946:2975c7008ccd 4947:6d9317ea79b2 4972:1777271a1ec0
files plugins/mod_auth_anonymous.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_auth_anonymous.lua	Sat Jul 07 02:32:39 2012 +0100
+++ b/plugins/mod_auth_anonymous.lua	Sat Jul 07 03:42:31 2012 +0200
@@ -32,9 +32,10 @@
 		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
 		};