From 2e508eb3396898a3b679e5f652c4cf4894cd085c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Wed, 23 Nov 2011 12:52:42 +0100 Subject: [PATCH] Bug #999: Enclose auth driver scripts paramenters in single quotes. Quotes inside the parameters are escaped --- src/authm_mad/one_auth_mad.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/authm_mad/one_auth_mad.rb b/src/authm_mad/one_auth_mad.rb index 81ea494ecf..46d8136344 100755 --- a/src/authm_mad/one_auth_mad.rb +++ b/src/authm_mad/one_auth_mad.rb @@ -107,9 +107,9 @@ class AuthDriver < OpenNebulaDriver #build path for the auth action #/var/lib/one/remotes/auth//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