mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
fix: a crash in RemoveReplication target (#19640)
calling a remote target remove with a perfectly well constructed ARN can lead to a crash for a bucket with no replication configured. This PR fixes, and adds a crash check for ImportMetadata as well.
This commit is contained in:
@@ -998,7 +998,7 @@ func replicateObject(ctx context.Context, ri ReplicateObjectInfo, objectAPI Obje
|
||||
object := ri.Name
|
||||
|
||||
cfg, err := getReplicationConfig(ctx, bucket)
|
||||
if err != nil {
|
||||
if err != nil || cfg == nil {
|
||||
replLogOnceIf(ctx, err, "get-replication-config-"+bucket)
|
||||
sendEvent(eventArgs{
|
||||
EventName: event.ObjectReplicationNotTracked,
|
||||
|
||||
Reference in New Issue
Block a user