Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 629d21b

Browse filesBrowse files
committed
Escape variable in Exception Template
1 parent 3ee39e7 commit 629d21b
Copy full SHA for 629d21b

File tree

1 file changed

+3
-3
lines changed
Filter options

1 file changed

+3
-3
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/ErrorHandler/Resources/views/traces_text.html.php
+3-3Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.