From 3b3ec9d14d205c2a7be0cf1afe0884efd2a85977 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Fri, 11 May 2012 13:13:23 +0200 Subject: [PATCH] bug #1236: ldap user dn --- src/authm_mad/remotes/ldap/authenticate | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/authm_mad/remotes/ldap/authenticate b/src/authm_mad/remotes/ldap/authenticate index 4ca1a6f5e8..29846f916b 100755 --- a/src/authm_mad/remotes/ldap/authenticate +++ b/src/authm_mad/remotes/ldap/authenticate @@ -29,6 +29,7 @@ end $: << RUBY_LIB_LOCATION require 'yaml' +require 'uri' require 'ldap_auth' user=ARGV[0] @@ -76,7 +77,8 @@ begin end if ldap.authenticate(user_name, secret) - puts "ldap #{user} #{user_name}" + escaped_user=URI.escape(user_name, " \t\n\v\f\r") + puts "ldap #{user} #{escaped_user}" authenticated=true break else