1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 16:24:29 +00:00

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

View file

@ -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) {