Skip to content

Commit

Permalink
s3: do not allow 0s refresh interval after applying defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
ahouene committed Sep 12, 2023
1 parent d289bc8 commit a040cf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backends/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (o Options) Check() error {
if !hasSecretsCreds && !hasStaticCreds {
return fmt.Errorf("s3 storage.options: credentials are required, fill either (access_key and secret_key) or (access_key_filename and secret_key_filename)")
}
if d := o.SecretsRefreshInterval; hasSecretsCreds && d != 0 && d < time.Second {
if hasSecretsCreds && o.SecretsRefreshInterval < time.Second {
return fmt.Errorf("s3 storage.options: field refresh_secrets is required when using secret credentials")
}
if o.Bucket == "" {
Expand Down

0 comments on commit a040cf7

Please sign in to comment.