mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-05 07:32:46 +00:00
Ignore state events with invalid signatures when joining rooms (#1407)
* Use state from RespSendJoin post-check * Don't create input events for invalid events * Let's try this again * Update gomatrixserverlib * Update gomatrixserverlib to matrix-org/gomatrixserverlib@38f437f
This commit is contained in:
parent
c992f4f1f4
commit
1602df8752
4 changed files with 14 additions and 12 deletions
|
@ -30,7 +30,7 @@ func (r joinContext) CheckSendJoinResponse(
|
|||
server gomatrixserverlib.ServerName,
|
||||
respMakeJoin gomatrixserverlib.RespMakeJoin,
|
||||
respSendJoin gomatrixserverlib.RespSendJoin,
|
||||
) error {
|
||||
) (*gomatrixserverlib.RespState, error) {
|
||||
// A list of events that we have retried, if they were not included in
|
||||
// the auth events supplied in the send_join.
|
||||
retries := map[string][]gomatrixserverlib.Event{}
|
||||
|
@ -97,8 +97,9 @@ func (r joinContext) CheckSendJoinResponse(
|
|||
|
||||
// TODO: Can we expand Check here to return a list of missing auth
|
||||
// events rather than failing one at a time?
|
||||
if err := respSendJoin.Check(ctx, r.keyRing, event, missingAuth); err != nil {
|
||||
return fmt.Errorf("respSendJoin: %w", err)
|
||||
rs, err := respSendJoin.Check(ctx, r.keyRing, event, missingAuth)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("respSendJoin: %w", err)
|
||||
}
|
||||
return nil
|
||||
return rs, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue