mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
fix: checking for stale STS account under site replication (#16109)
This commit is contained in:
@@ -1257,9 +1257,8 @@ func (c *SiteReplicationSys) PeerSTSAccHandler(ctx context.Context, stsCred *mad
|
||||
}
|
||||
// skip overwrite of local update if peer sent stale info
|
||||
if !updatedAt.IsZero() {
|
||||
if u, err := globalIAMSys.GetUserInfo(ctx, stsCred.AccessKey); err == nil {
|
||||
ok, _, _ := globalIAMSys.IsTempUser(stsCred.AccessKey)
|
||||
if ok && u.UpdatedAt.After(updatedAt) {
|
||||
if u, _, err := globalIAMSys.getTempAccount(ctx, stsCred.AccessKey); err == nil {
|
||||
if u.UpdatedAt.After(updatedAt) {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user