From 4032481a4f2f62e34b12f2e33f462559f73776de Mon Sep 17 00:00:00 2001 From: Lance Pioch Date: Sun, 6 Nov 2022 17:42:48 -0500 Subject: [PATCH] Update validation rules for remote activity logs (#4526) --- app/Http/Requests/Api/Remote/ActivityEventRequest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Requests/Api/Remote/ActivityEventRequest.php b/app/Http/Requests/Api/Remote/ActivityEventRequest.php index 32ad11ad3..43f527dfa 100644 --- a/app/Http/Requests/Api/Remote/ActivityEventRequest.php +++ b/app/Http/Requests/Api/Remote/ActivityEventRequest.php @@ -17,11 +17,11 @@ class ActivityEventRequest extends FormRequest return [ 'data' => ['required', 'array'], 'data.*' => ['array'], - 'data.*.user' => ['present', 'uuid'], + 'data.*.user' => ['sometimes', 'nullable', 'uuid'], 'data.*.server' => ['required', 'uuid'], 'data.*.event' => ['required', 'string'], 'data.*.metadata' => ['present', 'nullable', 'array'], - 'data.*.ip' => ['present', 'ip'], + 'data.*.ip' => ['sometimes', 'nullable', 'ip'], 'data.*.timestamp' => ['required', 'string'], ]; }