aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2011-01-17 16:50:21 +0100
committerTobias Markmann <tm@ayena.de>2011-01-17 16:50:21 +0100
commit3dc5c26703b55ae5a24ba7757e18282e351425fd (patch)
treee4ed57edaf0224cff179aa454094d5daef4e2379 /plugins
parent0435f611fd9e7794b8f42699c35ceee01dd28d1f (diff)
downloadprosody-3dc5c26703b55ae5a24ba7757e18282e351425fd.tar.gz
prosody-3dc5c26703b55ae5a24ba7757e18282e351425fd.zip
mod_saslauth: Set secure socket as SASL object user data for secure sessions.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_saslauth.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index 1c0d0673..2b3b59a9 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -246,6 +246,10 @@ module:hook("stream-features", function(event)
return;
end
origin.sasl_handler = usermanager_get_sasl_handler(module.host);
+
+ if origin.secure then
+ origin.sasl_handler["userdata"] = origin.conn:socket();
+ end
features:tag("mechanisms", mechanisms_attr);
for mechanism in pairs(origin.sasl_handler:mechanisms()) do
if mechanism ~= "PLAIN" or origin.secure or allow_unencrypted_plain_auth then