Comparison

mod_auth_ldap/mod_auth_ldap.lua @ 2774:41565a743cad

mod_auth_ldap: Split long line into many [luacheck]
author Kim Alvefur <zash@zash.se>
date Tue, 26 Sep 2017 12:35:08 +0200
parent 2056:e16593e7d482
child 2775:8407137c0a3b
comparison
equal deleted inserted replaced
2773:7a4e8dbbd30d 2774:41565a743cad
1 -- mod_auth_ldap 1 -- mod_auth_ldap
2 2
3 local jid_split = require "util.jid".split; 3 local jid_split = require "util.jid".split;
4 local new_sasl = require "util.sasl".new; 4 local new_sasl = require "util.sasl".new;
5 local lualdap = require "lualdap"; 5 local lualdap = require "lualdap";
6 local function ldap_filter_escape(s) return (s:gsub("[*()\\%z]", function(c) return ("\\%02x"):format(c:byte()) end)); end 6
7 local function ldap_filter_escape(s)
8 return (s:gsub("[*()\\%z]", function(c) return ("\\%02x"):format(c:byte()) end));
9 end
7 10
8 -- Config options 11 -- Config options
9 local ldap_server = module:get_option_string("ldap_server", "localhost"); 12 local ldap_server = module:get_option_string("ldap_server", "localhost");
10 local ldap_rootdn = module:get_option_string("ldap_rootdn", ""); 13 local ldap_rootdn = module:get_option_string("ldap_rootdn", "");
11 local ldap_password = module:get_option_string("ldap_password", ""); 14 local ldap_password = module:get_option_string("ldap_password", "");