Skip to content

Commit

Permalink
Merge pull request #315 from xibosignage/develop
Browse files Browse the repository at this point in the history
Release 1.8.5
  • Loading branch information
dasgarner authored Jan 29, 2018
2 parents 5729b9a + 5db1898 commit b737667
Show file tree
Hide file tree
Showing 3 changed files with 3,743 additions and 3,733 deletions.
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ services:

swagger:
image: swaggerapi/swagger-ui:latest
restart: always
ports:
- "8080:80"
- "8080:8080"
environment:
- API_URL=http://localhost/swagger.json
5 changes: 5 additions & 0 deletions lib/Helper/XiboUploadHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Xibo\Entity\Permission;
use Xibo\Entity\Widget;
use Xibo\Exception\AccessDeniedException;
use Xibo\Exception\InvalidArgumentException;
use Xibo\Exception\LibraryFullException;
use Xibo\Exception\NotFoundException;

Expand Down Expand Up @@ -266,6 +267,10 @@ protected function handle_form_data($file, $index)
$file->fileSize = $media->fileSize;
$file->md5 = $media->md5;

// Test to ensure the final file size is the same as the file size we're expecting
if ($file->fileSize != $file->size)
throw new InvalidArgumentException(__('Sorry this is a corrupted upload, the file size doesn\'t match what we\'re expecting.'), 'size');

// Fonts, then install
if ($module->getModuleType() == 'font') {
$controller->installFonts();
Expand Down
Loading

0 comments on commit b737667

Please sign in to comment.