Fixed bug #14215: XSS in beuser (thanks to Georg Ringer)
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_befunc.php
index 71a3e58..33b15d6 100644 (file)
@@ -868,7 +868,11 @@ final class t3lib_BEfunc {
                        // Traverse languages
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,title,flag', 'sys_language', 'pid=0' . self::deleteClause('sys_language'));
                while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-                       $sysLanguages[] = array($row['title'].' ['.$row['uid'].']', $row['uid'], ($row['flag'] ? 'flags/'.$row['flag'] : ''));
+                       $sysLanguages[] = array(
+                               htmlspecialchars($row['title']) . ' [' . $row['uid'] . ']',
+                               $row['uid'],
+                               ($row['flag'] ? 'flags/' . $row['flag'] : '')
+                       );
                }
                $GLOBALS['TYPO3_DB']->sql_free_result($res);