github mastodon/mastodon v4.5.21

latest release: v4.4.28
3 hours ago

Mastodon

Warning

While we do our best to support Mastodon 4.5 until 2027-02-20, there are known security issues in some of the dependencies we use.
We recommend administrators to update to a newer Mastodon version when they can, especially if you use OpenStack Swift for object storage.

Changelog

Security

  • Fix DoS through JSON-LD compaction (#41482 by @ClearlyClaire, GHSA-cf49-73r7-rxj6)
  • Fix Forwarded header taking precedence over X-Forwarded-For (#41481 by @ClearlyClaire, GHSA-qp4r-p842-mw5c)
    • If your reverse-proxy setup uses Forwarded instead of X-Forwarded-For, please make sure it ignores user-provided X-Forwarded-For headers.
    • If you are using our provided nginx.conf, please consider updating it.
  • Updated dependencies, in particular to address security advisories in addressable, loofah, rack, and rails-html-sanitizer

Changed

  • Change invites use counts to not decrease if an invited user deletes their account (#41458 by @ClearlyClaire)

Upgrade notes

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

Note

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 since v4.5.0.

  • Ruby: 3.2 or newer
  • PostgreSQL: 14 or newer
  • Elasticsearch (recommended, for full-text search): 7.x (OpenSearch should also work)
  • LibreTranslate (optional, for translations): 1.3.3 or newer
  • Redis: 7.0 or newer
  • Node: 20.19 or newer
  • libvips (optional, instead of ImageMagick): 8.13 or newer
  • ImageMagick (optional if using libvips): 6.9.7-7 or newer

Update steps

The following instructions are for updating from 4.5.20.

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. In particular, it is very important to read the 4.5.0 release notes.

Non-Docker

Tip

The charlock_holmes gem may fail to build on some systems with recent versions of gcc.
If you run into this issue, try BUNDLE_BUILD__CHARLOCK_HOLMES="--with-cxxflags=-std=c++17" bundle install.

  1. Install dependencies with bundle install and yarn install --immutable
  2. Restart all Mastodon processes.

When using Docker

  1. Restart all Mastodon processes.

Don't miss a new mastodon release

NewReleases is sending notifications on new releases.