mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
fix(s3): make data integrity protections opt-in
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
parent
34c6cb7b2e
commit
f977a7fec6
2 changed files with 10 additions and 0 deletions
|
|
@ -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',
|
||||
],
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -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()) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue