おああ よし
ちょうど Mastodon v4.2.7 がリリースされたところですので、それに対するパッチを出しておきます。
リモートから届いた、あるいはブーストや検索等でfetchしたCreate Activityのcontentに対し正規表現でマッチしたものを拒否する機能を追加するものです。
要するにサーバレベルのリモート投稿フィルタです。
https://github.com/fedibird/mastodon/tree/add-reject-pattern-to-admin-setting-v4.2.7
手順はざっくりこんな感じ。
sudo -iu mastodon
cd live
git fetch https://github.com/fedibird/mastodon add-reject-pattern-to-admin-setting-v4.2.7
git reset --hard FETCH_HEAD
RAILS_ENV=production bundle install
RAILS_ENV=production yarn install --frozen-lockfile
exit
sudo systemctl restart mastodon-*
データベーススキーマなどには影響しないので、いつでもv4.2.7に安全に戻せます。必要な方はどうぞ。
このアカウントは、notestockで公開設定になっていません。
We've released one more security patch earlier today, for the versions 4.1, 4.2, and nightly.
If you are using nightly, you can upgrade to the 4.3.0-nightly.2024-02-17-security tag to get the patches.
Please upgrade as soon as possible!