1
0
Fork 0
forked from mirror/pixelfed

Update ApiV1Controller, enforce public timeline setting

This commit is contained in:
Daniel Supernault 2020-04-28 00:12:49 -06:00
parent f87831b542
commit 285bd4854b
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -1397,6 +1397,8 @@ class ApiV1Controller extends Controller
*/ */
public function timelinePublic(Request $request) public function timelinePublic(Request $request)
{ {
abort_if(!config('instance.timeline.local.is_public') && !$request->user(), 403);
$this->validate($request,[ $this->validate($request,[
'page' => 'nullable|integer|max:40', 'page' => 'nullable|integer|max:40',
'min_id' => 'nullable|integer|min:0|max:' . PHP_INT_MAX, 'min_id' => 'nullable|integer|min:0|max:' . PHP_INT_MAX,