Comparison

plugins/mod_saslauth.lua @ 6491:f71643256d50

mod_saslauth: Add LOGIN to mechanisms not allowed over unencrypted connections as it may be offered by 3rd party authentication plugins
author Kim Alvefur <zash@zash.se>
date Tue, 21 Oct 2014 14:37:05 +0200
parent 6490:8ad74f48b2aa
child 6492:0d07fdc07d8c
comparison
equal deleted inserted replaced
6490:8ad74f48b2aa 6491:f71643256d50
16 local usermanager_get_sasl_handler = require "core.usermanager".get_sasl_handler; 16 local usermanager_get_sasl_handler = require "core.usermanager".get_sasl_handler;
17 local tostring = tostring; 17 local tostring = tostring;
18 18
19 local secure_auth_only = module:get_option_boolean("c2s_require_encryption", module:get_option_boolean("require_encryption", false)); 19 local secure_auth_only = module:get_option_boolean("c2s_require_encryption", module:get_option_boolean("require_encryption", false));
20 local allow_unencrypted_plain_auth = module:get_option_boolean("allow_unencrypted_plain_auth", false) 20 local allow_unencrypted_plain_auth = module:get_option_boolean("allow_unencrypted_plain_auth", false)
21 local insecure_mechanisms = module:get_option_set("allow_unencrypted_sasl", allow_unencrypted_plain_auth and {} or {"PLAIN"}); 21 local insecure_mechanisms = module:get_option_set("allow_unencrypted_sasl", allow_unencrypted_plain_auth and {} or {"PLAIN", "LOGIN"});
22 22
23 local log = module._log; 23 local log = module._log;
24 24
25 local xmlns_sasl ='urn:ietf:params:xml:ns:xmpp-sasl'; 25 local xmlns_sasl ='urn:ietf:params:xml:ns:xmpp-sasl';
26 local xmlns_bind ='urn:ietf:params:xml:ns:xmpp-bind'; 26 local xmlns_bind ='urn:ietf:params:xml:ns:xmpp-bind';