Software /
code /
prosody
Comparison
plugins/mod_saslauth.lua @ 3391:8ac3f60af3c4
mod_saslauth: Got rid of undocumented and useless 'sasl_realm' config option (was only used for anonymous auth, and that didn't make sense).
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 18 Jul 2010 17:50:38 +0500 |
parent | 3386:526b86cfbb17 |
child | 3416:c505a8cc8922 |
comparison
equal
deleted
inserted
replaced
3390:a88576f675cb | 3391:8ac3f60af3c4 |
---|---|
157 local origin, features = event.origin, event.features; | 157 local origin, features = event.origin, event.features; |
158 if not origin.username then | 158 if not origin.username then |
159 if secure_auth_only and not origin.secure then | 159 if secure_auth_only and not origin.secure then |
160 return; | 160 return; |
161 end | 161 end |
162 local realm = module:get_option("sasl_realm") or origin.host; | |
163 if anonymous_login then | 162 if anonymous_login then |
164 origin.sasl_handler = new_sasl(realm, anonymous_authentication_profile); | 163 origin.sasl_handler = new_sasl(module.host, anonymous_authentication_profile); |
165 else | 164 else |
166 origin.sasl_handler = usermanager_get_sasl_handler(module.host); | 165 origin.sasl_handler = usermanager_get_sasl_handler(module.host); |
167 if not (module:get_option("allow_unencrypted_plain_auth")) and not origin.secure then | 166 if not (module:get_option("allow_unencrypted_plain_auth")) and not origin.secure then |
168 origin.sasl_handler:forbidden({"PLAIN"}); | 167 origin.sasl_handler:forbidden({"PLAIN"}); |
169 end | 168 end |