- Jan 30, 2023
-
-
David Robertson authored
* Better test for bad values in power levels events The previous test only checked that Synapse didn't raise an exception, but didn't check that we had correctly interpreted the value of the dodgy power level. It also conflated two things: bad room notification levels, and bad user levels. There _is_ logic for converting the latter to integers, but we should test it separately. * Check we ignore types that don't convert to int * Handle `None` values in `notifications.room` * Changelog * Also test that bad values are rejected by event auth * Docstring * linter scripttttttttt
-
- Sep 07, 2022
-
-
reivilibre authored
Rename the `EventFormatVersions` enum values so that they line up with room version numbers. (#13706)
-
- Jul 13, 2022
-
-
Shay authored
-
- Jun 17, 2022
-
-
Richard van der Hoff authored
-
Richard van der Hoff authored
* Extend the auth rule checks for `m.room.create` events ... and move them up to the top of the function. Since the no auth_events are allowed for m.room.create events, we may as well get the m.room.create event checks out of the way first. * Add a test for create events with prev_events
-
- Jun 15, 2022
-
-
Richard van der Hoff authored
* Add auth events to events used in tests * Move some event auth checks out to a different method Some of the event auth checks apply to an event's auth_events, rather than the state at the event - which means they can play no part in state resolution. Move them out to a separate method. * Rename check_auth_rules_for_event Now it only checks the state-dependent auth rules, it needs a better name.
-
- Jun 12, 2022
-
-
Richard van der Hoff authored
Instead, use the `room_version` property of the event we're checking. The `room_version` was originally added as a parameter somewhere around #4482, but really it's been redundant since #6875 added a `room_version` field to `EventBase`.
-
Richard van der Hoff authored
In practice, when we run the auth rules, all of the events have the right room version. Let's stop building Room V1 events for these tests and use the right version.
-
- Oct 18, 2021
-
-
Richard van der Hoff authored
This fixes a bug where we would accept an event whose `auth_events` include rejected events, if the rejected event was shadowed by another `auth_event` with same `(type, state_key)`. The approach is to pass a list of auth events into `check_auth_rules_for_event` instead of a dict, which of course means updating the call sites. This is an extension of #10956.
-
- Oct 01, 2021
-
-
Patrick Cloke authored
This fixes a "Event not signed by authorising server" error when transition room member from join -> join, e.g. when updating a display name or avatar URL for restricted rooms.
-
- Sep 30, 2021
-
-
Patrick Cloke authored
This fixes a "Event not signed by authorising server" error when transition room member from join -> join, e.g. when updating a display name or avatar URL for restricted rooms.
-
- Sep 29, 2021
-
-
Richard van der Hoff authored
Broadly, the existing `event_auth.check` function has two parts: * a validation section: checks that the event isn't too big, that it has the rught signatures, etc. This bit is independent of the rest of the state in the room, and so need only be done once for each event. * an auth section: ensures that the event is allowed, given the rest of the state in the room. This gets done multiple times, against various sets of room state, because it forms part of the state res algorithm. Currently, this is implemented with `do_sig_check` and `do_size_check` parameters, but I think that makes everything hard to follow. Instead, we split the function in two and call each part separately where it is needed.
-
- Aug 09, 2021
-
-
Patrick Cloke authored
This adds support for MSC3289: room version 8. This is room version 7 + MSC3083.
-
- Jul 26, 2021
-
-
Patrick Cloke authored
-
- Jul 14, 2021
-
-
Patrick Cloke authored
-
- Apr 14, 2021
-
-
Jonathan de Jong authored
Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by:
Jonathan de Jong <jonathan@automatia.nl>`>
-
- Mar 31, 2021
-
-
Patrick Cloke authored
Per MSC3083.
-
- Feb 16, 2021
-
-
Eric Eastwood authored
- Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
-
- May 15, 2020
-
-
Patrick Cloke authored
-
- May 14, 2020
-
-
Patrick Cloke authored
In a new room version, the "notifications" key of power level events are subject to restricted auth rules.
-
- Mar 09, 2020
-
-
Patrick Cloke authored
-
- Feb 07, 2020
-
-
Richard van der Hoff authored
... and use it in places where it's trivial to do so. This will make it easier to pass room versions into the FrozenEvent constructors.
-
- Jan 28, 2020
-
-
Richard van der Hoff authored
These are easier to work with than the strings and we normally have one around. This fixes `FederationHander._persist_auth_tree` which was passing a RoomVersion object into event_auth.check instead of a string.
-
- May 10, 2019
-
-
Amber Brown authored
-
- Apr 01, 2019
-
-
Richard van der Hoff authored
Collect all the things that make room-versions different to one another into one place, so that it's easier to define new room versions.
-
- Jan 25, 2019
-
-
Erik Johnston authored
-
- Aug 10, 2018
-
-
black authored
-
- Jul 09, 2018
-
-
Amber Brown authored
-
- Jun 14, 2018
-
-
Richard van der Hoff authored
-
Richard van der Hoff authored
Make it so that, before there is a power-levels event in the room, you need a power level of at least 50 to send state. Partially addresses https://github.com/matrix-org/matrix-doc/issues/1192
-