- Sep 24, 2021
-
-
Jason Robinson authored
If the MAU count had been reached, Synapse incorrectly blocked appservice users even though they've been explicitly configured not to be tracked (the default). This was due to bypassing the relevant if as it was chained behind another earlier hit if as an elif. Signed-off-by:
Jason Robinson <jasonr@matrix.org>
-
David Robertson authored
* Improve typing in user_directory files This makes the user_directory.py in storage pass most of mypy's checks (including `no-untyped-defs`). Unfortunately that file is in the tangled web of Store class inheritance so doesn't pass mypy at the moment. The handlers directory has already been mypyed. Co-authored-by:
reivilibre <olivier@librepush.net>
-
Kokokokoka authored
This change adds a check for row existence before accessing row element, this should fix issue #10669 Signed-off-by:
Vasya Boytsov <vasiliy.boytsov@phystech.edu>
-
- Sep 23, 2021
-
-
Callum Brown authored
Per updates to MSC3231 in order to use the same grammar as other identifiers.
-
Richard van der Hoff authored
Factor out `_get_remote_auth_chain_for_event` from `_update_auth_events_and_context_for_auth` (#10884) * Reload auth events from db after fetching and persisting In `_update_auth_events_and_context_for_auth`, when we fetch the remote auth tree and persist the returned events: load the missing events from the database rather than using the copies we got from the remote server. This is mostly in preparation for additional refactors, but does have an advantage in that if we later get around to checking the rejected status, we'll be able to make use of it. * Factor out `_get_remote_auth_chain_for_event` from `_update_auth_events_and_context_for_auth` * changelog
-
Patrick Cloke authored
-
David Robertson authored
A follow-up to #10829
-
David Robertson authored
Co-authored-by:
Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Co-authored-by:
reivilibre <olivier@librepush.net> Co-authored-by:
Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
-
Patrick Cloke authored
This avoids the overhead of searching through the various configuration classes by directly referencing the class that the attributes are in. It also improves type hints since mypy can now resolve the types of the configuration variables.
-
Andrew Morgan authored
-
- Sep 22, 2021
-
-
Richard van der Hoff authored
Constructing an EventContext for an outlier is actually really simple, and there's no sense in going via an `async` method in the `StateHandler`. This also means that we can resolve a bunch of FIXMEs.
-
Hillery Shay authored
* add test to check if null code points are being inserted * add logic to detect and replace null code points before insertion into db * lints * add license to test * change approach to null substitution * add type hint for SearchEntry * Add changelog entry Signed-off-by:
H.Shay <shaysquared@gmail.com> * updated changelog * update chanelog message * remove duplicate changelog * Update synapse/storage/databases/main/events.py remove extra space Co-authored-by:
Patrick Cloke <clokep@users.noreply.github.com> * rename and move test file, update tests, delete old test file * fix typo in comments * update _find_highlights_in_postgres to replace null byte with space * replace null byte in sqlite search insertion * beef up and reorganize test for this pr * update changelog * add type hints and update docstring * check db engine directly vs using env variable * refactor tests to be less repetetive * move rplace logic into seperate function * requested changes * Fix typo. * Update synapse/storage/databases/main/search.py Co-authored-by:
reivilibre <olivier@librepush.net> * Update changelog.d/10820.misc Co-authored-by:
Aaron Raimist <aaron@raim.ist> Co-authored-by:
Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by:
reivilibre <olivier@librepush.net> Co-authored-by:
Aaron Raimist <aaron@raim.ist>
-
Tulir Asokan authored
The invalidation was missing in `_claim_e2e_one_time_key_returning`, which is used on SQLite 3.24+ and Postgres. This could break e2ee if nothing else happened to invalidate the caches before the keys ran out. Signed-off-by:
Tulir Asokan <tulir@beeper.com>
-
Richard van der Hoff authored
-
Patrick Cloke authored
* Improved titles (fall back to the author name if there's not title) and include the site name. * Handle photo/video payloads. * Include the original URL in the Open Graph response. * Fix the expiration time (by properly converting from seconds to milliseconds).
-
Sean Quah authored
The deprecated /initialSync endpoint maintains a cache of responses, using parameter values as part of the cache key. When a `from` or `to` parameter is specified, it gets converted into a `StreamToken`, which contains a `RoomStreamToken` and forms part of the cache key. `RoomStreamToken`s need to be made hashable for this to work.
-
Patrick Cloke authored
-
David Robertson authored
* Allow LruCaches to opt out of time-based expiry * Don't expire `get_users_who_share_room` & friends
-
David Teller authored
Extend ModuleApi with the methods we'll need to reject spam based on IP - resolves #10832 Signed-off-by:
David Teller <davidt@element.io>
-
Richard van der Hoff authored
I meant to do this before, in #10591, but because I'm stupid I forgot to do it for V2 and V3 events. I've factored the common code out to `EventBase` to save us having two copies of it. This means that for `FrozenEvent` we replace `self.get("event_id", None)` with `self.event_id`, which I think is safe. `get()` is an alias for `self._dict.get()`, whereas `event_id()` is an `@property` method which looks up `self._event_id`, which is populated during construction from the same dict. We don't seem to rely on the fallback, because if the `event_id` key is absent from the dict then construction of the `EventBase` object will fail. Long story short, the only way this could change behaviour is if `event_dict["event_id"]` is changed *after* the `EventBase` object is constructed without updating the `_event_id` field, or vice versa - either of which would be very problematic anyway and the behavior of `str(event)` is the least of our worries.
-
David Robertson authored
So we can see distinguish between "evicting because the cache is too big" and "evicting because the cache entries haven't been recently used".
-
- Sep 21, 2021
-
-
Eric Eastwood authored
See https://github.com/matrix-org/matrix-doc/pull/2716#discussion_r684574497 Dropping support for older MSC2716 room versions so we don't have to worry about supporting both chunk and batch events.
-
Patrick Cloke authored
-
Erik Johnston authored
-
Patrick Cloke authored
This should fix stale deleted files being still accessible.
-
Patrick Cloke authored
The major change is moving the decision of whether to use oEmbed further up the call-stack. This reverts the _download_url method to being a "dumb" functionwhich takes a single URL and downloads it (as it was before #7920). This also makes more minor refactorings: * Renames internal variables for clarity. * Factors out shared code between the HTML and rich oEmbed previews. * Fixes tests to preview an oEmbed image.
-
Brendan Abolivier authored
Test for #10830 Ideally the test would also make sure the new state event comes down sync, but this is probably good enough.
-
Hillery Shay authored
* add tests for checking if room search works with non-ascii char * change encoding on parse_string to UTF-8 * lints * properly encode search term * lints * add changelog file * update changelog number * set changelog entry filetype to .bugfix * Revert "set changelog entry filetype to .bugfix" This reverts commit be8e5a314251438ec4ec7dbc59ba32162c93e550. * update changelog message and file type * change parse_string default encoding back to ascii and update room search admin api calll to parse string * refactor tests * Update tests/rest/admin/test_room.py Co-authored-by:
Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by:
Patrick Cloke <clokep@users.noreply.github.com>
-
Eric Eastwood authored
Rename `/batch_send` query parameter from `?prev_event` to more obvious usage with `?prev_event_id` (MSC2716) (#10839) As mentioned in https://github.com/matrix-org/matrix-doc/pull/2716#discussion_r705872887 and https://github.com/matrix-org/synapse/issues/10737
-
David Robertson authored
-
David Robertson authored
It's a simplification, but one that'll help make the user directory logic easier to follow with the other changes upcoming. It's not strictly required for those changes, but this will help simplify the resulting logic that listens for `m.room.member` events and generally make the logic easier to follow. This means the config option `search_all_users` ends up controlling the search query only, and not the data we store. The cost of doing so is an extra row in the `user_directory` and `user_directory_search` tables for each local user which - belongs to no public rooms - belongs to no private rooms of size ≥ 2 I think the cost of this will be marginal (since they'll already have entries in `users` and `profiles` anyway). As a small upside, a homeserver whose directory was built with this change can toggle `search_all_users` without having to rebuild their directory. Co-authored-by:
Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
-
David Robertson authored
one day I'll learn how to spell hierarchy
-
David Robertson authored
-
David Robertson authored
-
David Robertson authored
-
Aaron Raimist authored
* Allow membership event to unban user Signed-off-by:
Aaron Raimist <aaron@raim.ist>
-
- Sep 20, 2021
-
-
David Robertson authored
This should ensure GHA runs synapse against the same-named sytest branch
-
Patrick Cloke authored
Adds missing type hints to methods in the synapse.handlers module and requires all methods to have type hints there. This also removes the unused construct_auth_difference method from the FederationHandler.
-
reivilibre authored
-