[TYPO3-core] trustedHostsPattern

Helmut Hummel helmut.hummel at typo3.org
Fri May 23 13:13:48 CEST 2014


Hi Joey,

On 22.05.14 15:20, JoH asenau wrote:

> After upgrading the TYPO3 sources we ran into "Exception thrown without
> a stack frame blah" without any additional info.

Can you post the exact exception message please?

Was it "The current host header value does not match the configured 
trusted hosts pattern! Check the pattern defined in 
$GLOBALS[\'TYPO3_CONF_VARS\'][\'SYS\'][\'trustedHostsPattern\'] and 
adapt it, if you want to allow the current host header \'' . $retVal . 
'\' for your installation." ?

> Frontend and backend are running on NGINX behind an NGINX based HA-Proxy
> and the domains are configured to be running on different ports than
> default.
> So the default setting SERVER_NAME just broke any TYPO3 instance
> completely and we just found out by accident, what the problem is.
>
> The "accident" was a redirect which is activated for URLs without a
> trailing slash and it redirects from

I want to understand this case in order to provide a better handling if 
possible.

> blah.domain.com/typo3
>
> to
>
> blah.domain.tld:12345/typo3/
>
> The latter was running smoothly, which lead us to the actual problem.

Where does the redirect happen? Is there a server running on the default 
porton blah.domain.com? Must be, as only then a redirect can be established.

You are saying blah.domain.tld:12345/typo3/ worked with the default 
TYPO3 setting SERVER_NAME?

In any case, I would be interested in the following vars in the TYPO3 
environment(s):

print_r(array_intersect_key($_SERVER,
array('HTTP_HOST'=>'','SERVER_NAME'=>'','SERVER_PORT'=>'','REQUEST_URI'=>'','HTTPS'=>'','REMOTE_ADDR'=>'')));

var_dump($GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP']);
var_dump($GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxySSL']);
var_dump(t3lib_div::getIndpEnv('TYPO3_SSL'));


Make sure to *obfuscate the IP adresses and host names* in case they are
sensible information in your case before posting here.


Kind regards,
Helmut

-- 
Helmut Hummel
Release Manager TYPO3 6.0
TYPO3 Core Developer, TYPO3 Security Team Member

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-team-core mailing list