Skip to content
Snippets Groups Projects
Commit c869c8ba authored by Stefan Bürk's avatar Stefan Bürk Committed by Christian Kuhn
Browse files

[BUGFIX] Fix too long regular expression error in ContentObjectRenderer

Text cropping on texts with way more than 1000 characters
triggers regular expression compilation errors.
The sweet spot was determined to a value of max 962 characters,
thus leading to internal 'preg_match' error state and throwing
'Compilation failed: regular expression is too large' warning.

The patch crops text in multiple chunks and reassembles the
chunks until crop position was reached to avoid this internal
error exceeding the max regular expression pattern length.

Further tests are added to cover this scenario.

Resolves: #77642
Releases: master, 10.4
Change-Id: I15b778370df0d0a3d3087a0b199c3e16f7a46add
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72048


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarNikita Hovratov <nikita.h@live.de>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarNikita Hovratov <nikita.h@live.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 6359edb1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment