? ? NPM Resource Changed
avatar richard67
richard67
1 Jul 2020

Pull Request for Issue #29763 (comment) (at least partly).

Summary of Changes

This Pull Request (PR) adds a check of the file name extension (or suffix) to the Upload & Install function of the Extensions Installer.

Currently only zip files work with Upload & Install, and so this PR will only allow files with extension (or suffix) ".zip" (case insensitive). If later more formats (".tar.gz", ".tar.bz2", ...) will be supported, the regular expression used for this new check can be easily extended by the new suffixes (has to be done at 2 places), or a server side check could check for the availability of the particular PHP modules and pass the regular expression to the js e.g. with a data- attribute or a hidden input field.

Important: This is NOT a security fix, it only shall prevent from accidently selecting the wrong file for upload and then having to wait until the upload completes just for getting an error message which is not really user friendly when unpacking the file fails. Further server-side checks, e.g. by mime type or checks of the content) have to be implemented separate from this PR with some future PR(s).

Testing Instructions

Will be added soon. Until this has been done I will leave this PR in draft status. As soon as draft status will be removed, the PR can be tested.

Actual result BEFORE applying this Pull Request

Will be added soon.

Expected result AFTER applying this Pull Request

Will be added soon.

Documentation Changes Required

None.

avatar richard67 richard67 - open - 1 Jul 2020
avatar richard67 richard67 - change - 1 Jul 2020
Build staging 4.0-dev
avatar richard67 richard67 - change - 1 Jul 2020
Category Administration com_installer JavaScript Language & Strings NPM Change Repository
avatar richard67 richard67 - change - 1 Jul 2020
Labels Added: ? ? NPM Resource Changed
avatar richard67 richard67 - change - 1 Jul 2020
Status New Pending
avatar richard67 richard67 - change - 1 Jul 2020
Title
[4.0] Add upload file name extension check to com_installer's Upload & Install function
[4.0] Add upload file name extension check to com_installer's Upload & Install function (1st attempt)
avatar richard67 richard67 - edited - 1 Jul 2020
avatar joomla-cms-bot joomla-cms-bot - change - 1 Jul 2020
Category Administration com_installer JavaScript Language & Strings NPM Change Repository Administration Language & Strings JavaScript Repository NPM Change Front End Plugins
avatar richard67
richard67 - comment - 1 Jul 2020

It seems the issue tracker doesn't recognize this PR as a PR but thinks it is an issue. Test buttons are missing. I close it and make it again with a new PR.

Add a Comment

Login with GitHub to post a comment