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

Bug #999: Enclose auth driver scripts paramenters in single quotes. Quotes inside the parameters are escaped

This commit is contained in:
Carlos Martín 2011-11-23 12:52:42 +01:00
parent 9f279a004a
commit 2e508eb339

View File

@ -107,9 +107,9 @@ class AuthDriver < OpenNebulaDriver
#build path for the auth action
#/var/lib/one/remotes/auth/<driver>/authenticate
authN_path = File.join(@local_scripts_path, driver)
command = File.join(authN_path,ACTION[:authN].downcase)
command << ' ' << user << ' ' << password << ' ' << secret
command = File.join(authN_path,ACTION[:authN].downcase)
command << " '" << user.gsub("'", '\'"\'"\'') << "' '" << password.gsub("'", '\'"\'"\'') << "' " << secret
local_action(command, request_id, ACTION[:authN])
end