mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-21 13:57:56 +03:00
Plain passwords now use 'plain:' prefix instead of 'ssh:'
This commit is contained in:
parent
002f81b050
commit
70290e00e1
@ -77,7 +77,7 @@ class SshAuth
|
||||
time=Time.now.to_i+expire
|
||||
proxy_text="#{user}:#{time}"
|
||||
proxy_crypted=encrypt(proxy_text)
|
||||
proxy="#{user}:ssh:#{proxy_crypted}"
|
||||
proxy="#{user}:plain:#{proxy_crypted}"
|
||||
file=get_proxy_file
|
||||
file.write(proxy)
|
||||
file.close
|
||||
|
@ -88,7 +88,7 @@ module OpenNebula
|
||||
user=$1
|
||||
password=$2
|
||||
|
||||
if password.match(/^ssh:/)
|
||||
if password.match(/^plain:/)
|
||||
@one_auth = "#{user}:#{password.split(':').last}"
|
||||
else
|
||||
@one_auth = "#{user}:#{Digest::SHA1.hexdigest(password)}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user