Diff

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
parent 1376:f4de4a35778d
child 1479:9a0a0cfd3710
line wrap: on
line diff
--- a/mod_auth_ldap/mod_auth_ldap.lua	Wed Jul 30 21:58:56 2014 +0200
+++ b/mod_auth_ldap/mod_auth_ldap.lua	Tue Aug 05 15:17:34 2014 +0200
@@ -2,7 +2,7 @@
 
 local new_sasl = require "util.sasl".new;
 local lualdap = require "lualdap";
-local function ldap_filter_escape(s) return (s:gsub("[\\*\\(\\)\\\\%z]", function(c) return ("\\%02x"):format(c:byte()) end)); end
+local function ldap_filter_escape(s) return (s:gsub("[*()\\%z]", function(c) return ("\\%02x"):format(c:byte()) end)); end
 
 -- Config options
 local ldap_server = module:get_option_string("ldap_server", "localhost");