]> source.dussan.org Git - nextcloud-server.git/commitdiff
handle AccessDenied error when checking if external s3 support versions 33392/head
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Tue, 19 Jul 2022 14:20:44 +0000 (16:20 +0200)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Thu, 28 Jul 2022 10:27:55 +0000 (10:27 +0000)
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
apps/files_external/lib/Lib/Storage/AmazonS3.php

index cfd78689fa4dc682bb38836654703347715283d8..62bff08895bbfbd775c1bb44fbff31e78f044106 100644 (file)
@@ -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;