Update InternalApiController

This commit is contained in:
Daniel Supernault 2019-03-25 20:40:34 -06:00
parent 1e75b1688d
commit e7521c2cb4
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -61,6 +61,9 @@ class InternalApiController extends Controller
$cw = false;
foreach($medias as $k => $media) {
if($k + 1 > config('pixelfed.max_album_length')) {
continue;
}
$m = Media::findOrFail($media['id']);
if($m->profile_id !== $profile->id || $m->status_id) {
abort(403, 'Invalid media id');