A couple of small fixes in the recently-added Azure blob storage support (#910)
Some checks are pending
trivy / Check (push) Waiting to run

Notably, renaming the "access-key" configuration field to "azure-access-key", not because
stalwart-mailserver needs the field name to change, but because having a field whose name
is the same between Azure and S3 but whose function is different, causes headaches for
webadmin.
This commit is contained in:
Tamino 2024-11-11 21:40:06 -05:00 committed by GitHub
parent 572275eecc
commit 3b950cecec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,7 +32,7 @@ impl AzureStore {
let container = config.value_require((&prefix, "container"))?.to_string();
let credentials = match (
config.value((&prefix, "access-key")),
config.value((&prefix, "azure-access-key")),
config.value((&prefix, "sas-token")),
) {
(Some(access_key), None) => {
@ -53,7 +53,7 @@ impl AzureStore {
prefix.as_str(),
concat!(
"Failed to create credentials: exactly one of ",
"'access-key' and 'sas-token' must be specified"
"'azure-access-key' and 'sas-token' must be specified"
),
);
return None;
@ -126,6 +126,7 @@ impl AzureStore {
}
Err(e) => {
err = Some(e);
break;
}
}
}