From 6e76cf4b68760bf781ea34dfeba41dffd5aade2a Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 1 Oct 2022 03:45:53 -0600 Subject: [PATCH] Update CollectionController, limit max title and description length --- app/Http/Controllers/CollectionController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/CollectionController.php b/app/Http/Controllers/CollectionController.php index 39b015ac8..79284e20f 100644 --- a/app/Http/Controllers/CollectionController.php +++ b/app/Http/Controllers/CollectionController.php @@ -65,8 +65,8 @@ class CollectionController extends Controller { abort_if(!Auth::check(), 403); $this->validate($request, [ - 'title' => 'nullable', - 'description' => 'nullable', + 'title' => 'nullable|max:50', + 'description' => 'nullable|max:500', 'visibility' => 'nullable|string|in:public,private,draft' ]); @@ -84,8 +84,8 @@ class CollectionController extends Controller { abort_if(!Auth::check(), 403); $this->validate($request, [ - 'title' => 'nullable', - 'description' => 'nullable', + 'title' => 'nullable|max:50', + 'description' => 'nullable|max:500', 'visibility' => 'required|alpha|in:public,private,draft' ]); $profile = Auth::user()->profile;