- Oct 11, 2021
-
-
reivilibre authored
-
reivilibre authored
Pass through `SynapseError`s that are raised from experimental `check_event_allowed` callback of the module API (#11042) Co-authored-by:
Brendan Abolivier <babolivier@matrix.org>
-
reivilibre authored
-
reivilibre authored
Co-authored-by:
Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
-
- Oct 08, 2021
-
-
Eric Eastwood authored
-
Patrick Cloke authored
Searches the returned HTML for an oEmbed endpoint using the autodiscovery mechanism (`<link rel=...>`), and will request it to generate the preview.
-
Olivier Wilkinson (reivilibre) authored
-
Olivier Wilkinson (reivilibre) authored
Signed-off-by:
Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
-
Olivier Wilkinson (reivilibre) authored
-
Olivier Wilkinson (reivilibre) authored
-
David Robertson authored
Also mark `synapse.streams` as having has no untyped defs Co-authored-by:
Sean Quah <8349537+squahtx@users.noreply.github.com>
-
David Robertson authored
Updating mypy past version 0.9 means that third-party stubs are no-longer distributed with typeshed. See http://mypy-lang.blogspot.com/2021/06/mypy-0900-released.html for details. We therefore pull in stub packages in setup.py Additionally, some modules that we were previously ignoring import failures for now have stubs. So let's use them. The rest of this change consists of fixups to make the newer mypy + stubs pass CI. Co-authored-by:
Patrick Cloke <clokep@users.noreply.github.com>
-
David Robertson authored
This splits apart `handle_new_user` into a function which adds an entry to the `user_directory` and a function which updates the room sharing tables. I plan to continue doing more of this kind of refactoring to clarify the implementation.
-
Patrick Cloke authored
The shared ratelimit function was replaced with a dedicated RequestRatelimiter class (accessible from the HomeServer object). Other properties were copied to each sub-class that inherited from BaseHandler.
-
Sean Quah authored
Use `PreserveLoggingContext()` to ensure that logging contexts are not lost when exiting a read/write lock. When exiting a read/write lock, callbacks on a `Deferred` are triggered as a signal to any waiting coroutines. Any waiting coroutine that becomes runnable is likely to follow the Synapse logging context rules and will restore its own logging context, then either run to completion or await another `Deferred`, resetting the logging context in the process.
-
Nick Barrett authored
-
Erik Johnston authored
This also turns off calculating code coverage, as we didn't use it and it was a lot of noise
-
- Oct 07, 2021
-
-
David Robertson authored
-
Patrick Cloke authored
Hopefully this fixes these tests sometimes failing in CI.
-
David Robertson authored
Co-authored-by:
Patrick Cloke <clokep@users.noreply.github.com>
-
Richard van der Hoff authored
Include the event ids being peristed
-
Richard van der Hoff authored
-
Brendan Abolivier authored
Looks like the wrong exception type was caught in #10932.
-
- Oct 06, 2021
-
-
David Robertson authored
* `disallow-untyped-defs` for `synapse.state` Much smaller than I was expecting!
-
Andrew Morgan authored
Co-authored-by:
Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
-
Brendan Abolivier authored
This is in the context of creating new module callbacks that modules in https://github.com/matrix-org/synapse-dinsic can use, in an effort to reconcile the spam checker API in synapse-dinsic with the one in mainline. Note that a module callback already exists for 3pid invites (https://matrix-org.github.io/synapse/develop/modules/third_party_rules_callbacks.html#check_threepid_can_be_invited) but it doesn't check whether the sender of the invite is allowed to send it.
-
Patrick Cloke authored
This removes the magic allowing accessing configurable variables directly from the config object. It is now required that a specific configuration class is used (e.g. `config.foo` must be replaced with `config.server.foo`).
-
Brendan Abolivier authored
Co-authored-by:
Erik Johnston <erik@matrix.org>
-
Brendan Abolivier authored
Co-authored-by:
Sean Quah <8349537+squahtx@users.noreply.github.com>
-
David Robertson authored
Fix a long-standing bug where a batch of user directory changes would be silently dropped if the server left a room early in the batch. * Pull out `wait_for_background_update` in tests Co-authored-by:
Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by:
Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
-
Max Kratz authored
-
Nick Barrett authored
Signed-off-by:
Nick Barrett <nick@beeper.com>
-
David Robertson authored
The following modules now pass `disallow_untyped_defs`: * synapse.util.caches.cached_call * synapse.util.caches.lrucache * synapse.util.caches.response_cache * synapse.util.caches.stream_change_cache * synapse.util.caches.ttlcache pass * synapse.util.daemonize * synapse.util.patch_inline_callbacks pass `no-untyped-defs` * synapse.util.versionstring Additional typing in synapse.util.metrics. Didn't get this to pass `no-untyped-defs`, think I'll need to watch #10847
-
Max Kratz authored
-
- Oct 05, 2021
-
-
David Robertson authored
There are two steps to rebuilding the user directory: 1. a scan over rooms, followed by 2. a scan over local users. The former reads avatars and display names from the `room_memberships` table and therefore contains potentially private avatars and display names. The latter reads from the the `profiles` table which only contains public data; moreover it will overwrite any private profiles that the rooms scan may have written to the user directory. This means that the rebuild could leak private user while the rebuild was in progress, only to later cover up the leaks once the rebuild had completed. This change skips over local users when writing user_directory rows when scanning rooms. Doing so means that it'll take longer for a rebuild to make local users searchable, which is unfortunate. I think a future PR can improve this by swapping the order of the two steps above. (And indeed there's more to do here, e.g. copying from `profiles` without going via Python.) Small tidy-ups while I'm here: * Remove duplicated code from test_initial. This was meant to be pulled into `purge_and_rebuild_user_dir`. * Move `is_public` before updating sharing tables. No functional change; it's still before the first read of `is_public`. * Don't bother creating a set from dict keys. Slightly nicer and makes the code simpler. Co-authored-by:
Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
-
Eric Eastwood authored
We correctly allowed using the MSC2716 batch endpoint for the room creator in existing room versions but accidentally didn't track the events because of a logic flaw. This prevented you from connecting subsequent chunks together because it would throw the unknown batch ID error. We only want to process MSC2716 events when: - The room version supports MSC2716 - Any room where the homeserver has the `msc2716_enabled` experimental feature enabled and the event is from the room creator
-
Brendan Abolivier authored
-
Richard van der Hoff authored
When we consider whether to accept events, we should not accept those which depend on rejected events for their auth events. This (together with earlier changes such as https://github.com/matrix-org/synapse/pull/10771 and https://github.com/matrix-org/synapse/pull/10896) forms a partial fix to https://github.com/matrix-org/synapse/issues/9595. There still remain code paths where we do not check the `auth_events` at all.
-
Richard van der Hoff authored
`_check_event_auth` is only called in two places, and only one of those sets `send_on_behalf_of`. Warming the cache isn't really part of auth anyway, so moving it out makes a lot more sense.
-