Bug: The x509 driver removes spaces in certificate DNs (DNs are used as passwd by this driver). Command line will not modify the passwd if plain or ssh method is used.

This commit is contained in:
Ruben S. Montero committed 2011-09-09 18:28:26 +02:00
1 parent 3527bbd1f7
commit f8ee2d6c2d
2 files changed
+5 -3

No files matched your search

+1 -1
View File
@@ -81,7 +81,7 @@ class X509Auth
# Returns the dn of the user certificate
def dn
@cert_chain[0].subject.to_s
@cert_chain[0].subject.to_s.delete("\s")
end
# Generates a login token in the form:
+4 -2
View File
@@ -37,8 +37,10 @@ class OneUserHelper < OpenNebulaHelper::OneHelper
return -1, "Can not read file: #{arg}"
end
else
if options[:plain] || options[:ssh] || options[:x509]
password = arg.gsub(/\s/, '')
if options[:plain] || options[:ssh]
password = arg
elsif options[:x509]
password = arg.delete("\s")
else
password = Digest::SHA1.hexdigest(arg)
end