[BUGFIX] Handle missing image dimensions gracefully
Just like SvgImageProcessor, DeferredBackendImageProcessor now also catches the exception, which is thrown, when image dimensions equal zero and falls back to 64x64 image dimension. This enables editors to correct bad image cropping without the need to do it in the database. To be more specific, a new Exception ZeroImageDimensionException is added, which is used in both processors now. The image cropping editor is already fixed to only allow a minimum dimension of 10x10. However, already corrupted files can not be accessed without this patch. Resolves: #93807 Related: #99943 Releases: main, 12.4, 11.5 Change-Id: I259c365052dd02110d43418ba48b768bbe073fc1 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81133 Reviewed-by:Stefan Bürk <stefan@buerk.tech> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
core-ci <typo3@b13.com>
Showing
- typo3/sysext/backend/Classes/Resource/Processing/DeferredBackendImageProcessor.php 7 additions, 1 deletion...ses/Resource/Processing/DeferredBackendImageProcessor.php
- typo3/sysext/core/Classes/Imaging/Exception/ZeroImageDimensionException.php 28 additions, 0 deletions...Classes/Imaging/Exception/ZeroImageDimensionException.php
- typo3/sysext/core/Classes/Imaging/ImageDimension.php 2 additions, 1 deletiontypo3/sysext/core/Classes/Imaging/ImageDimension.php
- typo3/sysext/core/Classes/Resource/Processing/SvgImageProcessor.php 2 additions, 1 deletion...xt/core/Classes/Resource/Processing/SvgImageProcessor.php
Please register or sign in to comment