- Mar 05, 2025
-
-
reivilibre authored
Follows: #18212 --------- Signed-off-by:
Olivier 'reivilibre <oliverw@matrix.org>
-
- Feb 25, 2025
-
-
Quentin Gliech authored
MSC4108 relies on ETag to determine if something has changed on the rendez-vous channel. Strong and correct ETag comparison works if the response body is bit-for-bit identical, which isn't the case if a proxy in the middle compresses the response on the fly. This adds a `no-transform` directive to the `Cache-Control` header, which tells proxies not to transform the response body. Additionally, some proxies (nginx) will switch to `Transfer-Encoding: chunked` if it doesn't know the Content-Length of the response, and 'weakening' the ETag if that's the case. I've added `Content-Length` headers to all responses, to hopefully solve that. This basically fixes QR-code login when nginx or cloudflare is involved, with gzip/zstd/deflate compression enabled.
-
- Feb 10, 2025
-
-
V02460 authored
Some small cleanups after Python3.8 became EOL. - Move some type imports from `typing_extensions` to `typing` - Remove the `abi3-py38` feature from pyo3 ### Pull Request Checklist <!-- Please read https://element-hq.github.io/synapse/latest/development/contributing_guide.html before submitting your pull request --> * [x] Pull request is based on the develop branch * [x] Pull request includes a [changelog file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog). The entry should: - Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from `EventStore` to `EventWorkerStore`.". - Use markdown where necessary, mostly for `code blocks`. - End with either a period (.) or an exclamation mark (!). - Start with a capital letter. - Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry. * [x] [Code style](https://element-hq.github.io/synapse/latest/code_style.html) is correct (run the [linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters) ) --------- Co-authored-by:
Quentin Gliech <quenting@element.io>
-
- Dec 05, 2024
-
-
Devon Hudson authored
Adds the RoomID & EventID rust types to the rust lib. Also adds a Deserialize impl to the existing UserID type. ### Pull Request Checklist <!-- Please read https://element-hq.github.io/synapse/latest/development/contributing_guide.html before submitting your pull request --> * [X] Pull request is based on the develop branch * [X] Pull request includes a [changelog file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog). The entry should: - Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from `EventStore` to `EventWorkerStore`.". - Use markdown where necessary, mostly for `code blocks`. - End with either a period (.) or an exclamation mark (!). - Start with a capital letter. - Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry. * [X] [Code style](https://element-hq.github.io/synapse/latest/code_style.html) is correct (run the [linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
-
- Nov 27, 2024
-
-
V02460 authored
Keep up-to-date with pyo3 releases. This bump enables Python 3.13 support and resolves deprecations. Links for quick reference: https://github.com/PyO3/pyo3/releases https://github.com/davidhewitt/pythonize/releases https://github.com/vorner/pyo3-log
-
- Nov 26, 2024
-
-
Quentin Gliech authored
This is a workaround for some proxy setup, where the ETag header gets stripped from the response headers unless there is a Content-Type header set. In particular, we saw this bug when putting Cloudflare in front of Synapse. I'm pretty sure this is a Cloudflare bug, as this behaviour isn't documented anywhere, and doesn't make sense whatsoever. --------- Co-authored-by:
Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
-
- Nov 14, 2024
-
-
Devon Hudson authored
### Pull Request Checklist <!-- Please read https://element-hq.github.io/synapse/latest/development/contributing_guide.html before submitting your pull request --> * [X] Pull request is based on the develop branch * [X] Pull request includes a [changelog file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog). The entry should: - Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from `EventStore` to `EventWorkerStore`.". - Use markdown where necessary, mostly for `code blocks`. - End with either a period (.) or an exclamation mark (!). - Start with a capital letter. - Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry. * [X] [Code style](https://element-hq.github.io/synapse/latest/code_style.html) is correct (run the [linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
-
- Oct 14, 2024
-
-
Tulir Asokan authored
-
Andrew Morgan authored
Clients will still only see this rule if the corresponding experimental feature, `msc4028_push_encrypted_events`, is also enabled. This aligns the implementation with MSC4028, specifically [this section](https://github.com/matrix-org/matrix-spec-proposals/blob/giomfo/push_encrypted_events/proposals/4028-push-all-encrypted-events-except-for-muted-rooms.md#unstable-prefix). See https://github.com/element-hq/synapse/issues/16846 for context.
-
- Jun 13, 2024
-
-
Eric Eastwood authored
Add `event.internal_metadata.instance_name` (the worker instance that persisted the event) to go alongside the existing `event.internal_metadata.stream_ordering`. `instance_name` is useful to properly compare and query for events with a token since you need to compare both the `stream_ordering` and `instance_name` against the vector clock/`instance_map` in the `RoomStreamToken`. This is pre-requisite work and may be used in https://github.com/element-hq/synapse/pull/17293 Adding `event.internal_metadata.instance_name` was first mentioned in the initial Sliding Sync PR while pairing with @erikjohnston, see https://github.com/element-hq/synapse/pull/17187/commits/09609cb0dbca3a4cfd9fbf90cc962e765ec469c0#diff-5cd773fb307aa754bd3948871ba118b1ef0303f4d72d42a2d21e38242bf4e096R405-R410
-
- May 08, 2024
-
-
Erik Johnston authored
This version change requires a migration to a new API. See https://pyo3.rs/v0.21.2/migration#from-020-to-021 This will fix the annoying warnings added when using the recent rust nightly: > warning: non-local `impl` definition, they should be avoided as they go against expectation
-
- Apr 29, 2024
-
-
Richard van der Hoff authored
Co-authored-by:
Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
-
- Apr 25, 2024
-
-
Quentin Gliech authored
Co-authored-by:
Hugh Nimmo-Smith <hughns@element.io> Co-authored-by:
Hugh Nimmo-Smith <hughns@users.noreply.github.com> Co-authored-by:
Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
-
- Apr 18, 2024
-
-
Quentin Gliech authored
This adds functions to transform a Twisted request to the `http::Request`, and then to send back an `http::Response` through it. It also imports the SynapseError exception so that we can throw that from Rust code directly Example usage of this would be: ```rust use crate::http::{http_request_from_twisted, http_response_to_twisted, HeaderMapPyExt}; fn handler(twisted_request: &PyAny) -> PyResult<()> { let request = http_request_from_twisted(twisted_request)?; let ua: headers::UserAgent = request.headers().typed_get_required()?; if whatever { return Err((crate::errors::SynapseError::new( StatusCode::UNAUTHORIZED, "Whatever".to_owned "M_UNAUTHORIZED", None, None, ))); } let response = Response::new("hello".as_bytes()); http_response_to_twisted(twisted_request, response)?; Ok(()) } ```
-
- Apr 17, 2024
-
-
Quentin Gliech authored
-
- Apr 09, 2024
-
-
Sumiran Pokharel authored
Co-authored-by:
Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
-
- Jan 23, 2024
-
-
Erik Johnston authored
During the migration the automated script to update the copyright headers accidentally got rid of some of the existing copyright lines. Reinstate them.
-
- Jan 22, 2024
-
-
Erik Johnston authored
The ecosystem e.g. regex crate, have bumped up their MSRV to 1.65.0, which was released Nov 2022. In line with our policy, let's bump to match.
-
- Jan 08, 2024
-
-
Erik Johnston authored
There are a couple of things we need to be careful of here: 1. The current python code does no validation when loading from the DB, so we need to be careful to ignore such errors (at least on jki.re there are some old events with internal metadata fields of the wrong type). 2. We want to be memory efficient, as we often have many hundreds of thousands of events in the cache at a time. --------- Co-authored-by:
Quentin Gliech <quenting@element.io>
-
- Dec 01, 2023
-
-
Andrew Yasinishyn authored
Signed-off-by:
Andrii Yasynyshyn <yasinishyn.a.n@gmail.com>
-
- Nov 22, 2023
-
-
V02460 authored
Signed-off-by:
Kai A. Hiller <V02460@gmail.com>
-
- Nov 21, 2023
-
-
Patrick Cloke authored
-
- Oct 06, 2023
-
-
V02460 authored
Signed-off-by:
Kai A. Hiller <V02460@gmail.com>
-
- Sep 28, 2023
-
-
Patrick Cloke authored
This allows maturin >= 0.15 to build the properly named shared library object. For now the old configuration is also kept to allow for older maturin installs to be used.
-
- Sep 26, 2023
-
-
Patrick Cloke authored
* Pre-compiles the server ACLs onto an object per room and invalidates them when new events come in. * Converts the server ACL checking into Rust.
-
Patrick Cloke authored
This unstable push rule is implemented behind an experimental configuration flag.
-
- Sep 05, 2023
-
-
Erik Johnston authored
-
- Aug 23, 2023
-
-
Patrick Cloke authored
-
- Aug 02, 2023
-
-
Patrick Cloke authored
* Updates the rule ID. * Use `event_property_is` instead of `event_match`. This updates the implementation of MSC3958 to match the latest text from the MSC.
-
- Jun 16, 2023
-
-
Mathieu Velten authored
Also fix wrong rule names for `is_user_mention` and `is_room_mention`.
-
- Jun 12, 2023
-
-
Erik Johnston authored
Important crates such as `log` and `regex` have bumped theirs to 1.60.0 as well.
-
- Jun 06, 2023
-
-
Patrick Cloke authored
-
- May 04, 2023
-
-
Patrick Cloke authored
A dont_notify action is a no-op (and coalesce is undefined). These are both considered no-ops by the spec, per MSC3987 and the predefined push rules were updated to remove dont_notify from the list of actions.
-
- Apr 26, 2023
-
-
Patrick Cloke authored
-
- Mar 07, 2023
-
-
Patrick Cloke authored
This removes the experimental configuration option and always escapes the push rule condition keys. Also escapes any (experimental) push rule condition keys in the base rules which contain dot in a field name.
-
Patrick Cloke authored
This removes the configuration flag & updates the identifiers to use the stable version.
-
- Mar 06, 2023
-
-
Patrick Cloke authored
This removes the configuration flag & updates the identifiers to use the stable version.
-
- Mar 03, 2023
-
-
Erik Johnston authored
As we use some nightly only options, e.g. to group and sort imports consistently.
-
- Mar 02, 2023
-
-
Patrick Cloke authored
Update intentional mentions (MSC3952) to depend on `exact_event_property_contains` (MSC3966). (#15051) This replaces the specific `is_user_mention` push rule condition used in MSC3952 with the generic `exact_event_property_contains` push rule condition from MSC3966.
-
- Feb 28, 2023
-
-
Patrick Cloke authored
Internally the push rules module uses a `pattern_type` property for `event_match` conditions (and `related_event_match`) to mark the condition as matching the current user's Matrix ID or localpart. This is leaky to the Client-Server API where a user can successfully set a condition which provides `pattern_type` instead of `pattern` (note that there's no benefit to doing this -- the user can just use their own Matrix ID or localpart instead). When serializing back to the client the `pattern_type` property is converted into a proper `pattern`. The following changes are made to avoid this: * Separate the `KnownCondition::EventMatch` enum value into `EventMatch` and `EventMatchType`, each with their own expected properties. (Note that a similar change is made for `RelatedEventMatch`.) * Make it such that the `pattern_type` variants serialize to the same condition kind, but cannot be deserialized (since they're only provided by base rules). * As a final tweak, convert `user_id` vs. `user_localpart` values into an enum.
-