[TYPO3-core] RFC #15034: Bug: Can't log into the backend when using an IPv6 Address as HTTP_HOST

Christian Kuhn lolli at schwarzbu.ch
Thu Dec 30 20:03:40 CET 2010


On 07/14/2010 05:35 PM, Roland Schenke wrote:
> Problem:
> When one is trying to log into the backend with an IPv6 Address like http://[::1]/typo3/ a RuntimeException is thrown in class.t3lib_userauth.php::checkAuthentication() because "this host address" mismatches the "referer host".
>
> Solution:
> The error lies in t3lib_div::getIndpEnv().
> In case of t3lib_div::getIndpEnv('TYPO3_HOST_ONLY') the HTTP_HOST is treated as IPv4 and therefore explode()ed at the colon(s). The first element of the resulting array is used as the TYPO3_HOST_ONLY value.
> Because IPv6 Addresses can and have several colons I extended t3lib_div::getIndpEnv() at the appropriate places. This includes TYPO3_PORT.

Ah, this one was on my list for a long time ;)

I've now set up a local IPv6 system to test the issue and the patch. 
Works fine. Thanks everyone involved!

I just modified the test names a bit and added a simple domain name test 
to the data provider.

Committed attached patches (different version for the branches) to:
* trunk rev. 9971.
* 4.4 rev. 9972.
* 4.3 rev. 9973

Thanks
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 15034_09.diff
Type: text/x-patch
Size: 1051 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101230/ecd8c779/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 15034_09-test.diff
Type: text/x-patch
Size: 1702 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101230/ecd8c779/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 15034_09-4.4-4.3.diff
Type: text/x-patch
Size: 1045 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101230/ecd8c779/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 15034_09-test-4.3.diff
Type: text/x-patch
Size: 1717 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101230/ecd8c779/attachment-0003.bin>


More information about the TYPO3-team-core mailing list