? ? Failure

User tests: Successful: Unsuccessful:

avatar richard67
richard67
1 Jul 2020

Pull Request for Issue # .

Summary of Changes

This Pull Request (PR) adds a missing return statement to the upload function in file administrator/components/com_joomlaupdate/controllers/update.php.

This fixes the issue that a 403 "Not allowed" error happens when an exception is raised by the Joomla Update Component's Upload & Update function when uploading a file fails for some reason.

The issue is valid for J4, too, and will be fixed in J4 when this PR has been merged into staging and later that has been merged up into 4.0-dev.

Testing Instructions

Code review should be enough, but if you want to make a real test ...

  1. On a clean current staging or recent 3.9 nightly build or a 3.9.19, login to backend and go to "Components -> Joomla Update".

  2. Go to tab "Upload & Update" and select zip file with zero byte size for upload.

Hint: You can create a zero size zip file as follows:

  • On Linux touch test.zip
  • In Windows Command Shell (CMD) copy nul test.zip

Result: See section "Actual result BEFORE applying this Pull Request" below.

  1. Apply the patch of this PR.

  2. Repeat steps 1 and 2.

Result: See section "Expected result AFTER applying this Pull Request" below.

Actual result BEFORE applying this Pull Request

First a 403 "Access forbidden" error is shown.
snap_1

After that when navigating or using the "Back to Control Panel" button, the alert with the exception message is shown.
pr-29881_1

Hint: The not translated language string will be solved with PR #29899 .

Expected result AFTER applying this Pull Request

The alert with the exception message is shown on the Joomla Update Component page. There is no 403 "Access forbidden" error.
pr-29881_2

Documentation Changes Required

None.

Additional information

When doing the test with one of the language strings COM_INSTALLER_MSG_... used in one of the exceptions thrown in that function, you will see that these language strings are not trantlated. This is a separate issue not within the scope of this PR. I will later check if there is already an issue or not.

What remains to be clarified is: Shall we make com_joomlaupdate load the strings from com_installer, or shouldn't we better duplicate the necessary strings into the com_joomlaupdate language file and change their name so we have COM_JOOMLAUPDATE_MSG_...? @infograf768 What do you think?

avatar richard67 richard67 - open - 1 Jul 2020
avatar richard67 richard67 - change - 1 Jul 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 1 Jul 2020
Category Administration com_joomlaupdate
avatar richard67 richard67 - change - 1 Jul 2020
The description was changed
avatar richard67 richard67 - edited - 1 Jul 2020
avatar richard67 richard67 - change - 1 Jul 2020
The description was changed
avatar richard67 richard67 - edited - 1 Jul 2020
avatar chmst chmst - test_item - 4 Jul 2020 - Tested successfully
avatar chmst
chmst - comment - 4 Jul 2020

I have tested this item successfully on 6c16fef


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

avatar HLeithner
HLeithner - comment - 4 Jul 2020

Works for me, you can test it with a 0 byte .zip file, then you don't need to modify and files in j!

avatar richard67 richard67 - change - 4 Jul 2020
The description was changed
avatar richard67 richard67 - edited - 4 Jul 2020
avatar richard67
richard67 - comment - 4 Jul 2020

Works for me, you can test it with a 0 byte .zip file, then you don't need to modify and files in j!

@HLeithner Thanks, I've updated testing instructions accordingly.

avatar richard67 richard67 - change - 4 Jul 2020
The description was changed
avatar richard67 richard67 - edited - 4 Jul 2020
avatar richard67 richard67 - change - 4 Jul 2020
The description was changed
avatar richard67 richard67 - edited - 4 Jul 2020
avatar richard67
richard67 - comment - 4 Jul 2020

@HLeithner Was that a good test from you? If yes, shall I set the test result in the tracker, or will you do that?

avatar degobbis degobbis - test_item - 4 Jul 2020 - Tested successfully
avatar degobbis
degobbis - comment - 4 Jul 2020

I have tested this item successfully on 6c16fef


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

avatar degobbis
degobbis - comment - 4 Jul 2020

I have tested this item successfully on 6c16fef


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

avatar richard67 richard67 - change - 4 Jul 2020
The description was changed
avatar richard67 richard67 - edited - 4 Jul 2020
avatar richard67 richard67 - change - 4 Jul 2020
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 4 Jul 2020

RTC


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

avatar richard67 richard67 - change - 4 Jul 2020
Labels Added: ? ?
avatar richard67
richard67 - comment - 4 Jul 2020

Thanks for testing ?

avatar richard67
richard67 - comment - 4 Jul 2020

By the way, the issue fixed by this PR here is valid for J4, too, and will be fixed in J4 when this PR has been merged into staging and later that has been merged up into 4.0-dev.

avatar richard67 richard67 - change - 4 Jul 2020
The description was changed
avatar richard67 richard67 - edited - 4 Jul 2020
avatar rdeutz rdeutz - close - 18 Jul 2020
avatar rdeutz rdeutz - merge - 18 Jul 2020
avatar rdeutz rdeutz - change - 18 Jul 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-07-18 11:03:22
Closed_By rdeutz
Labels

Add a Comment

Login with GitHub to post a comment