Gapfilling from a server that can't check history visibility results in erroneously redacted events being persisted #1989
Labels
No labels
Abandoned
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
bob the builder
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
continuwuation/continuwuity#1989
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?
This is a known problem with Matrix (bad remote can serve you redacted events and you just have to trust them), but I think we should at least attempt to fetch the redacted events individually before just accepting that they're redacted

Wouldn't this be even more risky? If we fetch every redacted event the remote server sends, couldn't this end in a very easy DoS? Or am I misunderstanding the point of this issue?
Hm, but just persisting them without checking will also lead to a DoS by disk space exhaustion
what?
I was referring to this:
Though it seems I have misunderstood the nature of this Issue
Ah yeah. I mean that you just have to trust that the event is redacted, not that the event is authentic.
Since servers are supposed to serve redacted versions of events over federation if the requesting server can't see them, the only way to verify that the event is actually supposed to be redacted is by asking another server who might serve you an unredacted copy. There's no way to know if an event was redacted because a. you weren't allowed to see it, b. the event was actually redacted by a redaction event, or c. the remote decided it doesn't like you (malicious)
You can still verify redacted events and whatnot, you just can't see their contents (almost all event bodies just become
{})