]> source.dussan.org Git - nextcloud-server.git/commitdiff
Avoid reading ~/.aws/config when using S3 provider 27097/head
authorFlorent <florent@coppint.com>
Thu, 8 Oct 2020 08:56:35 +0000 (10:56 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Tue, 25 May 2021 08:59:03 +0000 (08:59 +0000)
When using S3 storage, we sometimes have open_basedir errors due to aws-sdk-php trying to read ~/.aws/config which is out of open_basedir restrictions.
Christoph Wurst already added csm=false config in #21406 but it wasn't enough, we also need to set use_arn_region=false, added in this commit.

Signed-off-by: Florent <florent@coppint.com>
lib/private/Files/ObjectStore/S3ConnectionTrait.php

index d88ef0ac8e719eff3767e7a1c4e59b5f07432ab0..9e0b12ec1770e89ec946437347224d5928386409 100644 (file)
@@ -121,6 +121,7 @@ trait S3ConnectionTrait {
                        'use_path_style_endpoint' => isset($this->params['use_path_style']) ? $this->params['use_path_style'] : false,
                        'signature_provider' => \Aws\or_chain([self::class, 'legacySignatureProvider'], ClientResolver::_default_signature_provider()),
                        'csm' => false,
+                       'use_arn_region' => false,
                ];
                if (isset($this->params['proxy'])) {
                        $options['request.options'] = ['proxy' => $this->params['proxy']];