Project

General

Profile

Actions

Bug #100791

closed

EXT:redirect infinite loop on target "/"

Added by Rafael Kähm about 1 year ago. Updated 7 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Redirect Handling
Start date:
2023-05-02
Due date:
% Done:

100%

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

Description

The redirect target MUST NOT be empty if it is defined as "/", because redirect to empty "" string as target leads to the redirects to the requested URL again.

How to reproduce:

Install EXT:redirects

composer require typo3/cms-redirects

Create a redirect entry via backend for any source(e.g. "/rfc/is/strange/") but / as target.

Open Firefox dev tools and navigate to network tab, and call the created URL.

The redirect endless loop error is triggered.

Expected behavior:

The redirect target must stay as it is defined in sys_redirect.target record.

Screenshot from Firefox dev tools:

!Bildschirmfoto vom 2023-05-02 22-43-11.png!


Files

Bildschirmfoto vom 2023-05-02 22-43-11.png (190 KB) Bildschirmfoto vom 2023-05-02 22-43-11.png Rafael Kähm, 2023-05-02 20:45
Auswahl_1290.png (62.7 KB) Auswahl_1290.png Stefan Bürk, 2023-05-04 04:00
Auswahl_1291.png (37.1 KB) Auswahl_1291.png Stefan Bürk, 2023-05-04 04:00

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #100958: Type error in reference index with invalid user inputResolved2023-06-05

Actions

Updated by Stefan Bürk about 1 year ago

Cannot reproduce this with in 11.5-dev, 12.4-dev or 13.0-dev(main).
I get a correct 404 response. Redirect is matched, but no target
URL build in the `ext:redirects` middleware.

I have tested it with wildcard, domain, domain + base path, no success
to reproduce your reported behaviour.

  • Are you on latest 11.5.x ?
  • Can you check the response headers of a redirect response in the
    browser tab if there is a X-Redirect-By header with TYPO3 Redirect <uid> ?
  • Can you provide more context about your setup and configuration ?
  • Do you have other extensions in place doing redirects ?
  • Do you xclass something of the redirect extensions ? Or use a extension which
    changes core behaviour ?
  • Do you have any custom linkhandler/builder in place which may eventually build
    incorrect urls in redirect context ?

With >12 it's not possible to enter '/' as target path in the backend, stating
that folder is not allowedas target link. However, even entered directly in
the database do not lead to this redirect in 12/13.

Actions #2

Updated by Stefan Bürk 11 months ago

@Rafael Kähm Can you please provide more information how to properly reproduce this ?

Actions #3

Updated by Stefan Bürk 10 months ago

  • Status changed from Needs Feedback to Closed

Cannot be reproduced yet. Due to the lack of further information and no
reaction on question for more feedback, I'm closing this issue for now.

If you have more context the issue can be reopend. Let me know if it
was to early to close it.

Actions #4

Updated by Stefan Bürk 9 months ago

  • Status changed from Closed to New
Actions #5

Updated by Stefan Bürk 9 months ago

Rafael contacted me in slack. He emphasized that this
only happens in Firefox, whereas I tried to reproduce
this only in Chrome. Also had a small call with him.

Will redo the check again the next days, therefore
reopened the issue again.

Actions #6

Updated by Stefan Bürk 8 months ago

Tried again. Still can't reproduce this. Neither with FIREFOX as stated
in a additional communication nor using the solr ddev demo setup. It's
working - the redirect is executed, and in case of the solr page the
home start page is displayed and not a 404.

Actions #7

Updated by Gerrit Code Review 8 months ago

  • Status changed from New to Under Review

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

Actions #8

Updated by Gerrit Code Review 8 months ago

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

Actions #9

Updated by Gerrit Code Review 8 months ago

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

Actions #10

Updated by Gerrit Code Review 8 months ago

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

Actions #11

Updated by Stefan Bürk 8 months ago

  • Related to Bug #100958: Type error in reference index with invalid user input added
Actions #12

Updated by Gerrit Code Review 8 months ago

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

Actions #13

Updated by Gerrit Code Review 7 months ago

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

Actions #14

Updated by Gerrit Code Review 7 months ago

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

Actions #15

Updated by Gerrit Code Review 7 months ago

Patch set 1 for branch 11.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/+/81280

Actions #16

Updated by Stefan Bürk 7 months ago

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

Also available in: Atom PDF