Commit graph

16002 commits

Author SHA1 Message Date
floatingghost
9a46685e64 Merge pull request 'Set cleanup_attachments to true by default' (#910) from norm/akkoma:cleanup-attachments-default-true into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/910
Reviewed-by: Oneric <oneric@noreply.akkoma>
2025-05-09 16:49:49 +00:00
Norm
8712e06d27 Set cleanup_attachments to true by default
Since bcfbfbcff5 (part of
<https://akkoma.dev/AkkomaGang/akkoma/pulls/789>), the overhead for
cleaning up orphaned attachments has been drattically reduced.

Most admins are unaware of this option even existing, but may notice an
increase in the size of the uploads directory (or S3 bucket size if used
instead) even if auto-expiring posts are used. This should hopefully
make this problem more manageable.

For those that still encounter performance issues, the setting can still
be disabled if needed.
2025-05-08 18:12:56 -04:00
Oneric
6b97f085d8 Refresh mix.lock
Fixes omission in 936be4edbb
2025-05-06 17:24:58 +02:00
Oneric
818ddeca84 Merge pull request 'add instruction to make asdf work when logging into it with sudo' (#894) from shadowjonathan/akkoma:add-sudo-asdf into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/894
2025-05-05 20:45:50 +00:00
floatingghost
f0653efe13 Merge pull request 'Fix Pleroma’s unlisted posts' (#885) from Oneric/akkoma:pleroma_unlisted into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/885
2025-05-02 22:26:59 +00:00
floatingghost
cb51d69108 Merge pull request 'deps: upgrade flake_id to fix crash' (#906) from Oneric/akkoma:fix_flake_crash into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/906
Reviewed-by: floatingghost <hannah@coffee-and-dreams.uk>
2025-05-02 22:26:41 +00:00
Oneric
936be4edbb deps: upgrade flake_id to fix crash
Currently FlakeId.flake_id crashes if receiving non-UTF-8 binaries,
but we use it e.g. in the /:nick_or_id path used in akkoma-fe user
profiles.
With the upgrade such invalid binaries simply fail the id check.

Reported-in: https://meta.akkoma.dev/t/frontend-unicodeconversionerror/847
2025-05-02 21:46:04 +02:00
Jonathan de Jong
bb50e9050b rearrange shims 2025-04-26 16:17:31 +02:00
floatingghost
6a6d4254d5 Merge pull request 'api/statuses: allow expires_in to override user-level status_ttl_default' (#899) from Oneric/akkoma:expires_in_overriding_default_status_ttl into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/899
2025-04-09 12:24:26 +00:00
Oneric
984e5a121a api/statuses: allow expires_in to override user-level status_ttl_default
Fixes: https://akkoma.dev/AkkomaGang/akkoma/issues/898
2025-04-08 23:43:59 +02:00
Jonathan de Jong
64e7f25252 add instruction to make asdf work when logging into it with sudo 2025-03-31 13:27:25 +02:00
floatingghost
ff3aaa73ee Merge pull request 'exiftool/strip: hide warnings from log' (#883) from Oneric/akkoma:exiftool-hide-warning into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/883
2025-03-31 10:28:55 +00:00
floatingghost
3d032493eb Merge pull request 'fix: docs: arch linux split erlang package' (#879) from a/akkoma:develop into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/879
2025-03-31 10:27:26 +00:00
a
ab9a4ce0d5 remove specific split packages, refer only to erlang-headless or erlang 2025-03-19 20:15:57 +00:00
a
699c051101 erlang-headless now exists 2025-03-19 03:15:07 +00:00
Oneric
7ffbe2ad26 upload/filter/exiftool/strip: hide warnings from log 2025-03-18 01:01:47 +01:00
Oneric
0abe01be2e federation/in: always copy object addressing into its Create activity
Since we later only consider the Create activity for
access permission checks, but the semantically more
sensible set of fields are the object’s.

Changing the check itself to use the object may have unintended
consequences on already existing legacy posts as the old code
which processed it when it arrived may have never considered
effects on the objects addressing fields.
2025-03-17 23:08:27 +01:00
Oneric
cdf576b951 federation/in: fix activity addressing of Pleroma unlisted
While the object itself has the expected adressing for an
"unlisted" post, we always use the Create activity’s
adressing fields for permission checks.

To avoid unintended effects on legacy objects
we will continue to use the activity for access perm checks,
but fix its addressing fields based on its object data.

Ref: https://git.pleroma.social/pleroma/pleroma/-/issues/3323
2025-03-17 23:06:16 +01:00
a
dcfae9bfbf erlang-os_mon as well 2025-03-12 20:27:27 +00:00
a
efb901bdb5 fix: docs: arch linux split erlang package 2025-03-12 20:15:34 +00:00
Floatingghost
74182abb5b bump version 2025-03-11 20:48:27 +00:00
floatingghost
0a9cf8fa8b Merge pull request 'Test lowest and highest language versions, elixir 1.18 support' (#875) from ci-testing-all-versions into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/875
2025-03-11 20:47:54 +00:00
Oneric
066d5b48ed Fix Content-Type sanitisation for emoji and local uploads
This was accidentally broken in c8e0f7848b
due to a one-letter mistake in the plug option name and an absence of
tests. Therefore it was once again possible to serve e.g. Javascript or
CSS payloads via uploads and emoji.
However due to other protections it was still NOT possible for anyone to
serve any payload with an ActivityPub Content-Type. With the CSP policy
hardening from previous JS payload exloits predating the Content-Type
sanitisation, there is currently no known way of abusing this weakened
Content-Type sanitisation, but should be fixed regardless.

This commit fixes the option name and adds tests to ensure
such a regression doesn't occur again in the future.

Reported-by: Lain Soykaf <lain@lain.com>
2025-03-10 19:45:26 +01:00
Floatingghost
4a05b2d643 we do actually want to start oban-met... 2025-03-02 13:36:52 +00:00
Floatingghost
93200a8073 use latest ASDF instructions 2025-03-02 13:36:14 +00:00
Floatingghost
41a4ed1db5 specify correct version 2025-03-02 13:17:52 +00:00
Floatingghost
8e789c6236 1.14.1 min version 2025-03-02 13:07:03 +00:00
Floatingghost
184c62359f drop back to 1.14/OTP25 2025-03-02 13:04:10 +00:00
Floatingghost
829af03042 we don't support otp24, bump to 25 2025-03-02 12:19:14 +00:00
Floatingghost
842414b927 run the lint task on the latest version 2025-03-02 11:56:15 +00:00
Floatingghost
f176294d6d elixir 1.18 formatting 2025-03-02 11:54:00 +00:00
Floatingghost
b1c0b9e01a test lowest and highest supported versions on PR 2025-03-02 11:49:41 +00:00
Floatingghost
fc2c740008 dependency upgrade 2025-03-02 11:34:09 +00:00
Floatingghost
9da2cb881e upgrade oban migrations to v12 2025-03-02 11:32:40 +00:00
Floatingghost
522a168af6 force signatures for pinned posts 2025-03-01 17:27:45 +00:00
Floatingghost
59ea358e52 bump version 2025-03-01 16:36:04 +00:00
Floatingghost
d62808e4b6 move /outbox to signed pipeline 2025-03-01 16:28:12 +00:00
Floatingghost
7ccc560e4d prepare 2025.03 release 2025-03-01 12:19:43 +00:00
Floatingghost
a47b02cb69 Merge remote-tracking branch 'oneric-sec/sec-2024-12' into develop 2025-03-01 12:13:17 +00:00
Floatingghost
6222936673 use akk.dev mfm parser 2025-03-01 12:10:23 +00:00
floatingghost
d65cd1b141 Merge pull request 'Add oban web dashboard' (#871) from oban_web into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/871
2025-02-27 12:07:36 +00:00
floatingghost
d7dd34f263 Merge pull request 'Use FEP-c16b: Formatting MFM functions' (#823) from ilja/akkoma:use_fep-c16b_formatting_mfm_functions into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/823
2025-02-27 12:03:22 +00:00
Floatingghost
c2f60c9228 add a snapshot test for api prefixes 2025-02-23 16:51:48 +00:00
Floatingghost
13d650602b update deps 2025-02-23 16:32:55 +00:00
Floatingghost
a49f04bb4e Merge branch 'develop' into oban_web 2025-02-23 16:16:48 +00:00
Floatingghost
da7998e89e put oban route under a known prefix 2025-02-23 16:16:17 +00:00
ilja space
dce07f05d9 Merge branch 'develop' of https://akkoma.dev/AkkomaGang/akkoma into use_fep-c16b_formatting_mfm_functions 2025-02-23 10:13:44 +01:00
Oneric
7c23793e55 changelog: add entries for preceding commits 2025-02-21 19:37:27 +01:00
Oneric
8243fc0ef4 federation: strip internal fields from incoming updates and history
When note editing support was added, it was omitted to strip internal
fields from edited notes and their history.

This was uncovered due to Mastodon inlining the like count as a "likes"
collection conflicting with our internal "likes" list causing validation
failures. In a spot check with likes/like_count it was not possible to
inject those internal fields into the local db via Update, but this
was not extensively tested for all fields and avenues.

Similarly address normalisation did not normalise addressing in the
object history, although this was never at risk of being exploitable.

The revision history of the Pleroma MR adding edit support reveals
recusrive stripping was intentionally avoided, since it will end up
removing e.g. emoji from outgoing activities. This appears to still
be true. However, all current internal fields ("pleroma_interal"
appears to be unused) contain data already publicised otherwise anyway.
In the interest of fixing a federation bug (and at worst potential data
injection) quickly outgoing stripping is left non-recursive for now.

Of course the ultimate fix here is to not mix remote and internal data
into the same map in the first place, but unfortunately having a single
map of all truth is a core assumption of *oma's AP doc processing.
Changing this is a masive undertaking and not suitable for providing
a short-term fix.
2025-02-21 19:37:27 +01:00
Oneric
11ad4711eb signing_key: don't retrieve superfluous fields when loading ap_id 2025-02-21 19:37:27 +01:00