mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-04 03:25:14 +00:00
Merge tag 'v4.2.29'
This commit is contained in:
commit
b9a408f4e2
5 changed files with 18 additions and 8 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
|
@ -2,6 +2,16 @@
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [4.2.29] - 2026-01-07
|
||||||
|
|
||||||
|
### Security
|
||||||
|
|
||||||
|
- Fix SSRF protection bypass ([GHSA](https://github.com/mastodon/mastodon/security/advisories/GHSA-xfrj-c749-jxxq))
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix mentions of domain-blocked users being processed (#37257 by @ClearlyClaire)
|
||||||
|
|
||||||
## [4.2.28] - 2025-12-08
|
## [4.2.28] - 2025-12-08
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ class ProcessMentionsService < BaseService
|
||||||
# Make sure we never mention blocked accounts
|
# Make sure we never mention blocked accounts
|
||||||
unless @current_mentions.empty?
|
unless @current_mentions.empty?
|
||||||
mentioned_domains = @current_mentions.filter_map { |m| m.account.domain }.uniq
|
mentioned_domains = @current_mentions.filter_map { |m| m.account.domain }.uniq
|
||||||
blocked_domains = Set.new(mentioned_domains.empty? ? [] : AccountDomainBlock.where(account_id: @status.account_id, domain: mentioned_domains))
|
blocked_domains = Set.new(mentioned_domains.empty? ? [] : AccountDomainBlock.where(account_id: @status.account_id, domain: mentioned_domains).pluck(:domain))
|
||||||
mentioned_account_ids = @current_mentions.map(&:account_id)
|
mentioned_account_ids = @current_mentions.map(&:account_id)
|
||||||
blocked_account_ids = Set.new(@status.account.block_relationships.where(target_account_id: mentioned_account_ids).pluck(:target_account_id))
|
blocked_account_ids = Set.new(@status.account.block_relationships.where(target_account_id: mentioned_account_ids).pluck(:target_account_id))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ services:
|
||||||
|
|
||||||
web:
|
web:
|
||||||
build: .
|
build: .
|
||||||
image: ghcr.io/mastodon/mastodon:v4.2.28
|
image: ghcr.io/mastodon/mastodon:v4.2.29
|
||||||
restart: always
|
restart: always
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
|
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
|
||||||
|
|
@ -77,7 +77,7 @@ services:
|
||||||
|
|
||||||
streaming:
|
streaming:
|
||||||
build: .
|
build: .
|
||||||
image: ghcr.io/mastodon/mastodon:v4.2.28
|
image: ghcr.io/mastodon/mastodon:v4.2.29
|
||||||
restart: always
|
restart: always
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
command: node ./streaming
|
command: node ./streaming
|
||||||
|
|
@ -95,7 +95,7 @@ services:
|
||||||
|
|
||||||
sidekiq:
|
sidekiq:
|
||||||
build: .
|
build: .
|
||||||
image: ghcr.io/mastodon/mastodon:v4.2.28
|
image: ghcr.io/mastodon/mastodon:v4.2.29
|
||||||
restart: always
|
restart: always
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
command: bundle exec sidekiq
|
command: bundle exec sidekiq
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ module Mastodon
|
||||||
end
|
end
|
||||||
|
|
||||||
def patch
|
def patch
|
||||||
28
|
29
|
||||||
end
|
end
|
||||||
|
|
||||||
def default_prerelease
|
def default_prerelease
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@ RSpec.describe ProcessMentionsService, type: :service do
|
||||||
let(:account) { Fabricate(:account, username: 'alice') }
|
let(:account) { Fabricate(:account, username: 'alice') }
|
||||||
|
|
||||||
context 'when mentions contain blocked accounts' do
|
context 'when mentions contain blocked accounts' do
|
||||||
let(:non_blocked_account) { Fabricate(:account) }
|
let!(:non_blocked_account) { Fabricate(:account) }
|
||||||
let(:individually_blocked_account) { Fabricate(:account) }
|
let!(:individually_blocked_account) { Fabricate(:account) }
|
||||||
let(:domain_blocked_account) { Fabricate(:account, domain: 'evil.com') }
|
let!(:domain_blocked_account) { Fabricate(:account, domain: 'evil.com', protocol: :activitypub) }
|
||||||
let(:status) { Fabricate(:status, account: account, text: "Hello @#{non_blocked_account.acct} @#{individually_blocked_account.acct} @#{domain_blocked_account.acct}", visibility: :public) }
|
let(:status) { Fabricate(:status, account: account, text: "Hello @#{non_blocked_account.acct} @#{individually_blocked_account.acct} @#{domain_blocked_account.acct}", visibility: :public) }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue