Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit 89378e8

Browse files
committed
Fix an XSS vulnerability in the system log (see CVE-2018-10125).
1 parent 04af3d1 commit 89378e8

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

system/docs/CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Contao Open Source CMS changelog
22
================================
33

4+
Version 3.5.35 (2018-04-18)
5+
---------------------------
6+
7+
### Fixed
8+
Fix an XSS vulnerability in the system log (see CVE-2018-10125).
9+
10+
411
Version 3.5.34 (2018-03-06)
512
---------------------------
613

system/modules/core/drivers/DC_Table.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ public function show()
562562
$return .= '
563563
<tr>
564564
<td'.$class.'><span class="tl_label">'.$label.': </span></td>
565-
<td'.$class.'>'.$row[$i].'</td>
565+
<td'.$class.'>'.specialchars($row[$i]).'</td>
566566
</tr>';
567567
}
568568

system/modules/core/library/Contao/System.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public static function log($strText, $strFunction, $strCategory)
186186
}
187187

188188
\Database::getInstance()->prepare("INSERT INTO tl_log (tstamp, source, action, username, text, func, ip, browser) VALUES(?, ?, ?, ?, ?, ?, ?, ?)")
189-
->execute(time(), (TL_MODE == 'FE' ? 'FE' : 'BE'), $strCategory, ($GLOBALS['TL_USERNAME'] ? $GLOBALS['TL_USERNAME'] : ''), specialchars($strText), $strFunction, $strIp, $strUa);
189+
->execute(time(), (TL_MODE == 'FE' ? 'FE' : 'BE'), $strCategory, ($GLOBALS['TL_USERNAME'] ? $GLOBALS['TL_USERNAME'] : ''), specialchars($strText), $strFunction, $strIp, specialchars($strUa));
190190

191191
// HOOK: allow to add custom loggers
192192
if (isset($GLOBALS['TL_HOOKS']['addLogEntry']) && is_array($GLOBALS['TL_HOOKS']['addLogEntry']))

0 commit comments

Comments
 (0)