summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/amazons3.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/lib/amazons3.php')
-rw-r--r--apps/files_external/lib/amazons3.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php
index 4c31bdb757e..f6e35dc2587 100644
--- a/apps/files_external/lib/amazons3.php
+++ b/apps/files_external/lib/amazons3.php
@@ -75,6 +75,10 @@ class AmazonS3 extends \OC\Files\Storage\Common {
));
}
+ if (! $this->connection->isValidBucketName($this->bucket)) {
+ throw new \Exception();
+ }
+
if ( ! $this->connection->doesBucketExist($this->bucket)) {
$result = $this->connection->createBucket(array(
'Bucket' => $this->bucket