Bug #91547
closedUnique slug building fallback is broken
100%
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.
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 4 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
Updated by Gerrit Code Review over 4 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
Updated by Gerrit Code Review over 4 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
Updated by Gerrit Code Review over 4 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
Updated by Gerrit Code Review over 4 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
Updated by S P over 4 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"...
Updated by Gerrit Code Review about 4 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
Updated by Anja Leichsenring about 4 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.
Updated by Anonymous about 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 9cacae70d6d6d906639283c32ab87a0f0f7bdf35.
Updated by Benni Mack almost 4 years ago
- Related to Bug #92563: Identical slugs: Appendix stops at "-100" added