1
0
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:
Javi Fontan 2010-09-02 14:48:47 +02:00
parent 002f81b050
commit 70290e00e1
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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)}"