diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-11-05 22:13:37 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-05 22:13:37 +0000 |
commit | 0e3ab8afdc2b89ac2f47878112d93dd03d01f7ef (patch) | |
tree | 24ac6765c86588a0f91ebfa6fb5ebbf362941ae2 /synapse/handlers/federation.py | |
parent | Merge pull request #6336 from matrix-org/erikj/fix_phone_home_stats (diff) | |
download | synapse-0e3ab8afdc2b89ac2f47878112d93dd03d01f7ef.tar.xz |
Add some checks that we aren't using state from rejected events (#6330)
* Raise an exception if accessing state for rejected events Add some sanity checks on accessing state_group etc for rejected events. * Skip calculating push actions for rejected events It didn't actually cause any bugs, because rejected events get filtered out at various later points, but there's not point in trying to calculate the push actions for a rejected event.
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 8cafcfdab0..b7916de909 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -1688,7 +1688,11 @@ class FederationHandler(BaseHandler): # hack around with a try/finally instead. success = False try: - if not event.internal_metadata.is_outlier() and not backfilled: + if ( + not event.internal_metadata.is_outlier() + and not backfilled + and not context.rejected + ): yield self.action_generator.handle_push_actions_for_event( event, context ) |