Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix bug where we added duplicate event IDs as auth_events #6560

Merged
merged 3 commits into from
Dec 17, 2019

Conversation

erikjohnston
Copy link
Member

All other call sites iterated through the list and (eventually) created dicts, which is why this isn't a problem elsewhere.

Broke in #6556.

@erikjohnston erikjohnston requested a review from a team December 17, 2019 13:13
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

(EventTypes.Member, event.sender),
(EventTypes.Create, ""),
]
auth_types = set(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be a shade more efficient to use a set literal rather than construct the set from a tuple?

auth_types = {
            (EventTypes.PowerLevels, ""),
            (EventTypes.Member, event.sender),
            (EventTypes.Create, ""),
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I keep forgetting about set tuples

@erikjohnston erikjohnston merged commit 5029422 into release-v1.7.1 Dec 17, 2019
richvdh added a commit that referenced this pull request Dec 18, 2019
Synapse 1.7.1 (2019-12-18)
==========================

This release includes several security fixes as well as a fix to a bug exposed by the security fixes. Administrators are encouraged to upgrade as soon as possible.

Security updates
----------------

- Fix a bug which could cause room events to be incorrectly authorized using events from a different room. ([\#6501](#6501), [\#6503](#6503), [\#6521](#6521), [\#6524](#6524), [\#6530](#6530), [\#6531](#6531))
- Fix a bug causing responses to the `/context` client endpoint to not use the pruned version of the event. ([\#6553](#6553))
- Fix a cause of state resets in room versions 2 onwards. ([\#6556](#6556), [\#6560](#6560))

Bugfixes
--------

- Fix a bug which could cause the federation server to incorrectly return errors when handling certain obscure event graphs. ([\#6526](#6526), [\#6527](#6527))
@erikjohnston erikjohnston deleted the erikj/duplicate_auth_events branch January 9, 2020 15:47
babolivier pushed a commit that referenced this pull request Sep 1, 2021
* commit '502942253':
  Fix bug where we added duplicate event IDs as auth_events (#6560)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants