Skip to content

v4.0.4

Compare
Choose a tag to compare
@ClearlyClaire ClearlyClaire released this 04 Apr 10:43
· 90 commits to stable-4.0 since this release

Mastodon

This is a backport for the 4.0.x branch.

Upgrade overview

This release contains upgrade notes that deviate from the norm:

ℹ️ The recommended Ruby version has been updated

For more information, scroll down to the upgrade instructions section.

Changelog

Fixed

  • Fix crash in tootctl commands making use of parallelization when Elasticsearch is enabled (ClearlyClaire, ClearlyClaire)
  • Fix crash in db:setup when Elasticsearch is enabled (rrgeorge)
  • Fix user archive takeout when using OpenStack Swift or S3 providers with no ACL support (ClearlyClaire)
  • Fix invalid/expired invites being processed on sign-up (ClearlyClaire)

Security

  • Update Ruby to 3.0.6 due to ReDoS vulnerabilities (saizai)
  • Fix unescaped user input in LDAP query (ClearlyClaire)

Upgrade notes

To get the code for v4.0.4, use git fetch && git checkout v4.0.4.

As always, make sure you have backups of the database before performing any upgrades. If you are using docker-compose, this is how a backup command might look: docker exec mastodon_db_1 pg_dump -Fc -U postgres postgres > name_of_the_backup.dump

Dependencies

External dependencies have not changed compared to v4.0.3, the compatible Ruby, PostgreSQL, Node, Elasticsearch and Redis versions are the same, that is:

  • Ruby: 2.7 to 3.0
  • PostgreSQL: 9.5 or newer
  • Elasticsearch (optional, for full-text search): 7.x
  • Redis: 4 or newer
  • Node: 14 or higher

However, the recommended Ruby version has changed from 3.0.4 to 3.0.6.

Update steps

The following instructions are for updating from 4.0.3.

If you are upgrading directly from an earlier release, please carefully read the upgrade notes for the skipped releases as well, as they often require extra steps such as database migrations.

Non-Docker only:

  • The recommended Ruby version has been bumped to 3.0.6. If you are using rbenv, you will be require to install it with RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 3.0.6. You may need to update rbenv itself with git -C /home/mastodon/.rbenv/plugins/ruby-build pull.
  • Install dependencies: bundle install and yarn install

Both Docker and non-Docker:

  1. Restart all Mastodon processes