Bug #27216
closedt3lib_div::cmpFQDN() lacks support for IPv6, direct hostnames and has matching-problems
0%
Description
Description of this function shows that it should compare a hostname with a list. What it did until now was take an IP-address (IPv4-only!), resolve that to a hostname itself and compare that.
Without breaking backward-compatibility this function can/needs to be extended to do what it's supposed to do (compare a given hostname with a list). When keeping IPv4-support and automatically reverse-resolve that, IPv6-support would also be good to have.
Comparing hostnames has matching-problems though. Giving it a host "www.typo3.org" and comparing that against "www" currently results in "true". According to the intended functionality the list-entry would need to be "www.*". It also currently doesn't support wildcard-matches at beginning or in the middle of a hostname, where * would resolve to an arbitrary number (>= 1) of hostname-parts.
Unittests for compares would also be great in this context.
Updated by Chris topher over 13 years ago
- Status changed from New to Closed
- Assignee set to Chris topher
Closed as duplicate of #27217.