Bug #97337
closed
Empty $trustedProperties cause a PHP warning
Added by Marc Hirdes over 2 years ago.
Updated 4 months ago.
Description
In extbase/Classes/Mvc/Controller/MvcPropertyMappingConfigurationService.php line 144
$trustedProperties = json_decode($serializedTrustedProperties, true);
foreach ($trustedProperties as $propertyName => $propertyConfiguration) {
We get a PHP warning in our error log:
Core: Error handler (FE): PHP Warning: Invalid argument supplied for foreach() in typo3/sysext/extbase/Classes/Mvc/Controller/MvcPropertyMappingConfigurationService.php line 154
This fills the error log of a customer page. The page is attacked weekly, but at the moment this is the only problem.
The solution would be to provide an empty array for the foreach loop.
- Assignee set to Thomas Hohn
- Target version set to Candidate for patchlevel
- Status changed from New to Under Review
Hi @Marc Hirdes
We need more information about this issue.
Does it still occur?
Could the encryptionKey have been exposed - it could seem so since it has passed the various checks for if the HMAC
is valid?
How does the payload look?
You can email it to me at tho@gyldendal.dk - If you are not interested in exposing it here
The issue was reported against TYPO3 v10, which uses json encoded trusted properties.
TYPO3 v9 used (un)serialized content for extbase trusted properrties. This could be the reason for the invalid payload.
In combination with stuff like config.sendCacheHeaders it is likely that warning occured after the update, when a (user)cached page has been visited that contained serialized trusted properties.
Can you confirm, that the warning happened shortly after an update from TYPO3 v9 to v10 (and that you use browser caching via config.sendCacheHeaders (like for example bootstrap_package does))?
- Has duplicate Bug #101525: foreach() argument must be of type array|object, null given in MvcPropertyMappingConfigurationService.php added
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF