From 0aff126aa0bb001f0137848a578adad7a1e5797c Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 1 Feb 2024 22:46:13 -0700 Subject: [PATCH] Update ApiV1Controller, properly cast boolean sensitive parameter. Fixes #4888 --- app/Http/Controllers/Api/ApiV1Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index b342d68ce..dd0cbd062 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -3031,7 +3031,7 @@ class ApiV1Controller extends Controller $content = strip_tags($request->input('status')); $rendered = Autolink::create()->autolink($content); - $cw = $user->profile->cw == true ? true : $request->input('sensitive', false); + $cw = $user->profile->cw == true ? true : $request->boolean('sensitive', false); $spoilerText = $cw && $request->filled('spoiler_text') ? $request->input('spoiler_text') : null; if($in_reply_to_id) {