[TYPO3-core] RFC #15034: Bug: Can't log into the backend when using an IPv6 Address as HTTP_HOST
Gosign | Caspar Stuebs
caspar at gosign.de
Thu Jul 15 11:48:30 CEST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 15.07.2010 11:00, schrieb Roland Schenke:
>
> 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.
I comletely support this opinion.
> 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. :-)
I suggest NOT to use 'preg_match'.
If an bracket ']' is inside the HTTP_HOST string, there is only one
posibility that this a correct value, even if it is an IPv6 address.
Why using a big, complex function for an small question ??
Viele Grüsse
Caspar Stuebs
Entwicklung
***Gosign im Jahrbuch der Werbung 2009***
NEW | We web pink: www.bebegeneration.de
We web green: www.greenpeace-hamburg.de
We web baguette: www.renault-safety.com
- --
Gosign media. GmbH | We web ideas.
Lokstedter Weg 36 | 20251 Hamburg
Tel. +49 (0) 40 / 31 70 15 00 | Fax +49 (0) 40 / 31 70 15 02
eMail caspar at gosign.de | Internet www.Gosign.de | Skype caspar.stuebs
Amtsgericht Hamburg HRB 112197 | Ust-IdNr. DE215891388
Geschäftsführung Bert Gogolin
Greenpeace energy: Gosign läuft mit ehrlichem Strom.
Diese Mail bitte nur ausdrucken, wenn es wirklich sein muss.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkw+2W4ACgkQBN8gVNLcSL7hsgCfWu7Wj/P0Kjwi465Hs3DrNl5F
sREAoLRC8x9l0eN5ExpoV4E8ISbYNAEV
=IRH/
-----END PGP SIGNATURE-----
More information about the TYPO3-team-core
mailing list