mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
feature #795: Add hash_passwords option
This commit is contained in:
parent
1ae44ee2bc
commit
9e3c3cb898
@ -5,6 +5,10 @@ module BasicCloudAuth
|
||||
if auth.provided? && auth.basic?
|
||||
username, password = auth.credentials
|
||||
|
||||
if @conf[:hash_passwords]
|
||||
password = Digest::SHA1.hexdigest(password)
|
||||
end
|
||||
|
||||
one_pass = get_password(username)
|
||||
if one_pass && one_pass == password
|
||||
@token = "#{username}:#{password}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user