No Code Attached Yet bug
avatar GeraintEdwards
GeraintEdwards
15 Dec 2021

Joomla\Component\Joomlaupdate\Administrator\Model\UpdateModel in Joomla 4.0.5 "cleans" the temp directory from the global configuration but does this in a VERY AGGRESSIVE way which causes some site installations to fail their upgrades.

The issue is that some dotted and/or hidden paths cause the cleaned path to be empty and for Joomla to fall into an infinite loop.

Steps to reproduce the issue

There are a few ways to demonstrate the issue:

  1. Install Joomla 4.0.4 on suitable server and perform upgrade to 4.0.5

1.a. This must be done on a *nix server where the subdomain path looks like /var/www/vhosts/website.net/subdomain.website.net (the dotted path is important!).
1.b. Install Joomla in a hidden folder such as ._hideMe
1.c. check that the tmp directory is something like /var/www/vhosts/website.net/subdomain.website.net/._hideMe/tmp
1.d. Try to upgrade Joomla to 4.0.5

  1. Set hidden tmp directory subdomain site and perform upgrade to 4.0..5

2.a. This must be done on a *nix server where the subdomain path looks like /var/www/vhosts/website.net/subdomain.website.net (the dotted path is important!).
2.b. Install Joomla as normal
2.c. Use a hidden path for the tmp directory something like /var/www/vhosts/website.net/subdomain.website.net/._hideMe/tmp - you will need to create these folders on the server
2.d. Try to upgrade Joomla to 4.0.5

  1. Simpler demonstration of the cause of the problem

3.a. Install special module from https://www.yoursites.net/mod_tempdir.zip and set it to display on your Joomla 4.0.5+ site
3.b. configure the advanced tab of the module with a temp directory such as /var/www/vhosts/website.net/subdomain.website.net/._hideMe/tmp
3.c view the module in the frontend

Expected result

  1. Joomla upgrade succeeds
  2. Joomla upgrade succeeds
  3. You should see module output such as

Cleaned module based temp directory /var/www/vhosts/website.net/subdomain.website.net/._hideMe/tmp
Uncleaned module based temp directory /var/www/vhosts/website.net/subdomain.website.net/._hideMe/tmp

Actual result

  1. Upgrade fails with infinite recursion error in filesystem library
  2. Upgrade fails with infinite recursion error in filesystem library
  3. You actually see module output such as

Cleaned module based temp directory /var/www/vhosts/website.net/subdomain.website.net/._hideMe/tmp
Uncleaned module based temp directory

In other words the cleaned path is empty

avatar GeraintEdwards GeraintEdwards - open - 15 Dec 2021
avatar joomla-cms-bot joomla-cms-bot - change - 15 Dec 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Dec 2021
avatar GeraintEdwards
GeraintEdwards - comment - 16 Dec 2021

Please see issue raised in Framework filter corresponding to this problem joomla-framework/filter#51

avatar brianteeman
brianteeman - comment - 15 Apr 2022

As this is a frameework issue and there is an issue created theere does this need to still be open?

avatar Hackwar Hackwar - change - 22 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 22 Feb 2023

Add a Comment

Login with GitHub to post a comment