Fix Pleroma’s unlisted posts #885
No reviewers
Labels
No labels
approved, awaiting change
bug
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs docs
needs tests
not a bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma#885
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "Oneric/akkoma:pleroma_unlisted"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two versions to pick from: either specifically tailored towards Pleroma’s unlisted posts or generally copying fields from the object as the one source of truth.
The latter should™ be safe and all good in theory and is what already effectively happens for fetched objects.
If you never encountered this: Pleroma’s unlisted posts (sometimes? not sure if its just from their reply MRF and/xor deliberate unlisted posts) end up being treated as followers-only in the API — except for those who are actually addressed due to a desync between object and Create activity addressing fields. (We use activity fields for access perm checks, but if access is granted apparently then object fields for assessing the visibility level...)
See the Pleroma issue linked in commit description which has been open for half a year
I actually basically never see this on my own instance (since when posts get fetched to fill threads rather than actively delivered to the inbox, only the Create addressing fields never show up at all), so I can't confirm it works in practice, but it seems straightforward enough
Alright, I can confirm now it isn’t just the reply MRF, though the symptoms differ for top-level posts.
For the latter the post will still be visible as per object addressing to all relevant partys via MastoAPI, but since the Create activity doesn't address public scope it gets omitted from search results etc. This too should be fixed by this patch
I haven’t looked into how exactly this difference comes to be, but faintly remember something about the activity_visibility database function traversing parent posts (via
Create
activities), so it seems likely this is a inconsistence between access checks for top-lvel and reply postsEither way, while this means eventually fixing legacy posts via db migration will be harder, existing code seemingly already assuming the addressing always matches just serves as a further argument to copy object addressing to the Create activity upon receipt
yea this seems sensible, i think it's safe to copy from object upwards... like it wouldn't make sense for the addressed user set to be disjoint between the create and the object would it? hm
i thiiiink this is ok
since that’s already happening for the same kind of post if it’s fetched instead of received, this should be safe for anything new, yeah
My only concern here and the reason this modifies incoming posts instead of changing our (apparently multiple?) access checks to always use the object is about stuff already saved in the database. Who knows what ancient Pleroma from N years ago did to those addressing fields...
Btw, since this is now being tested on akko.wtf I can confirm it works as intended in the real world
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.