Skip to content

Commit

Permalink
Merge pull request #7076 from nextcloud/s3-valid-bucket-name
Browse files Browse the repository at this point in the history
Better error message for invalid bucket names
  • Loading branch information
MorrisJobke authored Nov 6, 2017
2 parents 5411d60 + 8b763ea commit 5ed0521
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/Files/ObjectStore/S3ConnectionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ protected function getConnection() {
}
$this->connection = new S3Client($options);

if (!S3Client::isBucketDnsCompatible($this->bucket)) {
throw new \Exception("The configured bucket name is invalid.");
if (!$this->connection->isBucketDnsCompatible($this->bucket)) {
throw new \Exception("The configured bucket name is invalid: " . $this->bucket);
}

if (!$this->connection->doesBucketExist($this->bucket)) {
Expand Down

0 comments on commit 5ed0521

Please sign in to comment.