Bug #92540
closedTYPO3\CMS\Extbase\Annotation\Validate URL can break the server in certain cases
0%
Description
if i use URL-validation in my Model like this:
namespace Vendor/ExtKey/Domain/Model/MyModel;
...
/**
* Facebook
* @var string
* @TYPO3\CMS\Extbase\Extbase\Validate("Url")
*/
protected $facebook;
...
and if an URL such as "https://www.domain.tld _blank" is stored in the database (e.g. a TYPO3-Link notation), the server will crash - no TYPO3 error message!
With nginx Error:
HTTP 502 Bad Gateway
With Apache Error:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in C:\MAMP\htdocs\typo3_sources\typo3_src-10.4.7\typo3\sysext\extbase\Classes\Error\Result.php on line 244
expectation:
- Error handling of TYPO3 including log message.
- and best of all a validator or a parameter for the existing validator with which "TYPO3 links" can be considered.
Updated by Georg Ringer about 4 years ago
- Status changed from New to Needs Feedback
Thanks for creating the issue. How can this be reproduced? Can you provide a sample code?
Additionally, could you check if the memory issue comes from \TYPO3\CMS\Core\Utility\GeneralUtility::isValidUrl
? thanks
Updated by Christian Hackl about 4 years ago
I am quite sure that this comes from ::isValidUrl(), yes.
Well, the fastest way to reproduce this (i think) is to add the validator in the model with EXT:tt_address and the "www" field and manually add a corresponding wrong entry in the DB... then, try to call this entry in the FE. :)
Updated by Georg Ringer over 2 years ago
hey! i stumbled upon this issue and can't reproduce it anymore. can you retry as well in 12 or 11?
Updated by Riccardo De Contardi almost 2 years ago
- Status changed from Needs Feedback to Closed
No feedback since more than 90 days => closing this issue.
If you think that this is the wrong decision or experience the issue again and have more information about how to reproduce your problem, please reopen it or open a new issue with a reference to this one.
Thank you and best regards