diff --git a/src/authm_mad/one_auth_mad.rb b/src/authm_mad/one_auth_mad.rb index 91bb065d43..13bcc8f9fc 100755 --- a/src/authm_mad/one_auth_mad.rb +++ b/src/authm_mad/one_auth_mad.rb @@ -33,9 +33,6 @@ require 'scripts_common' require 'OpenNebulaDriver' require 'getoptlong' require 'shellwords' -require 'uri' - -URI_PARSER=URI::Parser.new # This is a generic AuthZ/AuthN driver able to manage multiple authentication # protocols (simultaneosly). It also supports the definition of custom @@ -115,7 +112,7 @@ class AuthDriver < OpenNebulaDriver command = File.join(authN_path, ACTION[:authN].downcase) command << ' ' << ([user, password, secret].map do |p| - Shellwords.escape(URI_PARSER.unescape(p)) + Shellwords.escape(p) end.join(' ')) rc = LocalCommand.run(command, log_method(request_id)) diff --git a/src/authm_mad/remotes/ldap/authenticate b/src/authm_mad/remotes/ldap/authenticate index 61ea39980b..2fe8d57978 100755 --- a/src/authm_mad/remotes/ldap/authenticate +++ b/src/authm_mad/remotes/ldap/authenticate @@ -34,9 +34,9 @@ require 'uri' URI_PARSER=URI::Parser.new -user=ARGV[0] -pass=ARGV[1] -secret=ARGV[2] +user=URI_PARSER.unescape(ARGV[0]) +pass=URI_PARSER.unescape(ARGV[1]) +secret=URI_PARSER.unescape(ARGV[2]) options=YAML.load(File.read(ETC_LOCATION+'/auth/ldap_auth.conf'))