1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2024-10-30 07:32:39 +01:00

Removed bmp and tiff support from uploaded images.

Fixes #1990
This commit is contained in:
Dan Brown 2020-04-05 16:15:05 +01:00
parent feab756b9f
commit ea9e9565ef
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
2 changed files with 2 additions and 2 deletions

View File

@ -195,6 +195,6 @@ abstract class Controller extends BaseController
*/
protected function getImageValidationRules(): string
{
return 'image_extension|no_double_extension|mimes:jpeg,png,gif,bmp,webp,tiff';
return 'image_extension|no_double_extension|mimes:jpeg,png,gif,webp';
}
}

View File

@ -34,7 +34,7 @@ class AppServiceProvider extends ServiceProvider
// Custom validation methods
Validator::extend('image_extension', function ($attribute, $value, $parameters, $validator) {
$validImageExtensions = ['png', 'jpg', 'jpeg', 'bmp', 'gif', 'tiff', 'webp'];
$validImageExtensions = ['png', 'jpg', 'jpeg', 'gif', 'webp'];
return in_array(strtolower($value->getClientOriginalExtension()), $validImageExtensions);
});