summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-07-28 12:13:43 +0200
committerGitHub <noreply@github.com>2022-07-28 12:13:43 +0200
commita1bf9b97576d3da5df57c2234d6b3fef889c52f8 (patch)
treee4a46d7e5a2c07536caeb391551395217565143d
parentd2d408bba763accf5873e2a3a0deb8629e0073ac (diff)
parent54c05bcdb96fcbab8a8c552e6558dc18b1571af3 (diff)
downloadnextcloud-server-a1bf9b97576d3da5df57c2234d6b3fef889c52f8.tar.gz
nextcloud-server-a1bf9b97576d3da5df57c2234d6b3fef889c52f8.zip
Merge pull request #33280 from nextcloud/externalStorageWithoutVersioning
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 6ebbed33a87..d5b8eff6fe5 100644
--- a/apps/files_external/lib/Lib/Storage/AmazonS3.php
+++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php
@@ -744,7 +744,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;