Support

Admin Tools

#40914 J! Update Failure

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
5.1.1
PHP version
8.1.29
Admin Tools version
7.5.4

Latest post by nicholas on Saturday, 20 July 2024 06:24 CDT

enclavecoa

Today, I attempted to update Joomla from v5.1.1 to v5.1.2 and it subsequently failed (see attached screenshot). My quest: is there something in .htaccess maker that would cause this error?

If memory serves me, I've gotten this error before and all I did was replace the .htaccess which was generated with a "plain vanilla" version of the file long enough to accomplish the update.

Β 

I'm attempting to include my .htaccess file after I Saved the ticket but I I cannot find a way to do that.

enclavecoa

My current .htaccess file is attached below.

nicholas
Akeeba Staff
Manager

This happens because you have removed one of the defaults in the .htaccess Maker configuration.

Go to administrator, Components, Admin Tools for Joomla!, Control Panel, .htaccess Maker.

Find the Allow direct access to these files setting and add a new line reading administrator/components/com_joomlaupdate/extract.php

Click on Save and Create .htaccess

Don't remove this line from your .htaccess Maker configuration again. Direct access to the extract.php file is safe. Not only it's part of Joomla! itself, it's a file I contributed myself to the Joomla! project, having taken into account all the security failure modes it could suffer. It's designed to only accept very specific requests protected by a temporary password for a limited period of time between finishing the download of an update package, and having finished extracting it. When it finishes extracting the update package, it deactivates itself automatically. That's why it's allowed by default in the .htaccess Maker configuration.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

enclavecoa

Nicholas:

I had not removed the directive that you state above from my .htaccess maker. As a matter of fact, I went back into .htaccess maker as you directed above, and I did verify that the file you mention IS in the "Allow direct access to these files" section. I then saved and created a new .htaccess file. At this point, I tried the Joomla Update again. It failed once again with the same error message. I don't know what is going on, but your instructions didn't seem to solve the problem. I'm attaching a screenshot and the newly geneterated .htaccess file.

My .htaccess file was allowed because I have an invalid charater in the name "." I'm going to rename it and send it as a reply to this post.

enclavecoa

New name is htaccess.txt

nicholas
Akeeba Staff
Manager

Based on this information and the contents of the file, the problem is unrelated to Admin Tools per se. It is, however, related to the "Custom rules to add at the top of the file" you put yourself in the .htaccess Maker.Β It's all wrong. Let's take it step by step:

RewriteEngine On

Redundant. Remove it.

RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(www\.)?enclave-coa\.org$ [NC]
RewriteRule ^(.*)$ https://enclave-coa.org/$1 [L,R=301]

This interferes with HSTS, the www to non-www redirection etc. This could indeed be causing your problem. Remove it.

Header always set Content-Security-Policy "upgrade-insecure-requests;"

This is wrong and could be contributing to your problem. Remove it. Instead, use the HSTS feature in the .htaccess Maker. That's the correct way to do it. HSTS tells the browser "hey, don't ever try to contact this domain over plain old HTTP even if the user explicitly asks you to do that". Therefore, HSTS can work around downgrade attacks in browsers. The header you added does not do that; HTTP access will take place every time, which might be enough to steal some cookies.

Speaking of cookies, Joomla's cookies will not be set up to be HTTPS-only unless you go into your Global Configuration and set Force HTTPS to Entire Site. Only then will Joomla's cookies be impossible to steal with an HTTP downgrade attack.

So, remove this ineffective and problematic line. Set Force HTTPS to Entire Site in Joomla's Global Configuration. Enable HSTS in Admin Tools' .htaccess Maker (and generate a new .htaccess). You will be fixing two problems, one you knew you had, and a more important one you did not know you have.

RewriteRule ^sucuri-(.*)\.php$ - [L]
RewriteRule ^\.sucuri-(.*)\.php$ - [L]
RewriteRule ^cloner.php$ - [L]

This is dangerous! OMG, is this what Sucuri tells you to add to your .htaccess?! 😱 It tells your server that if there's a .php file in your site's root whose name starts with sucuri- it should be immediately and fully trusted, skipping over all the protection put in place by Admin Tools. I strongly recommend against it. Ask them for a list of filenames you should explicitly allow and add them to "Allow direct access to these files" instead.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

enclavecoa

Hi Nicholas:

I implemented the changes to the "Custom rules to add at the top of the file" in the htaccess Maker that you suggested above WITH THE EXCEPTION of the RewriteRules for sucuri and cloner that you suggested. After the changes, I was able to update Joomla to version 5.1.2. So, that's a good thing.

I did put in a ticket with GoDaddy regarding your suggestions. Here is what they had to say. What do you suggest at this point. Should I remove the "sucuri-" rules and leave the "cloner-" rule (I do use their backup process but rarely request a malware review.

Pre-header copy goes here.

GD_logo_2016_locale.png

Ticket update

Your support ticket has been updated.

Update details:

Ticket:

17210716801088

Subject:

RewriteRule for SECURI- and CLONER-

By:

Β 


Message:

Hello;Β 

Thank you for contacting us.Β 

Once the backup or the malware process is initiated, our automated tool uploads files to the site root directory to create the backup or perform malware cleanup.Β 

These .htaccess file rules do not cause issues with your site's functionality or performance. Unfortunately, we do not provide the exact names of each file as they may change in some cases.

If the file names are altered, it may disrupt the operation, so the rules are added to allow files with names starting with "sucuri-".Β If you wish to remove the rules, you can delete the "sucuri-" rule, as it is required when you initiate a malware removal ticket. If the site does not allow the files when a malware removal ticket is created, our support team will add the necessary code at that time.Β 

For the backup process, please ensure that the cloner.php file is allowed, as it is required for the backup.Β 

Please reply to this ticket once you have made the adjustments to the .htaccess file so that we can review the website monitoring, backup, and firewall services again.Β 

Due to the nature of this case, we will place this ticket in "Waiting For User" status until we hear back from you.Β 

Best regards,Prignesh

Β 

This message is automatically generated.

Website Security Powered by Sucuri

Copyright Β© 1999-2017 GoDaddy Operating Company, LLC. 14455 N. Hayden Rd, Ste. 219, Scottsdale, AZ 85260, USA. All rights reserved.

nicholas
Akeeba Staff
Manager

Your first mistake was using GoDaddy for hosting. There are oh-so-many reasons people – especially web software developers – call them "NoDaddy". I guess you fell victim to their relentless advertising like so many others.

GoDaddy's attitude to security is that it stands in the way ofΒ "maximizing their bottom line", to put it as politely as I can. The reason they slap Sucuri on top of every site is that they obviously found it cheaper to strike a mass provisioning deal with Sucuri than hire real engineers who can secure their servers properly.

If it sounds pretty harsh, it's not. I am not a systems administrator by either education or trade. I am a Mechanical Engineer by education, and a web software developer by trade. But even I can see that the blatantly obvious way for them to resolve this security concern is putting the file access exceptions in their hosting configuration and limit them to the list of IP addresses Sucuri conveniently publishes as part of their proxying troubleshooting guide.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

enclavecoa

Hi Nicholas:

Well, I guess I know now how you feel about GoDaddy. I wish somebody had told me these things when I initially got started with them some 12 years ago. I'm currently in a multi-year agreement with them and wouldn't have any idea who might be a better choice for my hosting. Any ideas?

All of that being said, would you remove the first two "sucuri-" rules? I think I'd have to leave in the "cloner-" rule in order for my backup to work.

nicholas
Akeeba Staff
Manager

Unfortunately, you're not the only one who got reeled into GoDaddy. Their best product is... their advertisements. Every Joomla! developer and site integrator I have spoken to refers to them as NoDaddy.

As for my hosting recommendation and taking into account you're in the USA, that would be either Rochen or CloudAccess.net. I am using both of them for my own sites. For Europe I recommend either Rochen or papaki.gr.

Full disclosure: Rochen provides a managed server package used to host our business site free of charge. I have a regular, paid (at full retail price!) Reseller account with them which I use for all my personal sites, grandfathered-in client sites, and various projects. My opinion and recommendation on Rochen is based entirely on my experience with the paid account, which is exactly what anyone else would get purchasing the Reseller package.

All of that being said, would you remove the first two "sucuri-" rules? I think I'd have to leave in the "cloner-" rule in order for my backup to work.

You do not need the cloner- rule for Akeeba Backup to work. GoDaddy, as per their usual M.O., used misleading language. They are talking about the backup they offer through their control panel. If you don't need that, you can remove the rule.

About the sucuri- rules, it depends on whether you use their security scanner through GoDaddy. If you don't use it and don't care about it, you can remove the rule. Of you are using it, you have no alternative than to use them as things stand at the moment.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!