Joomla Auto-Update?

Do you have an idea for the Joomla community that you can help implement? Discuss in here.
Locked
khorton
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Thu Dec 25, 2014 12:18 am
Location: Moses Lake, WA, USA

Joomla Auto-Update?

Post by khorton » Fri Jan 15, 2016 12:12 pm

I believe it is time to implement a Joomla auto-update option. The recent spate of exploits and hacked sites show clearly that it is not reasonable to expect that many sites will be updated quickly enough after a Joomla security update to avoid being hacked. In my case, the site logs show probes looking for the fixed vulnerability the day after 3.4.6 was released, and before I was aware of the update. I have now subscribed to Joomla Security Centre emails, but I am often out of email contact for a day or two at a time. I was lucky that my host had kept PHP up-to-date, and I see no evidence that my site was hacked. Many others were not so lucky.

I know that many commercial sites would not want auto-update out of fear of updates breaking their site. But, there are many smaller sites, such as mine, where the time lost recovering from a hack is a larger concern than a possible breakage from a security update.

How about an auto-update feature that works like this:
  • the auto-updates would be available for minor releases only (i.e. 3.4.x within the 3.4 series)
  • minor releases would be tagged to indicate if they fixed a security issue
  • auto-update would be available for releases tagged as being security fix releases
  • the administrator could select to enable auto-updates or not
  • the site would poll at some selected interval to see if a security fix release was available
  • the administrator would receive an email indicating that an auto-update had occurred
  • for extra points, add another option to take the site off-line, without doing the update, if a security fix release was available
  • for super-extra points, add a feature to allow easy roll-back of an auto-updated update

User avatar
Bernard T
Joomla! Guru
Joomla! Guru
Posts: 782
Joined: Thu Jun 29, 2006 11:44 am
Location: Hrvatska
Contact:

Re: Joomla Auto-Update?

Post by Bernard T » Fri Jan 15, 2016 3:18 pm

I completely support your suggestions, they completely align with mine.

There are definitely big differences in opinions about automatic updates from webmaster to webmaster, and I am sure many will argue it's not possible or not needed. But in this day and age, and with recent major impact vulnerabilities and following tsunamis of attacks should be a proof.

IMO every website owner should have an option and choose whether (s)he is more comfortable having to fix some minor (if any) issues after auto-upgrade, or have an embarrassment of the hacked website and hours/days of downtime while juggling unhappy customers and hosting providers ... Any webmaster knows if any of the previous updates have broken his/her site, and why. And choose his level of peace of mind.

It's not so simple to implement 99.999% failure-safe auto-update, but it's also not impossible either. The competitor major CMS has that feature running, with minor version auto-update active by default.
VEL Team || Security Forum || PHP/Web Security Specialist || OWASP member
JAMSS author http://forum.joomla.org/viewtopic.php?f=621&t=777957
Twitter: @toplak

deleted user

Re: Joomla Auto-Update?

Post by deleted user » Fri Jan 15, 2016 4:28 pm

I'm not going to echo my past blurbs on the topic again (read up in the CMS mailing list and past topics on this forum). But long and short, Joomla isn't mature enough and IMO there are too many philosophical and potentially legal questions to address before auto-updates should even be considered. Mind you, I'm a past member of the Production Leadership Team and a past release lead, and I'm telling you I wouldn't trust Joomla to push auto-updates.

Yes, it's a nice to have, and yes it's a goal that should be met some day. But frankly, I don't see the project ever getting to a point where I would ever advise any user to enable them.

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3507
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Joomla Auto-Update?

Post by ribo » Fri Jan 15, 2016 5:19 pm

In theory auto update is a good idea but in action it will not be a good idea.
For example, if a server configuration of a client is not configured well and the update failed and he have not any back up what happens? And also if his host not create back up? Some things sound not good but happens in some people. So i think that the better option is the inform in your email that you must update than the auto update. So with the inform in your email you know that you must update and you can prepair your shelf for update.
chat room spontes : http://www.spontes.com

User avatar
Bernard T
Joomla! Guru
Joomla! Guru
Posts: 782
Joined: Thu Jun 29, 2006 11:44 am
Location: Hrvatska
Contact:

Re: Joomla Auto-Update?

Post by Bernard T » Fri Jan 15, 2016 5:39 pm

mbabker wrote: But long and short, Joomla isn't mature enough and IMO there are too many philosophical and potentially legal questions to address before auto-updates should even be considered.
Michael, thanks for your honest opinion. If we don't trust the maturity of the whole project production process that's something to keep in mind.

Mature or not, a disabled-by-default feature can't hurt anyone who doesn't explicitly say "yes, I'm sure I want it". Those who enable it will have a carefully (and colorfully) written warning signs "on your own risk only" before it. That's much more than the competitor CMS is doing - auto-update is ON by default, no special warnings, and everybody is still happy.
ribo wrote:For example, if a server configuration of a client is not configured well and the update failed and he have not any back up what happens? And also if his host not create back up? Some things sound not good but happens in some people.
Those who don't read the warnings, and checklists, and still enable it without the "Plan B", then it's really their fault.
VEL Team || Security Forum || PHP/Web Security Specialist || OWASP member
JAMSS author http://forum.joomla.org/viewtopic.php?f=621&t=777957
Twitter: @toplak

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3507
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Joomla Auto-Update?

Post by ribo » Fri Jan 15, 2016 7:54 pm

Bernard T wrote:
ribo wrote:For example, if a server configuration of a client is not configured well and the update failed and he have not any back up what happens? And also if his host not create back up? Some things sound not good but happens in some people.
Those who don't read the warnings, and checklists, and still enable it without the "Plan B", then it's really their fault.
I know that it s their fault and i agree. An example is that i was just listened from a joomla user that had not back up because:
1. He did n t know how to create back up.
2. His host plan did n t keep back up.
And i believe that there are many joomla users like him.
chat room spontes : http://www.spontes.com

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3507
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Joomla Auto-Update?

Post by ribo » Fri Jan 15, 2016 7:57 pm

Bernard T wrote: Mature or not, a disabled-by-default feature can't hurt anyone who doesn't explicitly say "yes, I'm sure I want it". Those who enable it will have a carefully (and colorfully) written warning signs "on your own risk only" before it. That's much more than the competitor CMS is doing - auto-update is ON by default, no special warnings, and everybody is still happy.
Yes a disabled-by-default it 's a good idea.
chat room spontes : http://www.spontes.com

khorton
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Thu Dec 25, 2014 12:18 am
Location: Moses Lake, WA, USA

Re: Joomla Auto-Update?

Post by khorton » Sat Jan 16, 2016 10:38 pm

Maybe I've been lucky, but I've never not yet had a Joomla minor update break my site. Mind you, I did make a conscious decision to limit the extensions to the minimum necessary, as I had learned with my previous CMS that too many extensions made updates a nightmare.

If making an auto-update function that works at least as well as the current update system is deemed to be too difficult, I'd settle for an optional setting to take my site offline if a security update had been released. I'd much rather have my site offline for a day or so than deal with recovering from a hack.

deleted user

Re: Joomla Auto-Update?

Post by deleted user » Sun Jan 17, 2016 12:34 am

Joomla's offline mode isn't a real offline mode. Basically behind the scenes the full request still runs and it isn't until the page is rendered that the offline template is applied instead of the normal one. http://magazine.joomla.org/issues/issue ... fline-mode will give you the down and dirty details. Unless you take the precautions noted in that article, don't rely on offline mode for anything more than throwing a login screen in front of your content.

khorton
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Thu Dec 25, 2014 12:18 am
Location: Moses Lake, WA, USA

Re: Joomla Auto-Update?

Post by khorton » Sun Jan 17, 2016 1:10 am

mbabker wrote:Joomla's offline mode isn't a real offline mode. Basically behind the scenes the full request still runs and it isn't until the page is rendered that the offline template is applied instead of the normal one.
Wow! I didn't know that. It boggles the mind why the current behaviour is considered "good enough". Thanks for educating me.

The "work around" in the article would work, as long as my ISP doesn't change my IP at home. I guess I could ssh in and edit the .htaccess if required, so I shouldn't get completely locked out.

The lack of an auto-update feature (and the apparent reluctance to even consider adding one) and this lack of a proper off-line mode have started me wondering whether Joomla was the right choice. I've got to make a new site for a small business that I am starting in the spring, and maybe it is time to investigate other CMSs.

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9706
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Joomla Auto-Update?

Post by AMurray » Sun Jan 17, 2016 7:27 am

@khorton,

While Joomla core doesn't have an auto-update, here is a plugin for such that might help:
http://extensions.joomla.org/extensions ... for-joomla
Regards - A Murray
General Support Moderator

User avatar
Bernard T
Joomla! Guru
Joomla! Guru
Posts: 782
Joined: Thu Jun 29, 2006 11:44 am
Location: Hrvatska
Contact:

Re: Joomla Auto-Update?

