? ? Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
25 Jul 2020

Pull Request for Issue #27494 (comment).

Requires PR #29895 for the language strings.

Summary of Changes

This Pull Request (PR) is a back port of PR #27665 from 4.0-dev.

It adds a check if the selected file is too big to be uploaded with respect to the PHP limits to the "Upload & Install Package" tab of the Extensions Installer.

If the user tries to upload a file which is too big, the upload is rejected with an appropriate browser alert message.

Testing Instructions

Requirements:
PR #29895 for the language strings.

Procedure:

  1. Apply the patch of this PR and also the patch of PR #29895 .
  2. Go to administrator/index.php?option=com_installer&view=install and there to tab "Upload Package File".
  3. Drag to the drag and drop area a file which is too big compared to the maximum upload size shown below the file selection.
    Hint: This can be any file, it doesn't necessarily have to be a valid extension package.
    Result: See screenshot in section "Expected result" below. A browser alert is shown telling that the file can't be uploaded because it's too big. The upload is not started.
  4. Select a file which is too big, using the "Or browse for file" button.
    Result: Same as in previous step. A browser alert is shown telling that the file can't be uploaded because it's too big.
  5. Drag to the drag and drop area a file which is not too big compared to the maximum upload size shown below the file selection.
    Result: Uploading of not too big package file using drag and drop still works as well as without this PR.
  6. Finally select another package file which is not too big, using the "Or browse for file" button, and verify that uploading still works.
    Result: Uploading of not too big package file using the "Or browse for file" button still works as well as without this PR.

Actual result BEFORE applying this Pull Request

  • If post_max_size is big enough but upload_max_size is violated:
    j3-pr-30190-upload-max-filesize-violated

  • If upload_max_size is big enough but post_max_size is violated:
    There is no error shown in backend if display errors is off in PHP config.
    In the PHP log file (if log_errors is switched on in PHP config):
    PHP Warning: POST Content-Length of 24829262 bytes exceeds the limit of 16777216 bytes in Unknown on line 0, referer: https://www.joomla.vmkubu02.vmnet2.local/administrator/index.php?option=com_installer

Expected result AFTER applying this Pull Request

Broswer alert when trying to upload too big file:
j3-pr-30190-alert-after-patch

Documentation Changes Required

None.

avatar richard67 richard67 - open - 25 Jul 2020
avatar richard67 richard67 - change - 25 Jul 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 Jul 2020
Category Front End Plugins
avatar richard67 richard67 - change - 25 Jul 2020
The description was changed
avatar richard67 richard67 - edited - 25 Jul 2020
avatar richard67 richard67 - change - 25 Jul 2020
The description was changed
avatar richard67 richard67 - edited - 25 Jul 2020
avatar richard67 richard67 - change - 25 Jul 2020
The description was changed
avatar richard67 richard67 - edited - 25 Jul 2020
avatar richard67 richard67 - change - 25 Jul 2020
The description was changed
avatar richard67 richard67 - edited - 25 Jul 2020
avatar richard67 richard67 - change - 25 Jul 2020
The description was changed
avatar richard67 richard67 - edited - 25 Jul 2020
avatar richard67 richard67 - change - 25 Jul 2020
Title
[WiP] Add upload file size check to Extensions Installer Upload & Install Package
Add upload file size check to Extensions Installer Upload & Install Package
avatar richard67 richard67 - edited - 25 Jul 2020
avatar unmk28
unmk28 - comment - 3 Aug 2020

tested successfully

avatar richard67
richard67 - comment - 4 Aug 2020

@unmk28 Please mark your test result on the issue tracker by going to https://issues.joomla.org/tracker/joomla-cms/30190, using the "Test this" button, selecting the right test result and submitting. Thanks in advance.

avatar pabloarias pabloarias - test_item - 6 Aug 2020 - Tested successfully
avatar pabloarias
pabloarias - comment - 6 Aug 2020

I have tested this item successfully on 2b7ab6e

I have followed all steps to test this path and it works fine. Thank you!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30190.

avatar richard67
richard67 - comment - 6 Aug 2020

@unmk28 Again a reminder: Please mark your test result on the issue tracker by going to https://issues.joomla.org/tracker/joomla-cms/30190, using the "Test this" button, selecting the right test result and submitting. Thanks in advance.

avatar richard67
richard67 - comment - 6 Aug 2020

@pabloarias Thanks for testing.

avatar pabloarias
pabloarias - comment - 6 Aug 2020

Thank you @richard67 for your work!

My test was done with Joomla 3.9.21-dev


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30190.

avatar Quy Quy - test_item - 6 Aug 2020 - Tested successfully
avatar Quy
Quy - comment - 6 Aug 2020

I have tested this item successfully on 2b7ab6e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30190.

avatar Quy Quy - change - 6 Aug 2020
Status Pending Ready to Commit
avatar Quy
Quy - comment - 6 Aug 2020

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30190.

avatar richard67
richard67 - comment - 6 Aug 2020

Thanks for testing.

avatar richard67 richard67 - change - 6 Aug 2020
Labels Added: ? ?
avatar HLeithner HLeithner - change - 17 Aug 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-08-17 11:24:42
Closed_By HLeithner
Labels
avatar HLeithner HLeithner - close - 17 Aug 2020
avatar HLeithner HLeithner - merge - 17 Aug 2020
avatar HLeithner
HLeithner - comment - 17 Aug 2020

Thanks

avatar richard67
richard67 - comment - 17 Aug 2020

Thanks.

Add a Comment

Login with GitHub to post a comment