Bug #101191
closedRedirects with regexp endabled and same urls, but one with additional query params matching the wrong one first
100%
Description
Example:
Need to match on two urls, each with different variants, that's why regexp is enabled, but one differs only by the query params from the other:
- /foo/(different_part)bar.html
- /foo/(different_part)bar.html?type=101
Created two regexp redirects records in this order (important):
- /\/foo\/(.*)bar.html$/ with target A
- /\/foo\/(.*)bar.html\?type=101/ with target B
With url 2 record 1 matches first, which is wrong. Record 2 should match first
If the redirect records are created the other way round it works correct, but this is not the solution.
IMO the foreach for the regexp redirects in RedirectService::matchRedirect needs to be run though twice, first with query and second one without, instead of a single run.
Updated by Gerrit Code Review 10 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/+/79967
Updated by Gerrit Code Review 10 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/+/79967
Updated by Gerrit Code Review 10 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/+/79967
Updated by Gerrit Code Review 10 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/+/79967
Updated by Gerrit Code Review 10 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/+/79967
Updated by Gerrit Code Review 10 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/+/79967
Updated by Gerrit Code Review 10 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/+/80056
Updated by Stefan Bürk 10 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 7f93a4baf6a18e3cd81c00fbb154b010e93ac15e.
Updated by Gerrit Code Review 10 months ago
- Status changed from Resolved to Under Review
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/+/80079
Updated by Stefan Bürk 10 months ago
- Status changed from Under Review to Resolved
Applied in changeset 1f1082b900ef98c63e95bc9a4baa5e66d97c76f6.