Skip to content

Commit

Permalink
[processor] Prevent accidental calls to global functions
Browse files Browse the repository at this point in the history
if any of the values is the string 'header' or 'die'
then that global function gets called.
This should be done explicitly if indended.

Issue: MOYA-1244
  • Loading branch information
Marrikulus authored and sunkan committed Dec 20, 2023
1 parent 68f1ffc commit 20a439b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Processor/CallableContextProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __invoke(array $record)
}

foreach ($record['context'] as $key => &$value) {
if (\is_callable($value)) {
if (!is_string($value) && \is_callable($value)) {
try {
$value = $value();
}
Expand Down

0 comments on commit 20a439b

Please sign in to comment.