Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-08-27 19:01:51 +0400
committerLukas Reschke <lukas@owncloud.com>2014-08-28 11:37:11 +0400
commit5a8db83c48317eb3a1e395bc8db1270615fc5dca (patch)
treed589e383d05b4890b8876d739c055ac62d231b45 /lib/private/template.php
parenta3dcbe5bcee2df9706213deae24b892ae235e363 (diff)
Escape error messages
Diffstat (limited to 'lib/private/template.php')
-rw-r--r--lib/private/template.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/template.php b/lib/private/template.php
index eaa58b769d7..173345cc001 100644
--- a/lib/private/template.php
+++ b/lib/private/template.php
@@ -272,19 +272,19 @@ class OC_Template extends \OC\Template\Base {
if (defined('DEBUG') and DEBUG) {
$hint = $exception->getTraceAsString();
if (!empty($hint)) {
- $hint = '<pre>'.$hint.'</pre>';
+ $hint = '<pre>'.OC_Util::sanitizeHTML($hint).'</pre>';
}
while (method_exists($exception, 'previous') && $exception = $exception->previous()) {
$error_msg .= '<br/>Caused by:' . ' ';
if ($exception->getCode()) {
- $error_msg .= '['.$exception->getCode().'] ';
+ $error_msg .= '['.OC_Util::sanitizeHTML($exception->getCode()).'] ';
}
- $error_msg .= $exception->getMessage();
+ $error_msg .= OC_Util::sanitizeHTML($exception->getMessage());
};
} else {
$hint = '';
if ($exception instanceof \OC\HintException) {
- $hint = $exception->getHint();
+ $hint = OC_Util::sanitizeHTML($exception->getHint());
}
}
self::printErrorPage($error_msg, $hint);