Merge pull request #56672 from nextcloud/chore-disable-s3-data-protection

This commit is contained in:
Kate 2025-12-02 22:14:10 +01:00 committed by GitHub
commit 756efb76aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View file

@ -1980,6 +1980,12 @@ $CONFIG = [
// optional: Maximum number of retry attempts for failed S3 requests
// Default: 5
'retriesMaxAttempts' => 5,
// Data Integrity Protections for Amazon S3 (https://docs.aws.amazon.com/sdkref/latest/guide/feature-dataintegrity.html)
// Valid values are "when_required" (default) and "when_supported".
// To ensure compatibility with 3rd party S3 implementations, Nextcloud disables it by default. However, if you are
// using Amazon S3 (or any other implementation that supports it) we recommend enabling it by using "when_supported".
'request_checksum_calculation' => 'when_required',
'response_checksum_validation' => 'when_required',
],
],

View file

@ -137,10 +137,14 @@ trait S3ConnectionTrait {
if (isset($this->params['request_checksum_calculation'])) {
$options['request_checksum_calculation'] = $this->params['request_checksum_calculation'];
} else {
$options['request_checksum_calculation'] = 'when_required';
}
if (isset($this->params['response_checksum_validation'])) {
$options['response_checksum_validation'] = $this->params['response_checksum_validation'];
} else {
$options['response_checksum_validation'] = 'when_required';
}
if ($this->getProxy()) {