1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-26 06:50:09 +03:00

delete any spaces that come in password parameter

This commit is contained in:
Javi Fontan 2010-07-26 23:12:38 +02:00
parent 8244182b48
commit cfc965e04d

View File

@ -143,7 +143,7 @@ when "create"
user=OpenNebula::User.new(
OpenNebula::User.build_xml, get_one_client)
if ops[:no_hash]
password = ARGV[1]
password = ARGV[1].gsub(/\s/, '')
else
password = Digest::SHA1.hexdigest(ARGV[1])
end
@ -203,7 +203,7 @@ when "passwd"
user=OpenNebula::User.new_with_id(user_id, get_one_client)
if ops[:no_hash]
password = ARGV[1]
password = ARGV[1].gsub(/\s/, '')
else
password = Digest::SHA1.hexdigest(ARGV[1])
end