Project

General

Profile

Actions

Bug #27217

closed

t3lib_div::cmpFQDN() lacks support for IPv6, direct hostnames and has matching-problems

Added by Stefan Neufeind about 13 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
Start date:
2011-06-05
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.6
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.


Related issues 2 (0 open2 closed)

Is duplicate of TYPO3 Core - Bug #27216: t3lib_div::cmpFQDN() lacks support for IPv6, direct hostnames and has matching-problemsClosedChris topher2011-06-05

Actions
Has duplicate TYPO3 Core - Bug #28046: Method t3lib_div::cmpFQDN is missleadingClosedKilian Hann2011-07-09

Actions
Actions

Also available in: Atom PDF