mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Validate replication target update to avoid duplicate endpoints (#16311)
This commit is contained in:
@@ -256,6 +256,10 @@ func (sys *BucketTargetSys) SetTarget(ctx context.Context, bucket string, tgt *m
|
||||
found = true
|
||||
continue
|
||||
}
|
||||
// fail if endpoint is already present in list of targets and not a matching ARN
|
||||
if t.Endpoint == tgt.Endpoint {
|
||||
return BucketRemoteAlreadyExists{Bucket: t.TargetBucket}
|
||||
}
|
||||
}
|
||||
newtgts[idx] = t
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user