Bug #89090

No redirect loop prevention for slugs / redirects

Added by Sybille Peters 15 days ago. Updated 11 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2019-09-05
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

System

TYPO3 version 9.5.9

Possible Scenario 1 (realistic)

  1. Slug for page 15 is /something/other
  2. A redirect gets created to this page: /other -> t3://page?uid=15
  3. Now, the slug is changed fpr page 15 to /other
  4. The page redirects to itself (redirect loop). Not possible to access page at all

Possible scenario 2 (hypothetical, but may happen)

It is possible to enter redirects to the same page in the redirects module:

  1. Slug for page 15 is /other
  2. A redirect is entered: /other to t3://page?uid=79
  3. page /other is not accessible anymore because of redirect loop

Related issues

Related to TYPO3 Core - Feature #89115: Auto-create Redirects on Slug Changes Under Review 2019-09-09

Associated revisions

Revision 7de102ce (diff)
Added by Andreas Fernandez 14 days ago

[FEATURE] Add integrity check for redirects

A new Symfony command checks for redirects that may conflict with
existing and accessible sites. The command is schedulable and thus may be
created as a scheduler task.

Additionally, this patch comes with a report informing a backend user
about such conflicts.

Command:

./typo3/sysext/core/bin/typo3 redirects:checkintegrity [--site=some-site-identifier]

Resolves: #89090
Releases: master
Change-Id: Ide1bf0143ff55623cca268e6844e331805fb0178
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61627
Tested-by: Frank Nägler <>
Tested-by: TYPO3com <>
Tested-by: Richard Haeser <>
Reviewed-by: Frank Nägler <>
Reviewed-by: Richard Haeser <>

History

#1 Updated by Georg Ringer 15 days ago

There are no redirects created after slug change...

#2 Updated by Sybille Peters 15 days ago

The scenarios are about creating redirects manually.

#3 Updated by Gerrit Code Review 15 days ago

  • Status changed from New to Under Review

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/+/61627

#4 Updated by Gerrit Code Review 15 days 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/+/61627

#5 Updated by Gerrit Code Review 15 days ago

Patch set 7 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/+/61627

#6 Updated by Frank Naegler 14 days ago

Georg Ringer wrote:

There are no redirects created after slug change...

not yet... wait some days ;)

#7 Updated by Gerrit Code Review 14 days ago

Patch set 8 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/+/61627

#8 Updated by Sybille Peters 14 days ago

Frank, it would be interesting to know where this is going conceptually. If you can point me to information, that would be helpful (and also prevent other people from creating pointless issues, patches and extensions which "fix" the URL handling). Thanks.

There are some open questions / issues which might already be resolved, if I had a better idea of where the slug / redirects handling is going in TYPO3.

E.g. automatically creating redirects on slug changes.

In my experience, people do tend to change URLs and the tables will likely be bloated over time. So a good expiration and cleanup strategy would be useful. If someone changes the slug several times in a short period of time, you may want to replace the redirect and not create new ones. (For example someone chooses a slug which already existed, a "/something-1" gets created, gets changed again, etc.).

Currently, there is no possibility for editors to see existing slugs and redirects for a page and subpages. (in realurl this was possible) This results in people fumbling in the dark and possibly making bad choices for the slugs.

Also, the slug no longer depends on slug of parent, so long term the slugs will likely generally diverge. I heard something may be implemented, where you can choose to change slugs of subpages as well.

Also, I am not sure how to handle the permissions. You have to give editors permissions to the slugs so they can change them after page creation, but afterwards you may only want a few trusted users to be able to change slugs and access redirects. It might be useful to be able to protect the slug field for a page.

(I skimmed through the documentation and it is good, but does not answer all questions)

#9 Updated by Gerrit Code Review 14 days ago

Patch set 9 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/+/61627

#10 Updated by Gerrit Code Review 14 days ago

Patch set 10 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/+/61627

#11 Updated by Gerrit Code Review 14 days ago

Patch set 11 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/+/61627

#12 Updated by Gerrit Code Review 14 days ago

Patch set 12 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/+/61627

#13 Updated by Gerrit Code Review 14 days ago

Patch set 13 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/+/61627

#14 Updated by Andreas Fernandez 14 days ago

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

#15 Updated by Susanne Moog 11 days ago

  • Related to Feature #89115: Auto-create Redirects on Slug Changes added

#16 Updated by Susanne Moog 11 days ago

@Sybille: see related issue.

Also available in: Atom PDF