Important Emoncms Security Update

Device module

If your using the emoncms device module and have come across an ‘undefined’ error while initialising a device, there is a temporary patch to make it work with the latest version of emoncms, available here: https://github.com/emoncms/device/tree/set_processlist_patch

cd /var/www/emoncms/Modules/device
git checkout set_processlist_patch

We are launching a new version of the device module soon, this patch fixes the initialisation issue until the new version is available.

’Undefined’ error on login attempt

If your updating from a version of emoncms prior to the 22nd of April 2017 (v9.8.3 or below) you may find a ‘Undefined’ error on login attempt. This is due to a missing ‘startingpage’ field in the user table. The database can be updated without login by adding the settings line:

$updatelogin = true;

to the end of your settings.php file and then running database update by going to the following url:

http://localhost/emoncms/admin/db

Remember to remove the $updatelogin = true; line once complete.

emoncms v.9.8.21 now shows a more helpful error message in place of ‘undefined’ which should help with debugging certain login/register issues.

The latest version of emoncms is now v9.8.24 merging several bug fixes fixed in the master branch over the last week which are now available in the stable branch, see emoncms release notes:

https://github.com/emoncms/emoncms/releases/tag/9.8.24

Am I right in thinking this is only available on the ‘master’ branch and not ‘stable’?
{edit}
My bad. I checked the tags and it seemed to be 9.7.x on stable. In fact the syntax of the tags has changed so there is no longer a ‘v’ at the start so they no longer sort logically.

I updated my emonPi on Nov 27 (via stable) and it is now v9.8.24.

I know I have said it before, but there should be a separate announcement in the forum for every update. Currently if you go into the forum, you will just see the thread title of v9.8.18 as being the latest. These announcement posts should be Pinned and Locked and any discussion, created as a linked discussion.

I also think that a link on how to upgrade for both stand alone and prebuilt setups should be included in the announcement.

With the move to a separate version file, it should be possible for an instance of Emoncms to be able to have an alert on any page that an update is required.

How do you update emoncms via SSH rather than using the web interface/Admin?
Thx

Is it an emonpi image or a self install?

Originally it was an SD image.

The documentation is here https://github.com/emoncms/emoncms/tree/master/docs but is woefully out of date.

If all you do is run emoncms on the SD card, then I’d be inclined to pick up a new Stretch image, backup the data, put the new image on a new card (so you can roll back if necessary) and then upload the backed up data.

There are some threads here on backing up data; it rather depends on how old your image is and how long since it was updated.

Ok I will try and give that a go, I will pin only the latest release announcement, or if an announcement such as the recent security one is of higher importance leave that pinned as well.

Thx …
Trystan’s latest announcement (release of v9.8.25) includes the all important info …

SSH/Git update procedure example:

cd /var/www/emoncms
git pull

And then remember to check for database updates from the administration page.

Great but can it appear (and stay) at the top of the ‘latest’ page please? I nearly missed this…

Hi …
Guess I’m a bit confused …
In Trystan’s post announcing v9.8.25, he states that - no database updates are required.
Pls advise

Apologies @johnbanks If your updating from v9.8.24 to v9.8.25 no database update is required but you may need to update if your updating from older versions. I will change the wording to avoid the confusion

1 Like

One of those things. Database updates are not always required but it is good practice, to push the button to check after any update. :smile: