Issue Bug Closed

#103129Modified "Host" header with invalid port leads to exception when creating the ServerRequestFactory->fromGlobals

Johannes Schlier 02/15/24, 11:56 updated 12/02/25, 14:33

Description

When a request is passed to TYPO3 that has an invalid port within the “Host” header (e. g. a non-numeric port “aaa” or too many numerals “123123123”) TYPO3 pretty quickly runs into an error and returns an exception, including an HTTP 500 error.
In my opinion it would be preferable to silently ignore those invalid settings and either continue the request normally, or at least return a clean error (400 – Bad Request).

The attached screenshots are the complete stack trace of such a request.
This was reproduced with TYPO3 12.4.10 and 12.4.11.

Reviews 4