Post by Bernard T » Sun Jan 17, 2016 9:54 am

khorton wrote:Wow! I didn't know that. It boggles the mind why the current behaviour is considered "good enough". Thanks for educating me.
The lack of an auto-update feature (and the apparent reluctance to even consider adding one) and this lack of a proper off-line mode have started me wondering whether Joomla was the right choice. I've got to make a new site for a small business that I am starting in the spring, and maybe it is time to investigate other CMSs.
Well, stop your horses there.
First of all, I don't see a point of offline-mode if the update goes south. The failed auto-update could even break the offline-mode functionality, so you can't count on it completely. There should be a better "Plan B".

On the offtopic subject, there is no reason for panic here.
Offline-Mode is not meant as a security feature, nor is a vulnerability, nor a bad functionality. It's considered good enough for something it is really meant to do - prevent users from seeing your website content while you change design, or do other maintenance work. That's all. And not to prevent access to Joomla's functionality, it's not declared to do that. Maybe a name of the functionality can be missunderstood, but that doesn't justify a webmaster not reading the documentation.

And all that is well documented in the Documentation website https://docs.joomla.org/Taking_the_webs ... ly_offline . The documentation doesn't promise anything more than a "website completely unavailable to visitors".
Also, it clearly states "The site may be parsable by bots, search engines and other direct call methods". And furthermore suggests a password protection of the whole webdir as a solution. That approach with password protection is a proper solution, not the IP-based blocking. As you mentioned, dynamic IP's for the normal users are a common thing. If the appearance of the offline message is also important, that can also be accomplished using the HTTP daemon (Apache, Nginx ...) directives. (Interestingly enough, the same author had a flame war against me recently in which he stated that blocking by IP is useless. Go figure).

For a perspective, WP doesn't even have an "offline-mode" switch in the core, you need a 3rd-pty plugin. Drupal has a "maintenance mode" switch. For both competing CMS-es their "offline mode" works pretty the same way as the subject Joomla functionality.

And finally, a technical problem. From one PHP file you can't prevent access to another independent PHP file (apart of updating eg. a Htaccess file). It has to be done on a higher level, by HTTP daemon, eg. as explained above. So it's nothing Joomla can even fix directly in PHP code itself, except moving main check to the main index.php files to prevent framework from running. But that would prevent template rendering with offline message rendered using template design ...
Joomla has done more than enough by implementing and enforcing protection against direct execution of any other PHP file contained into the CMS (excluding 3rd pty extensions, which can sneak in not adhering to this principle). This level of direct access protection isn't present in other "major-league" CMS-es mentioned above.

As a side note, since the article was "Published in 2011 February", if "offline mode" was a security issue needing fixing according to the author, then the JSST or PLT should have fixed it in last 5 years, right? The article author is a member of JSST, so if you have further concerns about it you can ask any of those teams or author himself.

My point is - if you want to prevent any PHP file to be accessed, you can't expect Joomla to prevent it, it's technically impossible. HTTP server should prevent PHP from running. That's why we in Security subforum suggest pasword-protecting the folder of the hacked website, not just setting it in "Offline Mode".

OK, and now, can we get back on the subject ?
VEL Team || Security Forum || PHP/Web Security Specialist || OWASP member
JAMSS author http://forum.joomla.org/viewtopic.php?f=621&t=777957
Twitter: @toplak

khorton
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Thu Dec 25, 2014 12:18 am
Location: Moses Lake, WA, USA

Re: Joomla Auto-Update?

Post by khorton » Sun Jan 17, 2016 8:51 pm

Thanks for the detailed explanation Bernard. I had completely misunderstood what offline mode accomplished.

I should cook up an alternate .htaccess file that I could quickly swap in using ssh to replace the normal .htaccess, so I would be ready to make the site completely unaccessible if I ever need to protect it quickly.

khorton
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Thu Dec 25, 2014 12:18 am
Location: Moses Lake, WA, USA

Re: Joomla Auto-Update?

Post by khorton » Tue Jan 19, 2016 10:59 am

Prabhuseo wrote:Thanks for posting related to Joomla Autoupdate. The best option is when we get new update information on our mail. We start backup and then update the Joomla is best option.
How many hours do you sleep at night?

Drupal had a vulnerability in 2014 where automated attacks started so quickly after the patch was released that any site that was not updated within 7 hours had to be considered as hacked. There may be some sites that have people on duty 24/7 who could quickly respond to emails about updates, but most sites would take days or weeks to get updated.


Locked

Return to “Joomla! Ideas Forum”