[BUGFIX] Fix extension upload form
Submitting the extension upload form in the extension manager module, without adding an extension file, previously triggered an exception. Actually those exceptions should have been caught in the corresponding action and transformed into a flash message. This however did not happen because the catch block calls a method, which again throws an exception, in case no or an invalid file(name) is given. To fix this, a dedicated Exception is now being thrown when checking the file in checkFileName(). This is the first and most important check and should therefore be handled independently. This means, no further code, especially when relying on the submitted file, should be executed when this exception was caught. As an UX improvement, the "required" attribute is added to the file input field, preventing unintended submitting of the form before an extension file was added. Resolves: #94183 Releases: master, 10.4 Change-Id: I9a8b34f2123f14529b984cc2672215420804075b Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69225 Tested-by:core-ci <typo3@b13.com> Tested-by:
Daniel Goerz <daniel.goerz@posteo.de> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Daniel Goerz <daniel.goerz@posteo.de> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Oliver Bartsch <bo@cedev.de>
Showing
- typo3/sysext/extensionmanager/Classes/Controller/UploadExtensionFileController.php 6 additions, 3 deletions...ager/Classes/Controller/UploadExtensionFileController.php
- typo3/sysext/extensionmanager/Classes/Exception/InvalidFileException.php 25 additions, 0 deletions...tensionmanager/Classes/Exception/InvalidFileException.php
- typo3/sysext/extensionmanager/Resources/Private/Templates/UploadExtensionFile/Form.html 1 addition, 1 deletion...Resources/Private/Templates/UploadExtensionFile/Form.html
Please register or sign in to comment