File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1318,8 +1318,14 @@ struct ReplicationConfiguration {
13181318 // Here we are sure that s->owner.id is of type rgw_user
13191319 const auto & tenant_owner = std::get_if<rgw_user>(&s->owner .id )->tenant ;
13201320
1321+ auto dest_bk_arn = ARN::parse (destination.bucket );
1322+ if (!dest_bk_arn || dest_bk_arn->service != rgw::Service::s3 || dest_bk_arn->resource .empty ()) {
1323+ s->err .message = " Invalid bucket ARN" ;
1324+ return -EINVAL;
1325+ }
1326+
13211327 rgw_bucket_key dest_bk (tenant_owner,
1322- destination. bucket );
1328+ dest_bk_arn-> resource );
13231329
13241330 if (source && !source->zone_names .empty ()) {
13251331 pipe->source .zones = get_zone_ids_from_names (driver, source->zone_names );
@@ -1386,7 +1392,7 @@ struct ReplicationConfiguration {
13861392 }
13871393
13881394 if (pipe.dest .bucket ) {
1389- destination.bucket = pipe.dest .bucket -> get_key ();
1395+ destination.bucket = ARN (* pipe.dest .bucket ). to_string ();
13901396 }
13911397
13921398 filter.emplace ();
You can’t perform that action at this time.
0 commit comments