From 0c6d0c3ca992f32eae1e59fb2dfdafc273f2845d Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 8 Mar 2019 01:18:59 -0700 Subject: [PATCH 1/2] Update StatusController --- app/Http/Controllers/StatusController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/StatusController.php b/app/Http/Controllers/StatusController.php index 3031d73c..e6ae1647 100644 --- a/app/Http/Controllers/StatusController.php +++ b/app/Http/Controllers/StatusController.php @@ -112,7 +112,7 @@ class StatusController extends Controller 'photo.*' => 'required|mimetypes:' . config('pixelfed.media_types').'|max:' . config('pixelfed.max_photo_size'), 'caption' => 'nullable|string|max:'.config('pixelfed.max_caption_length'), 'cw' => 'nullable|string', - 'filter_class' => 'nullable|string', + 'filter_class' => 'nullable|alpha_dash|max:30', 'filter_name' => 'nullable|string', 'visibility' => 'required|string|min:5|max:10', ]); From 6b8969516bb266ed487f25cf3292f36b685d8757 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 8 Mar 2019 01:21:12 -0700 Subject: [PATCH 2/2] Update InternalApiController --- app/Http/Controllers/InternalApiController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/InternalApiController.php b/app/Http/Controllers/InternalApiController.php index c52e917d..18556fdc 100644 --- a/app/Http/Controllers/InternalApiController.php +++ b/app/Http/Controllers/InternalApiController.php @@ -45,7 +45,7 @@ class InternalApiController extends Controller 'caption' => 'nullable|string', 'media.*' => 'required', 'media.*.id' => 'required|integer|min:1', - 'media.*.filter' => 'nullable|string|max:30', + 'media.*.filter' => 'nullable|alpha_dash|max:30', 'media.*.license' => 'nullable|string|max:80', 'visibility' => 'required|string|in:public,private|min:2|max:10' ]);