User tests: Successful: Unsuccessful:
Pull Request for Issue #15542. Replaces PR #15576
Pinging @mbabker @wilsonge @PhilETaylor
# WRONG FILE
# RIGHT FILE
ATTENTION! Major caveat testing the fix. If you try to install an existing update to Joomla! you will NOT be able to confirm the fix. That's because restore.php
will be overwritten during the update, therefore the old, not fixed version of the file will be read by PHP when Joomla! Update runs the finalization step. As a result the issue will occur all over again. You must test using a doctored update ZIP file which DOES NOT contain the administrator/components/com_joomlaupdate
folder.
The .htaccess file is the right one, i.e. the one with the line # RIGHT FILE
The .htaccess file is the wrong one, i.e. the one with the line # WRONG FILE
You may need to tell affected parties to install the new com_joomlaupdate version prior to updating to the next version of Joomla!.
The first change in the model (telling Akeeba Restore not to rename files) is inconsequential to how Joomla! Update works and has no effect on this issue as far as official Joomla! update ZIP files go. This Akeeba Restore feature renames files included in the ZIP archive, as they are extracted. It does not apply to files already on disk. That is to say, if Joomla! were to include a file named .htaccess
in the ZIP archive it would be extracted as htaccess.bak
. Since Joomla! does not ship such files in the update ZIP file this code has no effect. So why did I add the relevant parameter in the model to disable this feature? Simply put, to prevent any good intentioned but inadvertently confused developers from wasting their time trying to fix an issue that's not there :)
You do need to install a new com_joomlaupdate version if you are affected by this issue and you MUST only update to a version of Joomla! that includes this fix as well. That's because the fix is a two pronged solution. One end lies in restore.php
itself which is overwritten by the update, hence the need to use an update package that includes this fix. The other end lies in the Joomla! Update Model itself which creates the restoration.php
file before extracting the update. Therefore the Model needs to be update before running the Joomla! update itself.
My commits are signed with my public GPG key. Click on the Verified badge to see they key hash. You can verify the key hash with the public, verified copy of my key at https://keybase.io/nikosdion
Category | ⇒ | Administration com_joomlaupdate |
Status | New | ⇒ | Pending |
(thinking out aloud) To avoid further confusion - and pain - that this is a third party file should it perhaps other have a comment in it that changes should be submitted upstream OR placed in a vendor folder?
Unlike libraries, by its very nature, this file needs to be web accessible. Therefore it cannot be in the vendor folder which could, in theory, be moved outside the web root. Same goes for the libraries folder, it can be moved. Also, moving the file around would cause upgrade woes and require everyone using a security enhanced server configuration file to remove the exception for the old location and add an exception for the new one. This is busywork.
Moreover, a comment cannot be placed on that file since it's third party. A comment would make it into my own software which makes no sense. Instead, the file has a very clear Copyright header which states it's copyrighted by Akeeba Ltd, not OSM. That should be hint enough. I mean, isn't this the same arrangement with libraries/fof anyway? Or PHPmailer since the Mambo days? All that's necessary is common sense.
The thing about common sense is that its not very common ;)
anyway it was just an idea - but as you point out its probably not technically possible
Labels |
Added:
?
|
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-07-30 16:53:54 |
Closed_By | ⇒ | mbabker |
Checked all the comment changes - typo fixes are all good - thanks