From 680c6876ccf9d6980a8f0685bef17da6c5fbfc48 Mon Sep 17 00:00:00 2001 From: Florent Date: Thu, 8 Oct 2020 10:56:35 +0200 Subject: [PATCH] Avoid reading ~/.aws/config when using S3 provider 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 --- lib/private/Files/ObjectStore/S3ConnectionTrait.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/private/Files/ObjectStore/S3ConnectionTrait.php b/lib/private/Files/ObjectStore/S3ConnectionTrait.php index 467ae81c8a46d..9d22d52cdd74c 100644 --- a/lib/private/Files/ObjectStore/S3ConnectionTrait.php +++ b/lib/private/Files/ObjectStore/S3ConnectionTrait.php @@ -115,6 +115,7 @@ public function getConnection() { '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']];