Commit graph

18,358 commits

Author SHA1 Message Date
lain
c5498c018d Merge pull request 'MRF ObjectAgePolicy: keep old DMs and followers-only posts private' (#8019) from lambadalambda/pleroma:fix/object-age-non-public into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/8019
2026-10-27 12:03:58 +00:00
Lain Soykaf
0d93c903f7
test(mrf): cover ObjectAgePolicy with private, direct and unlisted posts 2026-10-27 12:35:16 +04:00
Oneric
2a55239ca8
mrf/object_age: fix handling of non-public objects
Current logic unconditionally adds public adressing to "cc"
and follower adressing to "to" after attempting to strip it
from the other one. This creates serious problems:

First the bug prompting this investigation and fix,
unconditional addition creates duplicates when adressing
URIs already were in their intended final field; e.g.
this is prominently the case for all "unlisted" posts.
Since List.delete only removes the first occurence,
this then broke follower-adress stripping later on
making the policy ineffective.

It’s also just not safe in general wrt to non-public adressing:
e.g. pre-existing duplicates didn’t get fully stripped,
bespoke adressing modes with only one of public addressing
or follower addressing are mangled — and most importantly:
any belatedly received DM or follower-only post
also got public adressing added!
Shockingly this last point was actually asserted as "correct" in tests;
it appears to be a mistake from mindless match adjustments
while fixing crashes on nil adressing in
10c792110e.

Clean up this sloppy logic up, making sure no more duplicates are
added by us, all instances of relevant adresses are purged and only
readded when they actually existed to begin with.

(cherry picked from commit 932810c35ecba9d11fa4f11112c3444b62c45b65)
2026-10-27 12:27:09 +04:00
lain
90eb5e4015 Merge pull request 'ActivityPub: check OAuth scopes on C2S endpoints' (#8015) from lambadalambda/pleroma:fix/ap-c2s-oauth-scopes into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/8015
2026-10-27 07:08:48 +00:00
lain
745926189f Merge pull request 'OAuth: require security scopes for /api/oauth_tokens' (#8013) from lambadalambda/pleroma:fix/oauth-tokens-scopes into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/8013
2026-10-27 07:08:34 +00:00
lain
b9fcb8bbe0 Merge pull request 'Remove unrouted PleromaAPI token and password controllers' (#8014) from lambadalambda/pleroma:chore/remove-dead-pleroma-api-controllers into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/8014
2026-10-27 07:06:53 +00:00
lain
6963c22fcf Merge pull request 'OAuth: support the profile scope' (#8012) from lambadalambda/pleroma:feature/oauth-profile-scope into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/8012
2026-10-27 07:06:03 +00:00
lain
70f9b8542f Merge pull request 'Merge stable 2.11.1 into develop' (#8017) from merge-stable-2.11.1 into develop 2026-10-26 19:36:51 +00:00
Lain Soykaf
15361ea917
Merge stable 2.11.1 into develop 2026-10-26 22:40:31 +04:00
lain
762058f2c5 Merge pull request 'Release 2.11.1' (#8016) from release/2.11.1 into stable 2026-10-26 18:39:46 +00:00
Lain Soykaf
006ad1c7d0
Prepare 2.11.1 release 2026-10-26 22:02:51 +04:00
Lain Soykaf
26486b041b
docs(http): update hackney comments for 4.9 2026-10-26 22:02:41 +04:00
Lain Soykaf
48ec8518a3
fix(http): drop the partial body from truncated-read errors
Hackney 4.9 returns {:error, {:closed, partial}}. RelMe caches errors,
so it would keep up to max_body bytes per URL.
2026-10-26 22:02:18 +04:00
Lain Soykaf
eabdde8a20
Sec: Update hackney to version 4.9.1
Hackney 4.9 enforces max_body while it reads and returns
{:error, {:closed, partial}} for a truncated body; the hackney
regression tests now pin that. The certifi override goes, as
hackney itself now asks for certifi ~> 2.18.0.
2026-10-26 21:52:03 +04:00
Lain Soykaf
90479b3415
Sec: Update bandit to version 1.14.0 2026-10-26 21:48:31 +04:00
Lain Soykaf
da7e75ca73
fix(activitypub): check OAuth scopes on C2S endpoints
The C2S routes and the outbox/followers/following/replies collections
accepted a token with any scope. Requests with an OAuth token now need
the matching scope; HTTP signatures and Basic auth are not changed.
2026-10-26 12:49:58 +04:00
Lain Soykaf
dd42b02ca2
chore: remove unrouted PleromaAPI token and password controllers
Leftover copies from 120719f28; the router uses the OAuth ones. The
token copy still skipped the OAuth scope check.
2026-10-26 12:44:32 +04:00
Lain Soykaf
530ae4b339
feat(oauth): support the profile scope
A token with only the profile scope can call verify_credentials, as in
Mastodon 4.3. The answer is the public account, so apps can use it to
log users in without seeing their email or settings.
2026-10-26 12:29:51 +04:00
Lain Soykaf
c686b701dd
fix(oauth): require security scopes to list and revoke tokens
/api/oauth_tokens skipped the scope check, so a token with any scope
could list the user's sessions and revoke them.
2026-10-26 12:28:04 +04:00
lain
9edce3a0a6 Merge pull request 'Merge stable 2.11.0 into develop' (#8009) from merge-stable-2.11.0 into develop 2026-10-24 07:52:45 +00:00
lain
256882f8fb Merge pull request 'Release 2.11.0' (#8008) from release/2.11 into stable 2026-10-24 07:51:52 +00:00
Lain Soykaf
3f139680a3
Changelog: fix two list items in 2.11.0 2026-10-24 11:29:06 +04:00
Lain Soykaf
16d86dbaa9
Changelog: add plug_crypto 2.2.1 to 2.11.0 2026-10-24 09:38:16 +04:00
Lain Soykaf
e415eee9b6
Merge remote-tracking branch 'secteam/audit-mix-audit-report' into release/2.11 2026-10-24 09:37:34 +04:00
Lain Soykaf
6c5c5f2970
Sec: Update plug_crypto to version 2.2.1 2026-10-24 09:37:01 +04:00
Lain Soykaf
902fb8abc7
Changelog: add certifi 2.18.0 to 2.11.0 2026-10-24 08:47:35 +04:00
Lain Soykaf
8a5512f69f
Merge remote-tracking branch 'secteam/audit-mix-audit-report' into release/2.11 2026-10-24 08:46:14 +04:00
Lain Soykaf
932d1b6f94
Sec: Update certifi to version 2.18.0 2026-10-24 08:46:06 +04:00
feld
256c493ec6 Merge pull request 'Delete legacy Postgres sequences' (#7969) from legacy_sequences into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7969
2026-10-22 18:10:36 +00:00
Lain Soykaf
e085365d85
Changelog: add the review fixes to 2.11.0 2026-10-22 16:37:17 +04:00
Lain Soykaf
2982472d00
Merge branch 'fix/emudhra-ca-trust' (#77) into release/2.11 2026-10-22 16:37:08 +04:00
Lain Soykaf
9ea8d37e9f
Merge branch 'audit-mix-audit-report' (#69) into release/2.11
# Conflicts:
#	lib/pleroma/http/adapter_helper/hackney.ex
2026-10-22 16:37:08 +04:00
Lain Soykaf
532762bd9b
fix(http): keep the configured TLS options with Gun
[:http, :adapter, :ssl_options] is Hackney's key, and AdminFE sets it.
Gun reads tls_opts, so with Gun as the default these settings were lost
without a warning. Use them as tls_opts unless tls_opts is set.
2026-10-22 16:36:16 +04:00
Lain Soykaf
b2e4580a81
feat(http): make Gun the default HTTP client
Hackney 4 reads every response completely before Pleroma can check its
size, so max_body no longer limits downloads or memory there; Gun stops
at the limit. Document the Hackney limitation for those who switch back.
2026-10-22 16:36:16 +04:00
Lain Soykaf
1be50ed28b
fix(html): check link schemes the way browsers read them
FastSanitize checks the scheme with URI.parse/1, which finds none in
java<TAB>script:alert(1). Browsers remove tabs and newlines and leading
control characters first and run it as a javascript: link. The scrubbers
now use Pleroma.HTML.URIAttributes, which normalizes the URL the same
way before the scheme check.
2026-10-22 16:36:16 +04:00
Lain Soykaf
58d4f6aa2c
fix(formatter): percent-encode quotes in Markdown URLs instead of cutting
Cutting the URL at the first quote dropped the rest of valid links such
as ?q=&quot;cat&quot;&page=2. Percent-encoding ", < and > keeps the URL
complete and still keeps it inside the attribute.
2026-10-22 16:28:06 +04:00
Lain Soykaf
de6ac2392c
fix(formatter): keep links with formatted text in MFM posts
The email autolink clause also matched a link whose only child is an
element, raised on "mailto:" <> element, and the rescue turned the
whole post into escaped source text.
2026-10-22 16:25:54 +04:00
Lain Soykaf
1f2179872a
docs: require Elixir 1.17 and OTP 27 in the install guides 2026-10-22 16:25:03 +04:00
Lain Soykaf
e52ba68303
fix(http): make Hackney use HTTP/1.1 only
Hackney 4 negotiates HTTP/2 and shares one connection per host. The
media proxy closes a response with :hackney.close/1, which stops the
whole connection, so parallel downloads from one host broke each other.
2026-10-22 16:24:47 +04:00
Lain Soykaf
4943e6a914
fix(http): pass IP proxy hosts to Hackney as strings
ConfigDB turns a numeric proxy host into an IP tuple. Hackney 1 took it,
Hackney 4 ignores such a proxy and connects directly, which skips a
SOCKS proxy (Tor) without any error.
2026-10-22 16:23:40 +04:00
Lain Soykaf
302039e437
fix(http): keep admin CAs, secure HTTPS proxies, make insecure explicit
- An admin-set cacerts no longer gets the CAStore cacertfile added;
  Hackney drops cacerts when both are set.
- Set proxy_ssl_options too: with an HTTPS proxy, Hackney 4 uses them
  for the proxy connection and falls back to certifi.
- Hackney 4 ignores the top-level insecure option and uses certifi.
  Turn it into an explicit verify_none.
2026-10-22 15:31:30 +04:00
Lain Soykaf
8d8d9d3354
docs: recommend the published admin-fe stable build 2026-10-22 13:54:18 +04:00
Lain Soykaf
fa38d27b34
Changelog: add the admin-fe install fix to 2.11.0 2026-10-22 13:04:41 +04:00
Lain Soykaf
3faf7dd1c8
docs: only list published admin-fe builds
Only develop has a package. stable (2022) and the old tags have no
Woodpecker config, so they get no build.
2026-10-22 13:04:20 +04:00
Lain Soykaf
a03e5df39c
fix: install admin-fe from the package registry 2026-10-22 13:04:20 +04:00
Lain Soykaf
04528f29d0
Prepare 2.11.0 release 2026-10-22 11:34:11 +04:00
Lain Soykaf
fc91131892
Merge branch 'fix/emudhra-ca-trust' (#77) into release/2.11 2026-10-22 11:27:15 +04:00
Lain Soykaf
f4a3bc2300
Static: Update bundled frontend to 2.11.4 2026-10-22 11:23:51 +04:00
Lain Soykaf
accadd99f3
fix(mailer): make Mua trust the CAStore bundle
Mua (the SMTP adapter in the docs) trusts the OS CA store unless it gets
a CA. Pass the CAStore bundle, but keep a CA that the admin set.
2026-10-22 11:21:50 +04:00
Lain Soykaf
d698b96579
fix(search): make the Qdrant clients trust the CAStore bundle
The Qdrant and OpenAI clients do not go through Pleroma.HTTP, so on
Hackney they trusted certifi. Both send API keys. Give them the
configured adapter with the same TLS options.
2026-10-22 11:21:00 +04:00