diff options
author | Matthieu Gallien <matthieu.gallien@nextcloud.com> | 2022-07-19 16:20:44 +0200 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2022-07-28 10:27:55 +0000 |
commit | 46167121fc49704f7566fc9aa7d168079c860d0c (patch) | |
tree | 7bd3bd0f79704e4a4f309b4dc549211ee9725048 | |
parent | 7fe507aac0d9ed193594dc646d781c346a368923 (diff) | |
download | nextcloud-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.php | 2 |
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; |