mrf/object_age: fix handling of non-public objects #851
Open
Oneric
wants to merge 1 commit from
Oneric/akkoma:mrf-fix-oage
into develop
pull from: Oneric/akkoma:mrf-fix-oage
merge into: AkkomaGang:develop
AkkomaGang:develop
AkkomaGang:translations
AkkomaGang:customizable-docker-db
AkkomaGang:stable
AkkomaGang:static-adminfe
AkkomaGang:bad-uploader-config-warning
AkkomaGang:docker
AkkomaGang:user-expiry-backfill
AkkomaGang:config-db-keys
AkkomaGang:ensure-scrubbers-loaded
AkkomaGang:otp26
AkkomaGang:code-shaking-does-not-go-brr
AkkomaGang:elixir1.15
AkkomaGang:circleci
AkkomaGang:backup-fixes
AkkomaGang:mod-task
AkkomaGang:policy
AkkomaGang:mrf-coolness
AkkomaGang:frontend-switcher-9000
AkkomaGang:contentMap
AkkomaGang:language-on-posts
AkkomaGang:rabbit
AkkomaGang:credo-on-pr
AkkomaGang:unify-http
AkkomaGang:normalise-markup-by-default
AkkomaGang:buildx
1 commit
Author | SHA1 | Message | Date | |
---|---|---|---|---|
932810c35e |
mrf/object_age: fix handling of non-public objects
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test Pipeline is pending approval
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
|