diff --git a/airtime_mvc/application/cloud_storage/Amazon_S3StorageBackend.php b/airtime_mvc/application/cloud_storage/Amazon_S3StorageBackend.php index 6a05bd9a5..b51b0059f 100644 --- a/airtime_mvc/application/cloud_storage/Amazon_S3StorageBackend.php +++ b/airtime_mvc/application/cloud_storage/Amazon_S3StorageBackend.php @@ -65,7 +65,7 @@ class Amazon_S3StorageBackend extends StorageBackend $slashPos = strpos($prefix, "/"); if (($slashPos === FALSE) || //Slash must exist ($slashPos != 2) || //Slash must be the third character - (strlen($prefix) > $slashPos) || //String must have something after the first slash + (strlen($prefix) <= $slashPos) || //String must have something after the first slash (substr_count($prefix, "/") != 2)) //String must have two slashes { throw new Exception("Invalid file prefix in " . __FUNCTION__);