Incomplete status visiblity fixes in PR 1014 #1035
Labels
No labels
approved, awaiting change
broken setup
bug
cannot reproduce
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs change/feedback
needs docs
needs tests
not a bug
not our 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#1035
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@Oneric Fixes in !1014 are incomplete and it is still possible to leak contents of private messages or otherwise interact with invisible posts through other CommonAPI/PleromaAPI routes like unfavorite and report.
What I think should be complete fixes along with new tests can be found in the Pleroma MR linked in your issue:
https://git.pleroma.social/pleroma/pleroma/-/merge_requests/4400
I tried to make the commits as concise as possible to ease porting, but considering I had to modify Akkoma commits to merge them cleanly, likely the same will happen here in reverse.
Note: I also changed the returned status code in MastoAPI to 404 to be more in line with what Mastodon does.
Going over the notes and commit titles+messages, after filtering out all C2S-write-actions (Akkoma does allow reading AP objects with an authorised OAuth token, just as if it was an S2S requet with am authorised signature)* and other Pleroma-specific stuff, i believe the following is the state of things; can you confirm I didn’t miss anything?:
(since Masto API also returns the (updated) object which was interacted with)
In Pleroma already had safeguards, but gracelessly failing with a 500 Internal serve error and no tests
This is a bit of an edge case, might in principle happen if one gets forcibly unfollowed, but the local client still has posts loaded. On the one hand, one should always be able to retract a previous like, on the other hand the post might have been edited in the meantime and one is not and never was allowed to see this updated state, yet Masto API demands the post be returned in the unfav response.
Unlikely to have much practical relevance, but i guess preventing retraction of the fav is the safer albeit somewhat unsatisfying option
(this was also hidden in the "unify response" commit)
(this is a "non-leaking", since the API response does not contain full status objects, only their ids, thus while nonsensical it didn’t leak anything)
Updates maybe being broken by the fixesI don't think you missed anything (except noted below), but probably at least go through the commits labeled Transmogrifier/MastodonAPI/CommonAPI/PleromaAPI to be sure and since they contain more (updated) tests.
I started taking the notes when things started to get out of and hard to remember for me, they were my todo list as I was going along, so that's why they are a bit off. They aren't a complete list of changes I made, hence the name. Don't trust them much.
/pin 400(now 422) test to be yours. Similarly with the EmojiReact note, by "partially added" I probably meant adding the C2S one, since I can't find other new EmojiReact tests made by me.prepare_outgoing) I think prevents outgoing profile updates from federating, lain also added a test for that, so you can check if Akkoma is affected.EDIT: Never mind, didn't see the edit until I posted it.
Thank you for the report and response!
I created a !1036 to hopefully fix all leaks and non-sensical interactions. Notably the unfaving and unbookmarking logic differs to allow retractions even after losing access while still preventing leaks.
Further response unifications and cosmetics might be picked up later.