mirror of
https://github.com/rustfs/rustfs.git
synced 2026-11-30 12:53:08 +00:00
fix(iceberg): reject repeated warehouses before validating bucket names
This commit is contained in:
@@ -2262,10 +2262,12 @@ fn warehouse_from_config_query(uri: &http::Uri) -> S3Result<Option<String>> {
|
||||
if value.is_empty() {
|
||||
return Err(s3_error!(InvalidRequest, "warehouse query parameter must not be empty"));
|
||||
}
|
||||
crate::admin::storage_api::bucket::utils::check_valid_bucket_name_strict(&value)
|
||||
.map_err(|_| s3_error!(InvalidArgument, "invalid warehouse bucket name"))?;
|
||||
warehouse = Some(value.into_owned());
|
||||
}
|
||||
if let Some(name) = warehouse.as_deref() {
|
||||
crate::admin::storage_api::bucket::utils::check_valid_bucket_name_strict(name)
|
||||
.map_err(|_| s3_error!(InvalidArgument, "invalid warehouse bucket name"))?;
|
||||
}
|
||||
Ok(warehouse)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user