User tests: Successful: Unsuccessful:
In UpdateModel of the Joomla Update component, we are doing some write operations on the filesystem as preparation before unpacking the update package. This code contains some unnecessary steps and is missing error handling.
Going through the changes one by one:
File::delete()
now checks if the file exists first and otherwise throws an exception. Thus we either have to wrap it in is_file()
or catch the exception.File::delete()
does the same as unlink()
now and already does the opcache invalidation.This code change resulted from manual code review and is not based on a specific error condition. Simply said, updating Joomla should still work the same as before.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Category | ⇒ | Administration com_joomlaupdate |
Status | New | ⇒ | Pending |
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-07-01 10:35:08 |
Closed_By | ⇒ | HLeithner | |
Labels |
Added:
PR-5.0-dev
|
Should be easier to test this when it's in nightlies
@Hackwar I think the same applies to deleting files and folders on update in script.php. Of course something for another PR. Is that right?
Update: I see we have already an is_file check there for the files so that should be ok. Not sure about the folders, will check later.