Issue Bug Closed

#102176Missing error suppression for preg_match in RedirectService

Moritz Noll 10/16/23, 08:25 updated 07/09/24, 15:19

Description

You have a missing ‘@’ sign in front of preg_match like the lines before to suppress the errors.
https://forge.typo3.org/projects/typo3cms-core/repository/1749/revisions/main/entry/typo3/sysext/redirects/Classes/Service/RedirectService.php#L162
I was able to raise an error there by calling an URL with parameter.

Reviews 3

Files 1

History 612

  1. Chris Müller commented and changed status New Needs Feedback 10/16/23, 08:33

    Suppressing an error might not be the best way.

    Can you give more information which error was raised and how your URL looked like?

  2. Moritz Noll commented and changed attached exception.png 10/16/23, 09:47

    I called the URL ‘http://localhost/xxx-shop/shop?ai[f_name]=ABC&ai[f_catid]=3&ai[controller]=Catalog&ai[action]=list’.
    The error occurs at the linked line above.
    In the attachment you see the error page.
    Because in the same function the other both preg_macth calls are prefixed with ‘@’ I’ve think that this one was forgotten.

  3. Chris Müller changed status Needs Feedback New 10/16/23, 16:17

  4. Gerrit Code Review pushed patch set 1 for main to change 84872 status New Under Review 06/23/24, 21:20

  5. Gerrit Code Review pushed patch set 2 for main to change 84872 06/23/24, 21:36

  6. Gerrit Code Review pushed patch set 3 for main to change 84872 06/23/24, 22:01

  7. Gerrit Code Review pushed patch set 4 for main to change 84872 06/24/24, 07:36

  8. Garvin Hicking changed Related to #104190 06/24/24, 08:39

  9. Gerrit Code Review pushed patch set 1 for 12.4 to change 84842 06/25/24, 08:19

  10. Gerrit Code Review pushed patch set 1 for 11.5 to change 84843 06/25/24, 08:20

  11. Stefan Bürk commented and changed status Under Review Resolved done 0 % 100 % 06/25/24, 08:35

    Applied in changeset commit:6c88f15e7e06475bb7c0fe0743d1b92c206ee8b0.

  12. Benni Mack changed status Resolved Closed 07/09/24, 15:19