Project

General

Profile

Actions

Bug #103129

open

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

Added by Johannes Schlier 2 months ago. Updated about 2 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2024-02-15
Due date:
% Done:

0%

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

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.


Files

Actions #1

Updated by Benni Mack about 2 months ago

Idea is to catch invalid argument exception in AbstractApplication->run (dev-main), and then deliver a 400 response with no content.

Actions

Also available in: Atom PDF