mirror of
https://github.com/minio/minio.git
synced 2025-02-03 01:46:00 -05:00
auth/rpc: Token can be concurrently edited protect it. (#3764)
Make sure we protect when we access `authToken` in authClient. Fixes #3761
This commit is contained in:
parent
34d9a6b46a
commit
0137ff498a
@ -115,8 +115,10 @@ func (authClient *AuthRPCClient) call(serviceMethod string, args interface {
|
||||
}, reply interface{}) (err error) {
|
||||
// On successful login, execute RPC call.
|
||||
if err = authClient.Login(); err == nil {
|
||||
authClient.Lock()
|
||||
// Set token and timestamp before the rpc call.
|
||||
args.SetAuthToken(authClient.authToken)
|
||||
authClient.Unlock()
|
||||
args.SetRequestTime(time.Now().UTC())
|
||||
|
||||
// Do RPC call.
|
||||
|
Loading…
x
Reference in New Issue
Block a user