mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
feature #795: Add hash_passwords option
This commit is contained in:
1 parent
1ae44ee2bc
commit
9e3c3cb898
1 file changed
+4
@@ -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}"
|
||||
|
||||
Reference in new issue
Block a user