mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
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:
1 parent
3527bbd1f7
commit
f8ee2d6c2d
2 files changed
+5
-3
No files matched your search
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user