Project

General

Profile

Actions

Bug #87744

closed

Unknown modifier 'r'

Added by R3 H6 about 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2019-02-19
Due date:
% Done:

100%

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

Description

Redirect throws error in frontend (any page).

(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception

PHP Warning: preg_match(): Unknown modifier 'r' in /var/www/web/typo3/sysext/redirects/Classes/Service/RedirectService.php line 82

at TYPO3\CMS\Core\Error\ErrorHandler->handleError(2, 'preg_match(): Unknown modifier \'r\'', '/var/www/web/typo3/sysext/redirects/Classes/Service/RedirectService.php', 82, array('r', 'S'))
Actions #1

Updated by Markus Klein about 5 years ago

  • Status changed from New to Needs Feedback

What does your redirect regex look like?
I assume that it contains a slash (followed by an "r"), which causes this issue.

Actions #2

Updated by R3 H6 about 5 years ago

Source Path: /fr/service/

The main issue is, that it is possible to break the whole frontend by adding a wrong regular expression.
This should not be possible. Not every editor knows about regular expressions...

The regular expression should be tested first.
Perhaps something like https://github.com/r3h6/TYPO3.EXT.error404page/blob/master/Classes/Utility/RegexUtility.php

Actions #3

Updated by Markus Klein about 5 years ago

  • Status changed from Needs Feedback to Accepted
  • Priority changed from Should have to Must have

Yes we talked about that already. I tend to forbid entering a full regex here. So the slash delimiter is fixed then and anything entered in this field is escaped before being used in the regex. (preg_quote)
Problem is that this could be a breaking change for existing installations.

Actions #4

Updated by Gerrit Code Review about 5 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59817

Actions #5

Updated by Gerrit Code Review about 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59817

Actions #6

Updated by Gerrit Code Review about 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59817

Actions #7

Updated by Gerrit Code Review about 5 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59817

Actions #8

Updated by Gerrit Code Review about 5 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59817

Actions #9

Updated by Gerrit Code Review about 5 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59817

Actions #10

Updated by Gerrit Code Review about 5 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59847

Actions #11

Updated by Markus Klein about 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #12

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF