Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joomla Upgrades cleans temp directory path too aggressively #36320

Open
GeraintEdwards opened this issue Dec 15, 2021 · 2 comments
Open

Joomla Upgrades cleans temp directory path too aggressively #36320

GeraintEdwards opened this issue Dec 15, 2021 · 2 comments

Comments

@GeraintEdwards
Copy link
Contributor

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

@GeraintEdwards
Copy link
Contributor Author

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

@brianteeman
Copy link
Contributor

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

@Hackwar Hackwar added the bug label Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants