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

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

No files matched your search

+1 -4
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))
+3 -3
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'))