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 <florent@coppint.com>
This commit is contained in:
Florent 2020-10-08 10:56:35 +02:00 committed by Morris Jobke
parent 7ffee26aa8
commit d4444f2472
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with 1 additions and 0 deletions

View File

@ -121,6 +121,7 @@ trait S3ConnectionTrait {
'use_path_style_endpoint' => isset($this->params['use_path_style']) ? $this->params['use_path_style'] : false, '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()), 'signature_provider' => \Aws\or_chain([self::class, 'legacySignatureProvider'], ClientResolver::_default_signature_provider()),
'csm' => false, 'csm' => false,
'use_arn_region' => false,
]; ];
if (isset($this->params['proxy'])) { if (isset($this->params['proxy'])) {
$options['request.options'] = ['proxy' => $this->params['proxy']]; $options['request.options'] = ['proxy' => $this->params['proxy']];