1
0
mirror of https://github.com/flarum/core.git synced 2025-07-20 08:11:27 +02:00

Disallow svg images to be erroneously uploaded

Laravel's `image` validation rule allows svg files to pass validation, but we can't handle svgs so it would result in an unspecified 500 error which isn't nice.
This commit is contained in:
Toby Zerner
2016-08-27 23:54:18 +09:30
parent b7586e819b
commit ddfc41c6f7

View File

@@ -15,7 +15,7 @@ class AvatarValidator extends AbstractValidator
protected $rules = [
'avatar' => [
'required',
'image',
'mimes:jpeg,png,bmp,gif',
'max:2048'
]
];