diff options
author | Christian Berendt <berendt@b1-systems.de> | 2013-07-08 14:59:09 +0200 |
---|---|---|
committer | Christian Berendt <berendt@b1-systems.de> | 2013-07-08 14:59:09 +0200 |
commit | 911e947fd7c4d66cfbcffd9814dabe267ed813c4 (patch) | |
tree | fbd908e16231461b776aec981ca4dfa508c17b49 /apps/files_external | |
parent | dc8ca00f1ef522eaa2783e2664682b586a901680 (diff) | |
download | nextcloud-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.php | 4 |
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 |