summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorChristian Berendt <berendt@b1-systems.de>2013-07-08 14:59:09 +0200
committerChristian Berendt <berendt@b1-systems.de>2013-07-08 14:59:09 +0200
commit911e947fd7c4d66cfbcffd9814dabe267ed813c4 (patch)
treefbd908e16231461b776aec981ca4dfa508c17b49 /apps/files_external
parentdc8ca00f1ef522eaa2783e2664682b586a901680 (diff)
downloadnextcloud-server-911e947fd7c4d66cfbcffd9814dabe267ed813c4.tar.gz
nextcloud-server-911e947fd7c4d66cfbcffd9814dabe267ed813c4.zip
check if used bucket name is valid
Diffstat (limited to 'apps/files_external')
-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