Fix more interactions with invisible posts and corresponding data leaks #1036

Merged
Oneric merged 11 commits from Oneric/akkoma:fix-interacting-nonvisible-posts into develop 2025-12-24 02:43:01 +00:00
Owner

(hopefully) resolves #1035

Addresses omissions in !1014

Notably, the fix/improvements for unbookmarking and unfaving differ from Pleroma in that the entry is still removed eventhough it serves an error to the user. Plus an additional fix for trying to delete non-existing bookmarks

(hopefully) resolves #1035 Addresses omissions in !1014 Notably, the fix/improvements for unbookmarking and unfaving differ from Pleroma in that the entry is still removed eventhough it serves an error to the user. Plus an additional fix for trying to delete non-existing bookmarks
Cherry-picked-from: 2b76243ec8
Adjusted original patch to drop fields not present in Akkoma

Cherry-picked-from: 3f16965178
When a user tried to unpin a status not belonging to them, a full
MastoAPI response was sent back even if status was not visible to them.

Ditto with (un)mutting except ownership.

Cherry-picked-from: 2b76243ec8
Often raised errors get logged automatically,
but not always and here it doesn't seem to happen.
I’m not sure what the criteria for it being logged or not are tbh.
Cherry-picked-from: ed538603fb
Cherry-picked-from: 98f300c5ae
Also fixes Bookmark.destroy crashing when called with
parameters not mapping to any existing bookmark.

Partially-based-on: fe7108cbc2
Co-authored-by: Phantasm <phantasm@centrum.cz>
If a user successfully favourited a post in the past (implying they once
had access), but now no longer are alllowed to see  the (potentially
since edited) post, the request would still process and leak the current
status data in the response.

As a compromise to still allow retracting past favourites (if IDs are
still cached), the unfavouriting operation will still be processed, but
at the end lie to the user and return a "not found" error instead of
a success with forbidden data.

This was originally found by Phantasm and fixed in Pleroma as part of
https://git.pleroma.social/pleroma/pleroma/-/merge_requests/4400
but by completely preventing the favourite retraction.
changelog: add entries for recent fixes
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
b50028cf73
Oneric changed title from fix-interacting-nonvisible-posts to Fix more interactions with invisible posts and corresponding data leaks 2025-12-24 02:02:12 +00:00
test/mastodon_api/status: insert mute before testing unmute
Some checks failed
ci/woodpecker/pr/test/2 Pipeline failed
ci/woodpecker/pr/test/1 Pipeline failed
a35b63e5f4
Oneric force-pushed fix-interacting-nonvisible-posts from a35b63e5f4
Some checks failed
ci/woodpecker/pr/test/2 Pipeline failed
ci/woodpecker/pr/test/1 Pipeline failed
to be7ce02295
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
2025-12-24 02:42:25 +00:00
Compare
Oneric merged commit 68c79595fd into develop 2025-12-24 02:43:01 +00:00
Oneric deleted branch fix-interacting-nonvisible-posts 2025-12-24 02:43:01 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AkkomaGang/akkoma!1036
No description provided.