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

Roland Schenke rs at kruselenz.com
Wed Jul 14 17:35:52 CEST 2010


This is an SVN patch request.

Type: Bugfix

Bugtracker references:
http://bugs.typo3.org/view.php?id=15034

Branches:
TYPO3_4-4 & trunk
did not check on TYPO3_4-3

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.

Notes:
This is my very first bugfix to the TYPO3 Core.

A very big thank you to lolli for inspiring me to dive into TYPO3 Bugfixing. :-)
Best wishes from Roland your charming bartender of T3DD10. ;-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 15034_v4.diff
Type: application/octet-stream
Size: 2182 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100714/1113f950/attachment.obj>
-------------- next part --------------

	
--
Mit freundlichen Gr??en / Best regards

Roland Schenke
Forschung und Entwicklung

K & L Internet Service
Kruse & Lenz GbR - Vrestorfer Weg 5 - 21339 L?neburg

Fon    : 0176 / 46534665
E-Mail : info at kruselenz.com
Web    : www.kruselenz.com

*** Internetauftritte * CMS * Webshops * Hosting * Grafik *** 





More information about the TYPO3-team-core mailing list