Project

General

Profile

Actions

Bug #104190

open

restrict "Unsafe captching group regex"-message to only used replacements

Added by Mordamir 5 months ago. Updated 13 days ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
Link Handling & Redirect Handling
Target version:
-
Start date:
2024-06-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

Description

Currently the replaceRegExpCaptureGroup function inside the RedirectService is generating a warning message for every capture group which contains a question mark.

The problem is, that this message is generated for every captured group, even if it is not used. Especially for capturing group zero, which always contains the whole matched string.

Alternatives:
- throw away match zero (unset $matches0) (is it allowed to use $0 in the target url?)
- check if replacement string is used (does the target url contain a $0 placeholder?)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #102176: Missing error suppression for preg_match in RedirectServiceClosed2023-10-16

Actions
Actions

Also available in: Atom PDF