mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Bug #4761: Fix serverardmin login (one_auth_mad)
This commit is contained in:
parent
01b0e1b3bc
commit
0c3b229a91
@ -28,7 +28,6 @@ end
|
||||
|
||||
$: << RUBY_LIB_LOCATION
|
||||
|
||||
|
||||
require 'scripts_common'
|
||||
require 'OpenNebulaDriver'
|
||||
require 'getoptlong'
|
||||
@ -45,7 +44,6 @@ class AuthDriver < OpenNebulaDriver
|
||||
:authZ => "AUTHORIZE"
|
||||
}
|
||||
|
||||
|
||||
# Initialize an AuthDriver
|
||||
#
|
||||
# @param [String] the authorization method to be used, nil to use the
|
||||
@ -85,13 +83,12 @@ class AuthDriver < OpenNebulaDriver
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Works the same as log_method but changes the password by '****'.
|
||||
# The last word is the password for authentication.
|
||||
def log_method_no_password(num, secret)
|
||||
lambda {|message|
|
||||
lambda {|message, all=true|
|
||||
m=message.gsub(/ #{Regexp.escape(secret)}$/, ' ****')
|
||||
log(num, m)
|
||||
log(num, m, all)
|
||||
}
|
||||
end
|
||||
|
||||
@ -128,7 +125,7 @@ class AuthDriver < OpenNebulaDriver
|
||||
rc = LocalCommand.run(command,
|
||||
log_method_no_password(request_id, Shellwords.escape(secret)))
|
||||
|
||||
result , info = get_info_from_execution(rc)
|
||||
result, info = get_info_from_execution(rc)
|
||||
|
||||
send_message(ACTION[:authN], result, request_id, info)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user