This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Drop invalid PDUs instead of erroring #7543
Labels
A-Federation
A-Validation
500 (mostly) errors due to lack of event/parameter validation
P4
(OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patches
S-Minor
Blocks non-critical functionality, workarounds exist.
T-Defect
Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
z-bug
(Deprecated Label)
This is based on a conversation at matrix-org/matrix-spec-proposals#2540 (comment), summarized below:
Currently when an incoming federation event is "bad" for some reason it is rejected by returning a 400 error. This is particularly troublesome in endpoints where multiple events are handled at once, as the entire transaction gets rejected.
Reasons an event might be rejected include:
type
ordepth
depth
valuesevent_id
There are three proposed options for this situation:
It is potentially difficult to return a sensible error since (theoretically) you might not even be able to parse the event data and thus it is proposed to silently drop these events for now.
The text was updated successfully, but these errors were encountered: