- Jan 27, 2023
-
-
Patrick Cloke authored
MSC3952 defines push rules which searches for mentions in a list of Matrix IDs in the event body, instead of searching the entire event body for display name / local part. This is implemented behind an experimental configuration flag and does not yet implement the backwards compatibility pieces of the MSC.
-
- Jan 26, 2023
-
-
Patrick Cloke authored
* FIx-up type hints in tests.logging. * Add missing type hints to test_transactions.
-
Andrew Morgan authored
-
- Jan 25, 2023
-
-
Patrick Cloke authored
-
Andrew Morgan authored
-
- Jan 23, 2023
-
-
David Robertson authored
* Allow `AbstractSet` in `StrCollection` Or else frozensets are excluded. This will be useful in an upcoming commit where I plan to change a function that accepts `List[str]` to accept `StrCollection` instead. * `rooms_to_exclude` -> `rooms_to_exclude_globally` I am about to make use of this exclusion mechanism to exclude rooms for a specific user and a specific sync. This rename helps to clarify the distinction between the global config and the rooms to exclude for a specific sync. * Better function names for internal sync methods * Track a list of excluded rooms on SyncResultBuilder I plan to feed a list of partially stated rooms for this sync to ignore * Exclude partial state rooms during eager sync using the mechanism established in the previous commit * Track un-partial-state stream in sync tokens So that we can work out which rooms have become fully-stated during a given sync period. * Fix mutation of `@cached` return value This was fouling up a complement test added alongside this PR. Excluding a room would mean the set of forgotten rooms in the cache would be extended. This means that room could be erroneously considered forgotten in the future. Introduced in #12310, Synapse 1.57.0. I don't think this had any user-visible side effects (until now). * SyncResultBuilder: track rooms to force as newly joined Similar plan as before. We've omitted rooms from certain sync responses; now we establish the mechanism to reintroduce them into future syncs. * Read new field, to present rooms as newly joined * Force un-partial-stated rooms to be newly-joined for eager incremental syncs only, provided they're still fully stated * Notify user stream listeners to wake up long polling syncs * Changelog * Typo fix Co-authored-by:
Sean Quah <8349537+squahtx@users.noreply.github.com> * Unnecessary list cast Co-authored-by:
Sean Quah <8349537+squahtx@users.noreply.github.com> * Rephrase comment Co-authored-by:
Sean Quah <8349537+squahtx@users.noreply.github.com> * Another comment Co-authored-by:
Sean Quah <8349537+squahtx@users.noreply.github.com> * Fixup merge(?) * Poke notifier when receiving un-partial-stated msg over replication * Fixup merge whoops Thanks MV :) Co-authored-by:
Mathieu Velen <mathieuv@matrix.org> Co-authored-by:
Mathieu Velten <mathieuv@matrix.org> Co-authored-by:
Sean Quah <8349537+squahtx@users.noreply.github.com>
-
Patrick Cloke authored
* Skip processing stats for broken rooms. * Newsfragment * Use a custom exception.
-
- Jan 22, 2023
-
-
Andrew Morgan authored
-
- Jan 21, 2023
-
-
Andrew Morgan authored
-
- Jan 20, 2023
-
-
Erik Johnston authored
This ensures that all other workers are told about stream updates in a timely manner, without having to remember to manually poke replication.
-
Sean Quah authored
Currently, we will try to start a new partial state sync every time we perform a remote join, which is undesirable if there is already one running for a given room. We intend to perform remote joins whenever additional local users wish to join a partial state room, so let's ensure that we do not start more than one concurrent partial state sync for any given room. ------------------------------------------------------------------------ There is a race condition where the homeserver leaves a room and later rejoins while the partial state sync from the previous membership is still running. There is no guarantee that the previous partial state sync will process the latest join, so we restart it if needed. Signed-off-by:
Sean Quah <seanq@matrix.org>
-
- Jan 18, 2023
-
-
Erik Johnston authored
This should hopefully mitigate a class of races where data gets out of sync due a HTTP replication request racing with the replication streams.
-
Catalan Lover authored
* Change Documentation to have v10 as default room version * Change Default Room version to 10 * Add changelog entry for default room version swap * Add changelog entry for v10 default room version in docs * Clarify doc changelog entry Co-authored-by:
David Robertson <david.m.robertson1@gmail.com> * Improve Documentation changes. Co-authored-by:
David Robertson <david.m.robertson1@gmail.com> * Update Changelog entry to have correct format Co-authored-by:
David Robertson <david.m.robertson1@gmail.com> * Update Spec Version to 1.5 * Only need 1 changelog. * Fix test. * Update "Changed in" line Co-authored-by:
David Robertson <david.m.robertson1@gmail.com> Co-authored-by:
Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by:
Patrick Cloke <patrickc@matrix.org>
-
- Jan 17, 2023
-
-
David Robertson authored
Serving partial join responses is no longer experimental. They will only be served under the stable identifier if the the undocumented config flag experimental.msc3706_enabled is set to true. Synapse continues to request a partial join only if the undocumented config flag experimental.faster_joins is set to true; this setting remains present and unaffected.
-
Erik Johnston authored
We were incorrectly checking if the *local* token had been advanced, rather than the token for the remote instance. In practice, I don't think this has caused any bugs due to where we use `wait_for_stream_position`, as critically we don't use it on instances that also write to the given streams (and so the local token will lag behind all remote tokens).
-
- Jan 16, 2023
-
-
Sean Quah authored
Fix up #14812 to avoid introducing a reference to the reactor. Signed-off-by:
Sean Quah <seanq@matrix.org>
-
David Robertson authored
* Also use stable name in SendJoinResponse struct follow-up to #14832 * Changelog * Fix a rename I missed * Run black * Update synapse/federation/federation_client.py Co-authored-by:
Sean Quah <8349537+squahtx@users.noreply.github.com> Co-authored-by:
Sean Quah <8349537+squahtx@users.noreply.github.com>
-
- Jan 13, 2023
-
-
David Robertson authored
* Use new query param when requesting a partial join * Read new query param when serving partial join * Provide new field names when serving partial joins * Read new field names from partial join response * Changelog
-
Sean Quah authored
When there are many synchronous requests waiting on a `_PerHostRatelimiter`, each request will be started recursively just after the previous request has completed. Under the right conditions, this leads to stack exhaustion. A common way for requests to become synchronous is when the remote client disconnects early, because the homeserver is overloaded and slow to respond. Avoid stack exhaustion under these conditions by deferring subsequent requests until the next reactor tick. Fixes #14480. Signed-off-by:
Sean Quah <seanq@matrix.org>
-
- Jan 12, 2023
-
-
Erik Johnston authored
* Re-enable some linting * Newsfile * Remove comment
-
- Jan 11, 2023
-
-
Emelie Graven authored
-
Patrick Cloke authored
-
Patrick Cloke authored
-
- Jan 10, 2023
-
-
Richard van der Hoff authored
Two parts to this: * Bundle the whole of the replacement with any edited events. This is backwards-compatible so I haven't put it behind a flag. * Optionally, inhibit server-side replacement of edited events. This has scope to break things, so it is currently disabled by default.
-
- Jan 09, 2023
-
-
Jeyachandran Rathnam authored
It doesn't seem valid that HTML entities should appear in the title field of oEmbed responses, but a popular WordPress plug-in seems to do it. There should not be harm in unescaping these.
-
Jeyachandran Rathnam authored
* Fixes #12277 :Disable sending confirmation email when 3pid is disabled * Fix test_add_email_if_disabled test case to reflect changes to enable_3pid_changes flag * Add changelog file * Rename newsfragment. Co-authored-by:
Patrick Cloke <clokep@users.noreply.github.com>
-
- Jan 04, 2023
-
-
Patrick Cloke authored
PKCE can protect against certain attacks and is enabled by default. Support can be controlled manually by setting the pkce_method of each oidc_providers entry to 'auto' (default), 'always', or 'never'. This is required by Twitter OAuth 2.0 support.
-
- Dec 28, 2022
-
-
Patrick Cloke authored
Adds type hints to tests.metrics and tests.crypto.
-
- Dec 16, 2022
-
-
Patrick Cloke authored
-
Patrick Cloke authored
And do not allow untyped defs in tests.handlers.
-
- Dec 13, 2022
-
-
David Robertson authored
* Declare new config * Parse new config * Read new config * Don't use trial/our TestCase where it's not needed Before: ``` $ time trial tests/events/test_utils.py > /dev/null real 0m2.277s user 0m2.186s sys 0m0.083s ``` After: ``` $ time trial tests/events/test_utils.py > /dev/null real 0m0.566s user 0m0.508s sys 0m0.056s ``` * Helper to upsert to event fields without exceeding size limits. * Use helper when adding invite/knock state Now that we allow admins to include events in prejoin room state with arbitrary state keys, be a good Matrix citizen and ensure they don't accidentally create an oversized event. * Changelog * Move StateFilter tests should have done this in #14668 * Add extra methods to StateFilter * Use StateFilter * Ensure test file enforces typed defs; alphabetise * Workaround surprising get_current_state_ids * Whoops, fix mypy
-
- Dec 12, 2022
-
-
David Robertson authored
* Move `StateFilter` to `synapse.types` * Changelog
-
reivilibre authored
-
Brendan Abolivier authored
Fixes #13655 This change uses ICU (International Components for Unicode) to improve boundary detection in user search. This change also adds a new dependency on libicu-dev and pkg-config for the Debian packages, which are available in all supported distros.
-
- Dec 09, 2022
-
-
Patrick Cloke authored
Adds missing type hints to `tests.storage` package and does not allow untyped definitions.
-
Erik Johnston authored
-
Erik Johnston authored
This should help reduce the number of devices e.g. simple bots the repeatedly login rack up. We only delete non-e2e devices as they should be safe to delete, whereas if we delete e2e devices for a user we may accidentally break their ability to receive e2e keys for a message.
-
- Dec 08, 2022
-
-
Patrick Cloke authored
Returns a proper 404 with an errcode of M_RECOGNIZED for unknown endpoints per MSC3743.
-
Patrick Cloke authored
An empty cache does not mean the entity has no changed, if it is earlier than the earliest known stream position return that the entity *has* changed since the cache cannot accurately answer that query.
-
- Dec 07, 2022
-
-
Nick Mills-Barrett authored
If the room or event IDs are empty or of an invalid form they should be rejected.
-