Commit graph

10,687 commits

Author SHA1 Message Date
Phantasm
72d45a9f8b
Merge branch 'develop' into audit-mix-audit-report 2026-09-08 21:58:23 +02:00
Phantasm
820e80bdc7
IdempotencyPlug: Fix private function name typo 2026-09-03 00:07:25 +02:00
lain
70d743bff9 Merge branch 'develop' into fix/domain-block-subplan-cost 2026-09-02 10:19:27 +00:00
Lain Soykaf
635bc19ac8
fix(notifications): cost the followed-accounts subselect once
Wrap the followed ap_ids subselect in keep_following_or_not_domain_blocked
in ARRAY(...) so it becomes an InitPlan. As a plain subselect the planner
charged its startup per rescan of the actor lookup, which could make
Notification.for_user pick a plan that scans every active user per row.
2026-09-02 13:42:48 +04:00
Phantasm
45459c8398
Merge branch 'develop' into audit-mix-audit-report 2026-08-19 22:20:55 +02:00
Phantasm
f672ab337c
Revert "Merge pull request 'MediaProxy: detect images when there's no file extension' (#7933) from mediaproxy-content-type into develop"
A partial revert, keeping the updated @inline_content_types list and
cosmetic changes.

This reverts commit 4fe567064a, reversing
changes made to 9b8aa2e2ee.
2026-08-13 22:02:11 +02:00
nicole mikołajczyk
2876fed876 Embed notificaiton details for grouped move/reaction/chat/report notification
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-08-02 22:13:31 +02:00
lain
1dd6a345bf Merge pull request 'Respect activity restrictions in account statuses' (#7943) from mkljczk/pleroma:issue-2604-restrict-account-statuses into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7943
2026-07-29 06:44:26 +00:00
Lain Soykaf
4a47a756be
fix(mastodon-api): optimize account status restrictions 2026-07-28 16:01:48 +04:00
nicole mikołajczyk
5c85dadb29 Fix typo in spec
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-07-28 01:06:00 +02:00
lain
a45eb365ed Merge pull request 'Abort incomplete media proxy responses' (#7946) from lambadalambda/pleroma:fix/media-proxy-truncated-cache into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7946
2026-07-27 15:08:06 +00:00
Lain Soykaf
bc999b3309
fix(media-proxy): abort truncated streams 2026-07-27 16:32:44 +04:00
Lain Soykaf
030c7e929c
style(oauth): use single alias directives 2026-07-27 12:14:58 +04:00
Lain Soykaf
d30d205f0b
fix(oauth): preserve dependent app cleanup 2026-07-27 11:57:16 +04:00
Lain Soykaf
b4c624911c
Merge branch 'develop' into gitlab-mr-iid-4315 2026-07-27 11:34:31 +04:00
lain
8ab0e046b1 Merge pull request 'Allow creating accounts without a password in the AdminAPI, update docs' (#7937) from mkljczk/pleroma:admin-api-passwordless-user-creation into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7937
2026-07-27 07:17:14 +00:00
Lain Soykaf
2b32e3cf1f
fix(mastodon-api): restrict unauthenticated account statuses 2026-07-26 18:12:49 +04:00
Lain Soykaf
03e75d3b3e
fix(webhooks): merge develop and harden delivery 2026-07-26 17:00:14 +04:00
lain
b9ef1e2182 Merge pull request 'Restore preview cards tests and update their OpenAPI description' (#7444) from gitlab-mr-iid-4067 into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7444
2026-07-26 10:32:26 +00:00
lain
e210e16a37 Merge pull request 'MastoAPI: /api/{v1,v2}/admin/accounts, /api/v1/admin/reports' (#7842) from mkljczk/pleroma:mastodon-admin-api into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7842
2026-07-26 10:06:01 +00:00
Lain Soykaf
842e6bcaff
Merge remote-tracking branch 'origin/develop' into pr-7444-finish 2026-07-26 13:56:09 +04:00
Lain Soykaf
c591ca518c
fix(mastodon-api): finish preview card compatibility 2026-07-26 13:55:57 +04:00
Lain Soykaf
458a15bf9f
fix(mastodon-api): harden admin moderation actions 2026-07-26 13:24:03 +04:00
Lain Soykaf
7a741736ea
Merge remote-tracking branch 'origin/develop' into pr-7444-finish 2026-07-26 13:20:50 +04:00
lain
3c916891f6 Merge branch 'develop' into paradedb-search-backend 2026-07-26 09:15:42 +00:00
lain
a5aad47cff Merge branch 'develop' into mastodon-admin-api 2026-07-26 08:52:01 +00:00
lain
d115b41848 Merge pull request 'Reject unsupported HTTP Message Signatures' (#7918) from activitypub-bot-federation into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7918
2026-07-26 08:50:16 +00:00
lain
f5dd75b1a3 Merge branch 'develop' into activitypub-bot-federation 2026-07-26 08:36:46 +00:00
Lain Soykaf
ce5c1b4c15
fix(activitypub): harden object normalization 2026-07-26 12:35:09 +04:00
Lain Soykaf
9df50eea82
fix: reject duplicate Signature headers 2026-07-26 12:26:35 +04:00
Lain Soykaf
13c944a04b
fix(search): index remote attachment descriptions 2026-07-26 12:03:24 +04:00
Lain Soykaf
271c3a3dd8
fix(config): keep search startup settings static 2026-07-26 11:58:31 +04:00
Lain Soykaf
acc44a5b6f
Merge remote-tracking branch 'origin/develop' into pr-7805-finish 2026-07-26 11:55:01 +04:00
lain
51349f61f8 Merge branch 'develop' into mastodon-admin-api 2026-07-26 07:46:55 +00:00
Lain Soykaf
91089c93ad
feat(search): add resumable runtime backfill 2026-07-26 11:38:24 +04:00
Lain Soykaf
a9862dcaa0
chore: merge develop into ParadeDB backend 2026-07-26 11:24:37 +04:00
Lain Soykaf
498c9ad532
test(http): cover the Hackney connection leak
Serve a response announcing far more than it sends, then close, and
assert the connection process is gone. Fails against stock 4.7.2 with a
conn parked in `closed` holding the bytes it read; passes against the
pinned fix.

Also stop the Hackney tests trusting proxy environment variables.
`no_proxy_env` is not a Hackney option and never was, so a proxy in the
build environment silently turned these into tunnelled requests, which
are never pooled -- exactly the shape several of them mean to exclude.
`proxy: false` is what Hackney actually reads.

That surfaced a matching bug in the reverse proxy client, which treated
`proxy: false` as "a proxy is set" and so declined to mark a pooled
bodyless response as already released.
2026-07-26 10:15:52 +04:00
Lain Soykaf
0615025f92
fix(http): enforce max_body again under Hackney 4
Hackney 4 ignores `with_body` and always returns a fully read binary, so
Tesla.Adapter.Hackney never reaches the clause that honours :max_body and
the option became a no-op. Only the gun path still enforced it, through
Pleroma.HTTP.Adapter.Gun. Pleroma.Web.RelMe relies on nothing else, so it
was fetching remote pages unbounded.

Add a middleware that applies the limit for every adapter: reject when
content-length already announces too much, and reject a body that came
back over the limit. Streaming bodies are left alone -- neither adapter
limits those and the caller owns the lease, so failing here on the header
would strand a connection RichMedia is still expected to release.

On the hackney path this bounds what callers are handed rather than peak
memory, since the adapter has read the body before any middleware runs.
2026-07-26 09:29:36 +04:00
Lain Soykaf
7d1cc56a78
Merge remote-tracking branch 'origin/develop' into audit-mix-audit-report
Conflict resolution notes:

- mix.lock: kept this branch's versions for cowlib, h2, hackney and hpax.
  Those upgrades are the point of the branch; develop is still on hackney
  1.20.1.

- .woodpecker/docker-armv7.yaml: accepted develop's deletion. It only
  existed here to build mdex_native on armv7, and mdex was already
  replaced with earmark again.

- lib/pleroma/reverse_proxy.ex: took develop's version. It independently
  grew request_with_constraints/5 and the invalid-status close, which
  supersede the equivalent fixes on this branch. Re-applied this branch's
  recv_timeout seeding, which develop does not have.

- lib/pleroma/gun/connection_pool/worker.ex and
  lib/pleroma/reverse_proxy/client/tesla.ex: took develop's versions. The
  gun pool rework (#7934) already guards the demonitor and makes
  release_conn/cancel_stream exit-safe, and it splits the Tesla client's
  graceful release from its abort path, so this branch's changes there are
  obsolete.

That leaves the client leak fix as a Hackney-only concern, which
stream_body/1 now handles the same way the gun client does.
2026-07-25 19:54:48 +04:00
Lain Soykaf
f985346fe8
fix(gun): tolerate a missing client monitor on release
A client that is already gone leaves no monitor to demonitor. Crashing
the worker takes the shared connection down with it and fails every
other client using it.
2026-07-25 18:46:44 +04:00
Lain Soykaf
24bdd9774a
fix(reverse_proxy): release the HTTP client on every outcome
Three paths obtained a client ref and abandoned it without closing:
the content-length rejection in call/3, the invalid-status clause in
request/4, and the success branch of response/6.

Under Hackney 4 an abandoned ref is a permanent process leak. A conn
that finishes or errors without an explicit stop parks in `closed` or
`connected` and never terminates: closed/3 only arms its stop timer for
pooled conns, `connected` gets no state_timeout when idle_timeout is
infinity, and a non-pooled conn monitors hackney_conn_sup rather than
its caller, so the owner-DOWN cleanup never fires. Each parked process
pins every refc binary it read, which for proxied video is tens of MB.

Releasing on every outcome means the gun client must stop releasing in
stream_body/1, or the ref would be removed twice.

Hackney does reclaim a pooled connection itself for a response that
cannot carry a body (204, 304, HEAD), so those refs are marked and left
alone; stopping one would evict a connection another request may
already hold. The mark is gated on the request actually being pooled,
since a direct or proxy-tunnelled conn is never checked in and leaks
unless we stop it.
2026-07-25 18:46:43 +04:00
Lain Soykaf
99befcaf1b
fix(activitypub): deduplicate account favourites 2026-07-25 10:51:09 +04:00
Lain Soykaf
9a6c2f909d
Merge remote-tracking branch 'origin/develop' into issue-3379-favourites-order 2026-07-25 10:31:57 +04:00
lain
cc1b95c88e Merge pull request 'Rework Gun connection pooling' (#7934) from issue-2263-gun-validation into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7934
2026-07-25 05:44:39 +00:00
Lain Soykaf
d5f48101b8
fix(media-proxy): safely detect extensionless images 2026-07-25 00:06:03 +04:00
Lain Soykaf
bb4826d8ae
fix(admin-api): structure reset token failures 2026-07-24 23:24:52 +04:00
Lain Soykaf
465a81ecf2
Merge remote-tracking branch 'origin/develop' into review-pr-7933 2026-07-24 23:24:11 +04:00
Lain Soykaf
d0b5a05075
fix(admin-api): confirm created users 2026-07-24 23:14:03 +04:00
Lain Soykaf
836f4a2d69
fix(admin-api): reject explicit empty passwords 2026-07-24 22:52:23 +04:00
Lain Soykaf
3b3aad6065
fix(api): isolate sensitive idempotency responses 2026-07-24 22:45:50 +04:00