Skip to content

Commit a602cc9

Browse files
Merge pull request #3378 from ClearlyClaire/glitch-soc/merge-4.5
Merge upstream changes up to e8045de into stable-4.5
2 parents 6fd034c + 4d4611b commit a602cc9

File tree

4 files changed

+39
-10
lines changed

4 files changed

+39
-10
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [4.5.6] - 2026-02-03
6+
7+
### Security
8+
9+
- Fix ActivityPub collection caching logic for pinned posts and featured tags not checking blocked accounts ([GHSA-ccpr-m53r-mfwr](https://github.com/mastodon/mastodon/security/advisories/GHSA-ccpr-m53r-mfwr))
10+
11+
### Changed
12+
13+
- Shorten caching of quote posts pending approval (#37570 and #37592 by @ClearlyClaire)
14+
15+
### Fixed
16+
17+
- Fix relationship cache not being cleared when handling account migrations (#37664 by @ClearlyClaire)
18+
- Fix quote cancel button not appearing after edit then delete-and-redraft (#37066 by @PGrayCS)
19+
- Fix followers with profile subscription (bell icon) being notified of post edits (#37646 by @ClearlyClaire)
20+
- Fix error when encountering invalid tag in updated object (#37635 by @ClearlyClaire)
21+
- Fix cross-server conversation tracking (#37559 by @ClearlyClaire)
22+
- Fix recycled connections not being immediately closed (#37335 and #37674 by @ClearlyClaire and @shleeable)
23+
524
## [4.5.5] - 2026-01-20
625

726
### Security

app/controllers/activitypub/collections_controller.rb

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,31 @@ class ActivityPub::CollectionsController < ActivityPub::BaseController
44
vary_by -> { 'Signature' if authorized_fetch_mode? }
55

66
before_action :require_account_signature!, if: :authorized_fetch_mode?
7+
before_action :check_authorization
78
before_action :set_items
89
before_action :set_size
910
before_action :set_type
1011

1112
def show
1213
expires_in 3.minutes, public: public_fetch_mode?
13-
render_with_cache json: collection_presenter, content_type: 'application/activity+json', serializer: ActivityPub::CollectionSerializer, adapter: ActivityPub::Adapter
14+
15+
if @unauthorized
16+
render json: collection_presenter, content_type: 'application/activity+json', serializer: ActivityPub::CollectionSerializer, adapter: ActivityPub::Adapter
17+
else
18+
render_with_cache json: collection_presenter, content_type: 'application/activity+json', serializer: ActivityPub::CollectionSerializer, adapter: ActivityPub::Adapter
19+
end
1420
end
1521

1622
private
1723

24+
def check_authorization
25+
# Because in public fetch mode we cache the response, there would be no
26+
# benefit from performing the check below, since a blocked account or domain
27+
# would likely be served the cache from the reverse proxy anyway
28+
29+
@unauthorized = authorized_fetch_mode? && !signed_request_account.nil? && (@account.blocking?(signed_request_account) || (!signed_request_account.domain.nil? && @account.domain_blocking?(signed_request_account.domain)))
30+
end
31+
1832
def set_items
1933
case params[:id]
2034
when 'featured'
@@ -57,11 +71,7 @@ def collection_presenter
5771
end
5872

5973
def for_signed_account
60-
# Because in public fetch mode we cache the response, there would be no
61-
# benefit from performing the check below, since a blocked account or domain
62-
# would likely be served the cache from the reverse proxy anyway
63-
64-
if authorized_fetch_mode? && !signed_request_account.nil? && (@account.blocking?(signed_request_account) || (!signed_request_account.domain.nil? && @account.domain_blocking?(signed_request_account.domain)))
74+
if @unauthorized
6575
[]
6676
else
6777
yield

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ services:
5959
web:
6060
# You can uncomment the following line if you want to not use the prebuilt image, for example if you have local code changes
6161
# build: .
62-
image: ghcr.io/glitch-soc/mastodon:v4.5.5
62+
image: ghcr.io/glitch-soc/mastodon:v4.5.6
6363
restart: always
6464
env_file: .env.production
6565
command: bundle exec puma -C config/puma.rb
@@ -83,7 +83,7 @@ services:
8383
# build:
8484
# dockerfile: ./streaming/Dockerfile
8585
# context: .
86-
image: ghcr.io/glitch-soc/mastodon-streaming:v4.5.5
86+
image: ghcr.io/glitch-soc/mastodon-streaming:v4.5.6
8787
restart: always
8888
env_file: .env.production
8989
command: node ./streaming/index.js
@@ -102,7 +102,7 @@ services:
102102
sidekiq:
103103
# You can uncomment the following line if you want to not use the prebuilt image, for example if you have local code changes
104104
# build: .
105-
image: ghcr.io/glitch-soc/mastodon:v4.5.5
105+
image: ghcr.io/glitch-soc/mastodon:v4.5.6
106106
restart: always
107107
env_file: .env.production
108108
command: bundle exec sidekiq

lib/mastodon/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def minor
1313
end
1414

1515
def patch
16-
5
16+
6
1717
end
1818

1919
def default_prerelease

0 commit comments

Comments
 (0)