Bug #84180
closedDefault database charset in ConnectionPool is not valid
100%
Description
When configuring an additional or new database like this:
$connectionParams = [
'dbname' => '..',
'user' => '..',
'password' => '..',
'host' => '..',
'driver' => '..'
];
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['..'] = $connectionParams;
the option 'charset' can be left out without issue of connection.
ConnectionPool will default to a new charset setting, but not a valid one at this line:
https://api.typo3.org/typo3cms/8/html/_connection_pool_8php_source.html#l00146
The charset 'utf-8' is invalid and content loaded from a UTF-8 database like this, will have unknown characters in them, causing issues when the conent is parsed via htmlspecialchars() for example.
As solution, the charset configuration should be required or default to the proper string 'utf8'.
Updated by Gerrit Code Review over 6 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56081
Updated by Gerrit Code Review over 6 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56086
Updated by Wolfgang Klinger over 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 7eaed349a2b55e94da55b1c41863e1cfed8095a7.