Skip to content

Commit

Permalink
Update ApiV1Controller, properly cast boolean sensitive parameter. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dansup committed Feb 2, 2024
1 parent 8a9a7c0 commit 0aff126
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/ApiV1Controller.php
Expand Up @@ -3031,7 +3031,7 @@ public function statusCreate(Request $request)

$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) {
Expand Down

0 comments on commit 0aff126

Please sign in to comment.