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

Commit

Permalink
Fix an XSS vulnerability in the system log (see CVE-2018-10125).
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer committed Apr 18, 2018
1 parent 04af3d1 commit 89378e8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions system/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Contao Open Source CMS changelog
================================

Version 3.5.35 (2018-04-18)
---------------------------

### Fixed
Fix an XSS vulnerability in the system log (see CVE-2018-10125).


Version 3.5.34 (2018-03-06)
---------------------------

Expand Down
2 changes: 1 addition & 1 deletion system/modules/core/drivers/DC_Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ public function show()
$return .= '
<tr>
<td'.$class.'><span class="tl_label">'.$label.': </span></td>
<td'.$class.'>'.$row[$i].'</td>
<td'.$class.'>'.specialchars($row[$i]).'</td>
</tr>';
}

Expand Down
2 changes: 1 addition & 1 deletion system/modules/core/library/Contao/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public static function log($strText, $strFunction, $strCategory)
}

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

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

0 comments on commit 89378e8

Please sign in to comment.