]> source.dussan.org Git - nextcloud-server.git/commitdiff
check if used bucket name is valid
authorChristian Berendt <berendt@b1-systems.de>
Mon, 8 Jul 2013 12:59:09 +0000 (14:59 +0200)
committerChristian Berendt <berendt@b1-systems.de>
Mon, 8 Jul 2013 12:59:09 +0000 (14:59 +0200)
apps/files_external/lib/amazons3.php

index 4c31bdb757eed9438804a66daa9cc2280a394a99..f6e35dc2587bc5c69b1ce6a3634daa2ad5f5a215 100644 (file)
@@ -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