- Sep 30, 2021
-
-
Patrick Cloke authored
Fix some harmless errors from background processes (mostly due to awaiting Mock objects) that occurred in the Synapse logs during unit tests.
-
- Sep 29, 2021
-
-
Patrick Cloke authored
-
- Aug 26, 2021
-
-
Richard van der Hoff authored
The idea here is to take anything to do with incoming events and move it out to a separate handler, as a way of making FederationHandler smaller.
-
- Aug 17, 2021
-
-
reivilibre authored
-
- Jun 24, 2021
-
-
Richard van der Hoff authored
Rather than persisting rejected events via `send_join` and friends, raise a 403 if someone tries to pull a fast one.
-
- Jun 15, 2021
-
-
Patrick Cloke authored
* Room version 7 for knocking. * Stable prefixes and endpoints (both client and federation) for knocking. * Removes the experimental configuration flag.
-
- Jun 09, 2021
-
-
Sorunome authored
This PR aims to implement the knock feature as proposed in https://github.com/matrix-org/matrix-doc/pull/2403 Signed-off-by:
Sorunome <mail@sorunome.de> Signed-off-by:
Andrew Morgan <andrewm@element.io>
-
- May 11, 2021
-
-
Richard van der Hoff authored
* tests for push rule pattern matching * tests for acl pattern matching * factor out common `re.escape` * Factor out common re.compile * Factor out common anchoring code * add word_boundary support to `glob_to_regex` * Use `glob_to_regex` in push rule evaluator NB that this drops support for character classes. I don't think anyone ever used them. * Improve efficiency of globs with multiple wildcards The idea here is that we compress multiple `*` globs into a single `.*`. We also need to consider `?`, since `*?*` is as hard to implement efficiently as `**`. * add assertion on regex pattern * Fix mypy * Simplify glob_to_regex * Inline the glob_to_regex helper function Signed-off-by:
Dan Callahan <danc@element.io> * Moar comments Signed-off-by:
Dan Callahan <danc@element.io> Co-authored-by:
Dan Callahan <danc@element.io>
-
- 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>`>
-
- Apr 09, 2021
-
-
Patrick Cloke authored
-
- Mar 18, 2021
-
-
Erik Johnston authored
Currently federation catchup will send the last *local* event that we failed to send to the remote. This can cause issues for large rooms where lots of servers have sent events while the remote server was down, as when it comes back up again it'll be flooded with events from various points in the DAG. Instead, let's make it so that all the servers send the most recent events, even if its not theirs. The remote should deduplicate the events, so there shouldn't be much overhead in doing this. Alternatively, the servers could only send local events if they were also extremities and hope that the other server will send the event over, but that is a bit risky.
-
- Mar 15, 2021
-
-
Erik Johnston authored
Federation catch up mode is very inefficient if the number of events that the remote server has missed is small, since handling gaps can be very expensive, c.f. #9492. Instead of going into catch up mode whenever we see an error, we instead do so only if we've backed off from trying the remote for more than an hour (the assumption being that in such a case it is more than a transient failure).
-
- 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
-
- Dec 30, 2020
-
-
Andrew Morgan authored
The `RoomDirectoryFederationTests` tests were not being run unless explicitly called as an `__init__.py` file was not present in `tests/federation/transport/`. Thus the folder was not a python module, and `trial` did not look inside for any test cases to run. This was found while working on #6739. This PR adds a `__init__.py` and also fixes the test in a couple ways: - Switch to subclassing `unittest.FederatingHomeserverTestCase` instead, which sets up federation endpoints for us. - Supply a `federation_auth_origin` to `make_request` in order to more act like the request is coming from another server, instead of just an unauthenicated client requesting a federation endpoint. I found that the second point makes no difference to the test passing, but felt like the right thing to do if we're testing over federation.
-
- Dec 15, 2020
-
-
Richard van der Hoff authored
This was never used, so let's get rid of it.
-
- Nov 16, 2020
-
-
Richard van der Hoff authored
-
- Sep 18, 2020
-
-
reivilibre authored
Signed-off-by:
Olivier Wilkinson (reivilibre) <olivier@librepush.net> Co-authored-by:
Patrick Cloke <clokep@users.noreply.github.com> * Fix _set_destination_retry_timings This came about because the code assumed that retry_interval could not be NULL — which has been challenged by catch-up.
-
- Sep 15, 2020
-
-
reivilibre authored
-
- Sep 10, 2020
-
-
Patrick Cloke authored
-
- Sep 08, 2020
-
-
Patrick Cloke authored
-
- Sep 07, 2020
-
-
reivilibre authored
-
- Sep 04, 2020
-
-
reivilibre authored
Signed-off-by:
Olivier Wilkinson (reivilibre) <olivier@librepush.net>
-
Patrick Cloke authored
-
- Aug 27, 2020
-
-
Patrick Cloke authored
-
- Aug 13, 2020
-
-
Patrick Cloke authored
-
- Jul 30, 2020
-
-
Patrick Cloke authored
-
- Jul 28, 2020
-
-
lugino-emeritus authored
Fixes #7901. Signed-off-by:
Niklas Tittjung <nik_t.01@web.de>
-
- Jul 24, 2020
-
-
Patrick Cloke authored
-
- Jun 10, 2020
-
-
Andrew Morgan authored
Fixes https://github.com/matrix-org/synapse/issues/2431 Adds config option `encryption_enabled_by_default_for_room_type`, which determines whether encryption should be enabled with the default encryption algorithm in private or public rooms upon creation. Whether the room is private or public is decided based upon the room creation preset that is used. Part of this PR is also pulling out all of the individual instances of `m.megolm.v1.aes-sha2` into a constant variable to eliminate typos ala https://github.com/matrix-org/synapse/pull/7637 Based on #7637
-
- Jun 04, 2020
-
-
Andrew Morgan authored
@uhoreg has confirmed these were both typos. They are only in comments and tests though, rather than anything critical. Introduced in: * https://github.com/matrix-org/synapse/pull/7157 * https://github.com/matrix-org/synapse/pull/5726
-
- May 22, 2020
-
-
Erik Johnston authored
The idea here is that if an instance persists an event via the replication HTTP API it can return before we receive that event over replication, which can lead to races where code assumes that persisting an event immediately updates various caches (e.g. current state of the room). Most of Synapse doesn't hit such races, so we don't do the waiting automagically, instead we do so where necessary to avoid unnecessary delays. We may decide to change our minds here if it turns out there are a lot of subtle races going on. People probably want to look at this commit by commit.
-
- Apr 03, 2020
-
-
Richard van der Hoff authored
Occasionally we could get a federation device list update transaction which looked like: ``` [ {'edu_type': 'm.device_list_update', 'content': {'user_id': '@user:test', 'device_id': 'D2', 'prev_id': [], 'stream_id': 12, 'deleted': True}}, {'edu_type': 'm.device_list_update', 'content': {'user_id': '@user:test', 'device_id': 'D1', 'prev_id': [12], 'stream_id': 11, 'deleted': True}}, {'edu_type': 'm.device_list_update', 'content': {'user_id': '@user:test', 'device_id': 'D3', 'prev_id': [11], 'stream_id': 13, 'deleted': True}} ] ``` Having `stream_ids` which are lower than `prev_ids` looks odd. It might work (I'm not actually sure), but in any case it doesn't seem like a reasonable thing to expect other implementations to support.
-
- Mar 30, 2020
-
-
Richard van der Hoff authored
make sure we clear out all but one update for the user
-
- Mar 27, 2020
-
-
Richard van der Hoff authored
-
- Mar 24, 2020
-
-
Richard van der Hoff authored
this is never set to anything other than "test", and is a source of unnecessary boilerplate.
-
- Feb 21, 2020
-
-
Patrick Cloke authored
Ensure good comprehension hygiene using flake8-comprehensions.
-
- 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.
-
- Dec 04, 2019
-
-
Neil Johnson authored
Ensure that the the default settings for the room directory are that the it is hidden from public view by default.
-
- Nov 27, 2019
-
-
Amber Brown authored
-
- Aug 20, 2019
-
-
Erik Johnston authored
-