Update ApiV1Controller, properly cast boolean sensitive parameter. Fixes #4888

This commit is contained in:
Daniel Supernault 2024-02-01 22:46:13 -07:00
parent 8a9a7c0e47
commit 0aff126aa0
No known key found for this signature in database
GPG Key ID: 23740873EE6F76A1
1 changed files with 1 additions and 1 deletions

View File

@ -3031,7 +3031,7 @@ class ApiV1Controller extends Controller
$content = strip_tags($request->input('status')); $content = strip_tags($request->input('status'));
$rendered = Autolink::create()->autolink($content); $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; $spoilerText = $cw && $request->filled('spoiler_text') ? $request->input('spoiler_text') : null;
if($in_reply_to_id) { if($in_reply_to_id) {