Skip to content

Commit

Permalink
Merge pull request #33391 from nextcloud/backport/33280/stable24
Browse files Browse the repository at this point in the history
[stable24] handle AccessDenied error when checking if external s3 support versions
  • Loading branch information
blizzz authored Aug 1, 2022
2 parents e70ffdf + 7be4691 commit 66d4f67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/files_external/lib/Lib/Storage/AmazonS3.php
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ protected function getVersioningStatusFromBucket(): bool {
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;
Expand Down

0 comments on commit 66d4f67

Please sign in to comment.