Bug #71477

TypoScript condition hostname checks for IP address instead of host

Added by Sebastian Michaelsen almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
Start date:
2015-11-11
Due date:
% Done:

0%

TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

Description

https://github.com/TYPO3/TYPO3.CMS/blob/874a64c54712131350d195e77d775324682cc33a/typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php#L323

            case 'hostname':
                return (bool)GeneralUtility::cmpFQDN(GeneralUtility::getIndpEnv('REMOTE_ADDR'), $value);
                break;

Instead of checking against REMOTE_HOST (as it says in the documentation) it checks for REMOTE_ADDR.

History

#1 Updated by Mathias Schreiber almost 4 years ago

  • Status changed from New to Closed

@param string $baseHost A hostname or an IPv4/IPv6-address (will by reverse-resolved; typically REMOTE_ADDR)
Mind the part in brackets.

Also available in: Atom PDF