Skip to content

Commit 756efb7

Browse files
Merge pull request #56672 from nextcloud/chore-disable-s3-data-protection
2 parents cbe18a8 + f977a7f commit 756efb7

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

config/config.sample.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,6 +1980,12 @@
19801980
// optional: Maximum number of retry attempts for failed S3 requests
19811981
// Default: 5
19821982
'retriesMaxAttempts' => 5,
1983+
// Data Integrity Protections for Amazon S3 (https://docs.aws.amazon.com/sdkref/latest/guide/feature-dataintegrity.html)
1984+
// Valid values are "when_required" (default) and "when_supported".
1985+
// To ensure compatibility with 3rd party S3 implementations, Nextcloud disables it by default. However, if you are
1986+
// using Amazon S3 (or any other implementation that supports it) we recommend enabling it by using "when_supported".
1987+
'request_checksum_calculation' => 'when_required',
1988+
'response_checksum_validation' => 'when_required',
19831989
],
19841990
],
19851991

lib/private/Files/ObjectStore/S3ConnectionTrait.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,14 @@ public function getConnection() {
137137

138138
if (isset($this->params['request_checksum_calculation'])) {
139139
$options['request_checksum_calculation'] = $this->params['request_checksum_calculation'];
140+
} else {
141+
$options['request_checksum_calculation'] = 'when_required';
140142
}
141143

142144
if (isset($this->params['response_checksum_validation'])) {
143145
$options['response_checksum_validation'] = $this->params['response_checksum_validation'];
146+
} else {
147+
$options['response_checksum_validation'] = 'when_required';
144148
}
145149

146150
if ($this->getProxy()) {

0 commit comments

Comments
 (0)