1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

features #1236 and #1252: move unescape to ldap auth

This commit is contained in:
Javi Fontan 2012-05-16 18:16:26 +02:00
parent 9a34feec87
commit be639816c6
2 changed files with 4 additions and 7 deletions

View File

@ -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))

View File

@ -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'))