Bug #60080
Charset config uses deprecated TYPO3 option forceCharset
Status: | Closed | Start date: | 2014-07-03 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Armin Ruediger Vieweg | % Done: | 100% |
|
Category: | - | |||
Target version: | 1.3.0 | |||
TYPO3 Version: |
Description
Now, I know why LDAP returns records with empty DN (#60041).
Actually it doesn't. But the DN contains umlauts and the extension tries to convert the utf-8 string to iso-8859-1, because of this line in Utility\Ldap.php:
1self::$local_charset = $csObj->parse_charset($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] ? $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] : 'iso-8859-1');
The option $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] is not used anymore, so it will always use the iso charset. But TYPO3 works completely with utf-8, so this causes an empty string.
I have just changed the hardcoded iso charset to "utf-8", now it works and no records with empty dn are returned anymore.
If you want to keep compatible with all TYPO3 versions you could simple add an if, which checks the current version and set $local_chartset to "utf-8" in case of 6.0 or higher.
Related issues
Associated revisions
[BUGFIX] Charset config uses deprecated TYPO3 option forceCharset
Since TYPO3 4.7 the option
$GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] has been removed
and TYPO3 uses UTF-8 by default.
A hardcoded iso-8859-1 charset returns records with empty DN,
if DN contains umlauts.
This patch provides an if condition which checks the current
TYPO3 version and sets charset to UTF-8 if using TYPO3 >= 4.7.
Resolves: #60080
Change-Id: Ic84bff6522e07e7ec0fe3e5bcb6cf0971cb79034
Reviewed-on: https://review.typo3.org/31311
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
History
#1 Updated by Armin Ruediger Vieweg about 1 year ago
in case of 6.0 or higher.
After some investigation I have seen, that this option has been already removed in TYPO3 4.7.
#2 Updated by Gerrit Code Review about 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch master of project TYPO3CMS/Extensions/igLdapSsoAuth has been pushed to the review server.
It is available at https://review.typo3.org/31311
#3 Updated by Gerrit Code Review about 1 year ago
Patch set 2 for branch master of project TYPO3CMS/Extensions/igLdapSsoAuth has been pushed to the review server.
It is available at https://review.typo3.org/31311
#4 Updated by Gerrit Code Review about 1 year ago
Patch set 3 for branch master of project TYPO3CMS/Extensions/igLdapSsoAuth has been pushed to the review server.
It is available at https://review.typo3.org/31311
#5 Updated by Xavier Perseguers about 1 year ago
- Assigned To set to Armin Ruediger Vieweg
- Target version set to 1.3.0
#6 Updated by Armin Ruediger Vieweg about 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 5cf4294781c588f7cdcd344843809657332a7ca9.
#7 Updated by Xavier Perseguers 11 months ago
- Status changed from Resolved to Closed