8000 Escape variable in Exception Template · symfony/symfony@629d21b · GitHub
[go: up one dir, main page]

Skip to content

Commit 629d21b

Browse files
committed
Escape variable in Exception Template
1 parent 3ee39e7 commit 629d21b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/ErrorHandler/Resources/views/traces_text.html.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
<?php if ($exception['trace']) { ?>
2121
<pre class="stacktrace">
2222
<?php
23-
echo $exception['class'].":\n";
23+
echo $this->escape($exception['class']).":\n";
2424
if ($exception['message']) {
25-
echo $exception['message']."\n";
25+
echo $this->escape($exception['message'])."\n";
2626
}
2727

2828
foreach ($exception['trace'] as $trace) {
2929
echo "\n ";
3030
if ($trace['function']) {
31-
echo 'at '.$trace['class'].$trace['type'].$trace['function'].'('.(isset($trace['args']) ? $this->formatArgsAsText($trace['args']) : '').')';
31+
echo $this->escape('at '.$trace['class'].$trace['type'].$trace['function']).'('.(isset($trace['args']) ? $this->formatArgsAsText($trace['args']) : '').')';
3232
}
3333
if ($trace['file'] && $trace['line']) {
3434
echo($trace['function'] ? "\n (" : 'at ').strtr(strip_tags($this->formatFile($trace['file'], $trace['line'])), [' at line '.$trace['line'] => '']).':'.$trace['line'].($trace['function'] ? ')' : '');

0 commit comments

Comments
 (0)
0