Project

General

Profile

Actions

Bug #103948

open

Route with multiple / at the beginning is allowed and leads to duplicate content

Added by Georg Ringer 6 months ago. Updated 5 months ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2024-05-29
Due date:
% Done:

0%

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

Description

having a valid page https://domain.ddev.site/imprint is fine but IMHO https://domain.ddev.site////imprint should lead to page a not found error and not showing the imprint page?

the canonical is however fine and shows only one /

Actions #1

Updated by Georg Ringer 6 months ago

  • Description updated (diff)
Actions #2

Updated by Georg Ringer 6 months ago

  • Status changed from New to Accepted

Benjamin Franzke
vor 24 Stunden
thats a bug.
(likely caused by a ltrim(…, '/') eating all leading slashes, not just one) (bearbeitet)

Benjamin Franzke
vor 24 Stunden
e.g https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/Routing/PageRouter.php#L302 or https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/Routing/PageRouter.php#L451 or … (there are probably a dozen places – will be hard to fix, without breaking something else) (bearbeitet)

Actions #3

Updated by Stefan Bürk 6 months ago

Not trivial. And on the other hand, at least "apache2" acts exactly the same for plain files like images.
Multiple / in the path still delivers the image. Not checked on other webservers.

And it is not a simple ltrim issue .. it is also related to the site base / path (trail) splitt resolving
and others + the fact that due to a lot of "mess around bugfixes to support different invalid data" this
got even harder to gasp.

Needs a honnest review through the whole stack. And for non-php/typo3 handled paths we cannot fix it anyway
and server configuration needs to be used anyway (for example some .htaccess rules for apache in case of fal
storages like fileadmin).

Actions #4

Updated by Mogens Fiebrandt 5 months ago

Same issue was mentioned in the german-group on Slack:
https://typo3.slack.com/archives/C06EWCBP0/p1718273654123319

The problem was solved with an redirect in htaccess:
https://typo3.slack.com/archives/C06EWCBP0/p1718273654123319

or

https://typo3.slack.com/archives/C06EWCBP0/p1718275829844829

Maybe this could be added to the root-htaccess in Ext:install ?

Actions

Also available in: Atom PDF