Mercurial > prosody-modules
comparison mod_auth_ldap/mod_auth_ldap.lua @ 1478:099583539e2c
mod_auth_ldap: Remove excess backslashes from escape pattern
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 05 Aug 2014 15:17:34 +0200 |
parents | f4de4a35778d |
children | 9a0a0cfd3710 |
comparison
equal
deleted
inserted
replaced
1477:db870913e1cf | 1478:099583539e2c |
---|---|
1 -- mod_auth_ldap | 1 -- mod_auth_ldap |
2 | 2 |
3 local new_sasl = require "util.sasl".new; | 3 local new_sasl = require "util.sasl".new; |
4 local lualdap = require "lualdap"; | 4 local lualdap = require "lualdap"; |
5 local function ldap_filter_escape(s) return (s:gsub("[\\*\\(\\)\\\\%z]", function(c) return ("\\%02x"):format(c:byte()) end)); end | 5 local function ldap_filter_escape(s) return (s:gsub("[*()\\%z]", function(c) return ("\\%02x"):format(c:byte()) end)); end |
6 | 6 |
7 -- Config options | 7 -- Config options |
8 local ldap_server = module:get_option_string("ldap_server", "localhost"); | 8 local ldap_server = module:get_option_string("ldap_server", "localhost"); |
9 local ldap_rootdn = module:get_option_string("ldap_rootdn", ""); | 9 local ldap_rootdn = module:get_option_string("ldap_rootdn", ""); |
10 local ldap_password = module:get_option_string("ldap_password", ""); | 10 local ldap_password = module:get_option_string("ldap_password", ""); |