Project

General

Profile

Actions

Bug #91547

closed

Unique slug building fallback is broken

Added by filigivuji filigivuji almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2020-05-31
Due date:
% Done:

100%

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

Description

SlugHelper.php contains three occasions of a loop like this:

        $counter = 0;
        while (!$this->isUniqueInSite( /* ... */
        ) && $counter++ < 100
        ) {
            /* ... */
        }
        if ($counter === 100) {
            /* ... */
        }

This loop is broken because the comparison uses post-increment, and in case no valid slug with a counter suffix is found, $counter will be 101, not 100.
Note that I didn't bother to try to reproduce this. Unless I'm overlooking something, I suppose this case has never been tested to begin with.

Affects master, 10.4 and 9.5.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #92563: Identical slugs: Appendix stops at "-100"Closed2020-10-14

Actions
Actions #1

Updated by Gerrit Code Review almost 4 years ago

  • Status changed from New 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/+/64623

Actions #2

Updated by Gerrit Code Review almost 4 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/+/64623

Actions #3

Updated by Gerrit Code Review over 3 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/+/64623

Actions #4

Updated by Gerrit Code Review over 3 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/+/64623

Actions #5

Updated by Gerrit Code Review over 3 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/+/64623

Actions #6

Updated by Gerrit Code Review over 3 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/+/64623

Actions #7

Updated by Gerrit Code Review over 3 years 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/+/64623

Actions #8

Updated by Stefan P over 3 years ago

Can this please be ported to v9 as well, not just master and 10?

All the big setups with hundreds domains and tenthousands of pages are just migrating now to v9 (because they rely on some stability and lots of communications and money). And v9 is sparkled with bugs in this routing/site area... We can't just "upgrade to v10"...

Actions #9

Updated by Gerrit Code Review over 3 years ago

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

Actions #10

Updated by Anja Leichsenring over 3 years ago

sorry, no backport to v9. Especially for the massive instances only now migrating to v9 we must keep this version as stable as possible. We must not risk this stability by backporting any more changes than absolutely necessary.

Actions #11

Updated by Anonymous over 3 years ago

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

Updated by Benni Mack over 3 years ago

  • Status changed from Resolved to Closed
Actions #13

Updated by Benni Mack about 3 years ago

  • Related to Bug #92563: Identical slugs: Appendix stops at "-100" added
Actions

Also available in: Atom PDF