Project

General

Profile

Actions

Bug #93105

closed

PersistedPatternMapper / PersistedAliasMapper: URL generation with arguments with leading numbers can lead to exceptions or wrong URLs

Added by B. Kausch over 3 years ago. Updated 9 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Start date:
2020-12-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint

Description

What I will describe can happen with both PersistedPatternMapper and PersistedAliasMapper.

How can it happen?

We can take the examples of the API docs as a base. Let us set the parameter news_title to /30-pigs-are-in-the-house . If I try to generate an url with this, the generation process will call the method findByIdentifier. See here.

The value will be 30-pigs-are-in-the-house. A row with uid=30 exists in table tx_news_domain_model_news. So this method will find this row and take the path_segment of this row as the new value of news_title. This can't be expected behavior.

The same can happen in PersistedPatternMapper. See here.

How can it be fixed?

In both findByIdentifier methods we should check if the value is numeric to migigate the effects of arguments starting with numbers.

Actions

Also available in: Atom PDF