[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
Thu Jul 15 11:00:54 CEST 2010
Am 15.07.2010 um 10:28 schrieb Bernhard Kraft:
> Am 2010-07-14 17:35, schrieb Roland Schenke:
>
>> The error lies in t3lib_div::getIndpEnv().
>
> Not wanting to rant: I suggest using "preg_match" for checking if it is an IPv6 address and which part is the hostname and the port. Anyways: If you request TYPO3_HOST_ONLY, shouldn't it only return ::1 for localhost - as far as I read your patch it would return [::1] ... I guess the brackets are just used in URLs - the hostname itself would be ::1 ?!?! Or am I misleaded here?
Hi Bernhard,
I see your point, but in my opinion is [::1] the Host and ::1 would be the corresponding IP therefore [::1] would be the appropriate return value.
In class.t3lib_userauth.php::checkAuthentication() the TYPO3_HOST_ONLY is compared to the HTTP_REFERER Host and contains the brackets as well, since both string values are compared against each other I think the brackets are needed in TYPO3_HOST_ONLY.
As for the regular expressions, this is my very first patch so I might not be aware of the technically best oder sophisticated solution in the sense of TYPO3 Core Development.
Wouldn't you like to provide a corresponding regular expression? I know them, but they are not my area of expertise. :-)
Thank you for your point of view.
--
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