mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
feature #754: Fix bug creating client. Allows multiple ':' in auth string
This commit is contained in:
parent
dfba42fa38
commit
2a0b2818d4
@ -96,11 +96,11 @@ module OpenNebula
|
||||
raise "ONE_AUTH file not present"
|
||||
end
|
||||
|
||||
tokens = one_secret.split(':')
|
||||
tokens = one_secret.chomp!.split(':')
|
||||
|
||||
if tokens.length > 2
|
||||
@one_auth = one_secret
|
||||
elsif secret_tokens == 2
|
||||
elsif tokens.length == 2
|
||||
@one_auth = "#{tokens[0]}:#{Digest::SHA1.hexdigest(tokens[1])}"
|
||||
else
|
||||
raise "Authorization file malformed"
|
||||
|
Loading…
x
Reference in New Issue
Block a user