Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2022-08-01 16:10:36 +0300
committerGitHub <noreply@github.com>2022-08-01 16:10:36 +0300
commit66d4f6744e0ac07daae0aeba36e2edeade4d4dc4 (patch)
tree8d6f054fb10159d6a905727644051b84e72243ce
parente70ffdf55658556cee09ba94e6b2364240032b97 (diff)
parent7be469185549186c2c177ed3b0b4636169986b2b (diff)
Merge pull request #33391 from nextcloud/backport/33280/stable24
[stable24] handle AccessDenied error when checking if external s3 support versions
-rw-r--r--apps/files_external/lib/Lib/Storage/AmazonS3.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php
index cfd78689fa4..62bff08895b 100644
--- a/apps/files_external/lib/Lib/Storage/AmazonS3.php
+++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php
@@ -747,7 +747,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
return $result->get('Status') === 'Enabled';
} catch (S3Exception $s3Exception) {
// This is needed for compatibility with Storj gateway which does not support versioning yet
- if ($s3Exception->getAwsErrorCode() === 'NotImplemented') {
+ if ($s3Exception->getAwsErrorCode() === 'NotImplemented' || $s3Exception->getAwsErrorCode() === 'AccessDenied') {
return false;
}
throw $s3Exception;