1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-25 09:17:03 +00:00

Update ComposeController, bail on empty attachments

This commit is contained in:
Daniel Supernault 2021-05-20 20:26:26 -06:00
parent 29947e157c
commit 061b145b54
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -480,6 +480,8 @@ class ComposeController extends Controller
array_push($mimes, $m->mime);
}
abort_if(empty($attachments), 422);
$mediaType = StatusController::mimeTypeCheck($mimes);
if(in_array($mediaType, ['photo', 'video', 'photo:album']) == false) {