Project

General

Profile

Actions

Bug #104805

open

Links with ?type=[number] should give a 404 error and not write a log for each such request

Added by Maks Oleksyuk 5 months ago. Updated 5 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Link Handling & Redirect Handling
Target version:
-
Start date:
2024-09-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:
Needs Decision

Description

When requesting any page with ?type=[number], if the configuration for the type with that id is not found, it causes an error to be logged: TYPO3 Exception: #1294587217: The page is not configured!

This behavior can cause a database overflow if you loop through different numbers.

Suggested solution:
- add a check for a type with the requested id. If this id exists and is not configured, then add an error log, if no such id is found, show the user a 404 page without any error log


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #104928: Passing a "type" array GET parameter triggers a PHP warningUnder ReviewStefan Bürk2024-09-12

Actions
Actions #1

Updated by Garvin Hicking 5 months ago

  • Category set to Link Handling & Redirect Handling
Actions #2

Updated by Garvin Hicking 5 months ago

Personally I've worked around this with a custom middleware liked described in https://www.in2code.de/aktuelles/php-typo3-log-eintraege-the-page-is-not-configured-type-vermeiden/ - however I think it's worth having a discussion about how to handle this, so thank you for bringing it up.

Actions #3

Updated by Garvin Hicking 5 months ago

  • Sprint Focus set to Needs Decision
Actions #4

Updated by Maks Oleksyuk 5 months ago

Using custom middleware seems like a good solution. But it would be better to have this logic in the core, as it can be reproduced on most typo3 sites.

I also liked the idea of not giving out a 404, but redirecting to the page, but without the query parameter,

Actions #5

Updated by Garvin Hicking 5 months ago

  • Related to Bug #104928: Passing a "type" array GET parameter triggers a PHP warning added
Actions

Also available in: Atom PDF