summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>2022-07-19 16:20:44 +0200
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2022-07-28 10:27:55 +0000
commit46167121fc49704f7566fc9aa7d168079c860d0c (patch)
tree7bd3bd0f79704e4a4f309b4dc549211ee9725048
parent7fe507aac0d9ed193594dc646d781c346a368923 (diff)
downloadnextcloud-server-46167121fc49704f7566fc9aa7d168079c860d0c.tar.gz
nextcloud-server-46167121fc49704f7566fc9aa7d168079c860d0c.zip
handle AccessDenied error when checking if external s3 support versions
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
-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;