Skip to content

Commit

Permalink
Sanitize request input before passing it to expression language evalu…
Browse files Browse the repository at this point in the history
…ator
  • Loading branch information
pamil authored Aug 12, 2020
1 parent 1bea002 commit 11e00c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Bundle/Controller/ParametersParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private function parseRequestValueExpression(string $expression, Request $reques
));
}

return is_string($variable) ? sprintf('"%s"', $variable) : $variable;
return is_string($variable) ? sprintf('"%s"', addslashes($variable)) : $variable;
}, $expression);

return $this->expression->evaluate($expression, ['container' => $this->container]);
Expand Down

0 comments on commit 11e00c3

Please # to comment.