Bug #22594
closedClass prefix problem in getUserObj and callUserFunction (t3lib_div)
100%
Description
In the t3lib_div class, methods getUserObj and callUserFunction actually check that classes/functions have a valid prefix.
The prefix can be "tx_", for TYPO3 extensions, or a prefix defined in the installTool, for user classes/functions (default value is "user_").
Those two methods should IMHO also allow the "Tx_" prefix (with a T in uppercase), as it is the prefix used when developing extensions with "extbase".
Actually, here's the condition:
if ($checkPrefix &&
self::isFirstPartOfStr(trim($funcRef),$checkPrefix) &&
self::isFirstPartOfStr(trim($funcRef),'tx_')
)
Should be something like:
if ($checkPrefix &&
self::isFirstPartOfStr(trim($funcRef),$checkPrefix) &&
!(self::isFirstPartOfStr(trim($funcRef),'tx_') || self::isFirstPartOfStr(trim($funcRef),'Tx_'))
)
Both method should be changed. Please see the attached patch.
(issue imported from #M14313)
Files
Updated by Chris topher over 14 years ago
Hi Jean-David,
do you know that you must send your patch to Core List to get your fix integrated in the next releases?
Check out http://typo3.org/teams/core/core-mailinglist-rules/
Updated by Peter Niederlag almost 14 years ago
BUGFIX-14313.patch solves this against current trunk by adding a strtolower()
Updated by Oliver Hader over 13 years ago
- Target version changed from 0 to 4.3.12
Updated by Mr. Hudson over 13 years ago
Patch set 1 of change Icb46d875fdf66eaf6f51367cf3ef5030c07a4128 has been pushed to the review server.
It is available at http://review.typo3.org/1609
Updated by Steffen Müller over 13 years ago
I used a more speaking subject in the git commit msg: "Allow Tx_ as class prefix in getUserObj and callUserFunction".
Please change the subject of the issue accordingly.
Updated by Mr. Hudson over 13 years ago
Patch set 2 of change Icb46d875fdf66eaf6f51367cf3ef5030c07a4128 has been pushed to the review server.
It is available at http://review.typo3.org/1609
Updated by Mr. Hudson over 13 years ago
Patch set 3 of change Icb46d875fdf66eaf6f51367cf3ef5030c07a4128 has been pushed to the review server.
It is available at http://review.typo3.org/1609
Updated by Mr. Hudson over 13 years ago
Patch set 4 of change Icb46d875fdf66eaf6f51367cf3ef5030c07a4128 has been pushed to the review server.
It is available at http://review.typo3.org/1609
Updated by Mr. Hudson over 13 years ago
Patch set 5 of change Icb46d875fdf66eaf6f51367cf3ef5030c07a4128 has been pushed to the review server.
It is available at http://review.typo3.org/1609
Updated by Anonymous over 13 years ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Applied in changeset 5f211331f3f68b9a4fb96624790e9f0c51ab79b2.
Updated by Ernesto Baschny over 13 years ago
- Status changed from Resolved to Under Review
It's still under review for 4.5:
Updated by Ernesto Baschny over 13 years ago
- Status changed from Under Review to Resolved
Also resolved for 4.5!
Updated by Steffen Gebert over 13 years ago
- Target version changed from 4.3.12 to 4.5.4
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed