- Sep 29, 2020
-
-
Andrew Morgan authored
Broken in https://github.com/matrix-org/synapse/pull/8275 and has yet to be put in a release. Fixes https://github.com/matrix-org/synapse/issues/8418. `next_link` is an optional parameter. However, we were checking whether the `next_link` param was valid, even if it wasn't provided. In that case, `next_link` was `None`, which would clearly not be a valid URL. This would prevent password reset and other operations if `next_link` was not provided, and the `next_link_domain_whitelist` config option was set.
-
Richard van der Hoff authored
One hope is that this might provide some insights into #3365.
-
Richard van der Hoff authored
* Remove `on_timeout_cancel` from `timeout_deferred` The `on_timeout_cancel` param to `timeout_deferred` wasn't always called on a timeout (in particular if the canceller raised an exception), so it was unreliable. It was also only used in one place, and to be honest it's easier to do what it does a different way. * Fix handling of connection timeouts in outgoing http requests Turns out that if we get a timeout during connection, then a different exception is raised, which wasn't always handled correctly. To fix it, catch the exception in SimpleHttpClient and turn it into a RequestTimedOutError (which is already a documented exception). Also add a description to RequestTimedOutError so that we can see which stage it failed at. * Fix incorrect handling of timeouts reading federation responses This was trapping the wrong sort of TimeoutError, so was never being hit. The effect was relatively minor, but we should fix this so that it does the expected thing. * Fix inconsistent handling of `timeout` param between methods `get_json`, `put_json` and `delete_json` were applying a different timeout to the response body to `post_json`; bring them in line and test. Co-authored-by:
Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by:
Erik Johnston <erik@matrix.org>
-
- Sep 28, 2020
-
-
Erik Johnston authored
-
Richard van der Hoff authored
-
Dagfinn Ilmari Mannsåker authored
This table was created in #8034 (1.20.0). It references `ui_auth_sessions`, which is ignored, so this one should be too. Signed-off-by:
Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
-
Richard van der Hoff authored
-
- Sep 27, 2020
-
-
Matthew Hodgson authored
-
- Sep 25, 2020
-
-
Patrick Cloke authored
-
Richard van der Hoff authored
* Fix test_verify_json_objects_for_server_awaits_previous_requests It turns out that this wasn't really testing what it thought it was testing (in particular, `check_context` was turning failures into success, which was making the tests pass even though it wasn't clear they should have been. It was also somewhat overcomplex - we can test what it was trying to test without mocking out perspectives servers. * Fix warnings about finished logcontexts in the keyring We need to make sure that we finish the key fetching magic before we run the verifying code, to ensure that we don't mess up our logcontexts.
-
Tdxdxoz authored
Co-authored-by:
Benjamin Koch <bbbsnowball@gmail.com> This adds configuration flags that will match a user to pre-existing users when logging in via OpenID Connect. This is useful when switching to an existing SSO system.
-
Erik Johnston authored
Fixes #8395.
-
- Sep 24, 2020
-
-
Andrew Morgan authored
-
Erik Johnston authored
On startup `MultiWriteIdGenerator` fetches the maximum stream ID for each instance from the table and uses that as its initial "current position" for each writer. This is problematic as a) it involves either a scan of events table or an index (neither of which is ideal), and b) if rows are being persisted out of order elsewhere while the process restarts then using the maximum stream ID is not correct. This could theoretically lead to race conditions where e.g. events that are persisted out of order are not sent down sync streams. We fix this by creating a new table that tracks the current positions of each writer to the stream, and update it each time we finish persisting a new entry. This is a relatively small overhead when persisting events. However for the cache invalidation stream this is a much bigger relative overhead, so instead we note that for invalidation we don't actually care about reliability over restarts (as there's no caches to invalidate) and simply don't bother reading and writing to the new table in that particular case.
-
Andrew Morgan authored
-
Andrew Morgan authored
-
Andrew Morgan authored
-
Patrick Cloke authored
-
Andrew Morgan authored
#8037 changed the default `autoescape` option when rendering Jinja2 templates from `False` to `True`. This caused some bugs, noticeably around redirect URLs being escaped in SAML2 auth confirmation templates, causing those URLs to break for users. This change returns the previous behaviour as it stood. We may want to look at each template individually and see whether autoescaping is a good idea at some point, but for now lets just fix the breakage.
-
Richard van der Hoff authored
-
Erik Johnston authored
-
Erik Johnston authored
The idea is to remove some of the places we pass around `int`, where it can represent one of two things: 1. the position of an event in the stream; or 2. a token that partitions the stream, used as part of the stream tokens. The valid operations are then: 1. did a position happen before or after a token; 2. get all events that happened before or after a token; and 3. get all events between two tokens. (Note that we don't want to allow other operations as we want to change the tokens to be vector clocks rather than simple ints)
-
Patrick Cloke authored
-
- Sep 23, 2020
-
-
Richard van der Hoff authored
this makes it possible to use from the manhole, and seems cleaner anyway.
-
Richard van der Hoff authored
I'd like to get a better insight into what we are doing with respect to state res. The list of state groups we are resolving across should be short (if it isn't, that's a massive problem in itself), so it should be fine to log it in ite entiretly. I've done some grepping and found approximately zero cases in which the "shortcut" code delivered the result, so I've ripped that out too.
-
Richard van der Hoff authored
-
Erik Johnston authored
This will allow us to hit the DB after we've finished using the generated stream ID.
-
Mathieu Velten authored
-
Andrew Morgan authored
When updating the `room_stats_state` table, we try to check for null bytes slipping in to the content for state events. It turns out we had added `guest_access` as a field to room_stats_state without including it in the null byte check. Lo and behold, a null byte in a `m.room.guest_access` event then breaks `room_stats_state` updates. This PR adds the check for `guest_access`.
-
Patrick Cloke authored
moves non-runtime dependencies out of synapse.python_dependencies (test and lint)
-
Julian Fietkau authored
This change adds a note and a few lines of configuration settings for Apache users to disable ModSecurity for Synapse's virtual hosts. With ModSecurity enabled and running with its default settings, Matrix clients are unable to send chat messages through the Synapse installation. With this change, ModSecurity can be disabled only for the Synapse virtual hosts.
-
- Sep 22, 2020
-
-
Andrew Morgan authored
-
Andrew Morgan authored
When updating room_stats_state, we try to check for null bytes slipping in to the content for state events. It turns out we had added guest_access as a field to room_stats_state without including it in the null byte check. Lo and behold, a null byte in a m.room.guest_access event then breaks room_stats_state updates. This PR adds the check for guest_access. A further PR will improve this function so that this hopefully does not happen again in future.
-
Dirk Klimpel authored
Fixes: #8359 Trying to reactivate a user with the admin API (`PUT /_synapse/admin/v2/users/<user_name>`) causes an internal server error. Seems to be a regression in #8033.
-
Dirk Klimpel authored
Add an admin API to read entries of table `event_reports`. API: `GET /_synapse/admin/v1/event_reports`
-
Andrew Morgan authored
-
Andrew Morgan authored
-
Andrew Morgan authored
-