Skip to content

Conversation

@dylang3
Copy link

@dylang3 dylang3 commented Dec 31, 2025

Fixes #18384.

shell_exec() is being called unintentionally in bulk-actions.blade.php via the use of backticks in the hidden sort input on line 21:

<input name="sort" type="hidden" value="{{`$model_name.id`}}">

Since backticks are an execution operator in PHP, shell_exec() is being called using the value of $model_name.id when the Blade template is rendered, which fails. This may cause a runtime error depending on the user's environment configuration or it may fail silently, but the value attribute for the input isn't set properly regardless.

I've replaced the backticks and instead use string interpolation here:

<input name="sort" type="hidden" value="{{ "{$model_name}.id" }}">

This now outputs the intended string (e.g. category.id).

@dylang3 dylang3 requested a review from snipe as a code owner December 31, 2025 05:13
@snipe snipe merged commit b3902e8 into grokability:develop Dec 31, 2025
8 checks passed
@snipe
Copy link
Member

snipe commented Dec 31, 2025

TYSM!

@dylang3 dylang3 deleted the fix/unintended-shell-exec-call branch December 31, 2025 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants