summary refs log tree commit diff
path: root/synapse/federation (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-09-28Correctly retry replication HTTP requests on timeoutErik Johnston2-1/+5
2020-09-28A pair of tiny cleanups in the federation request code. (#8401)Richard van der Hoff3-3/+2
2020-09-28typoMatthew Hodgson1-1/+1
2020-09-25Escape the error description on the sso_error template. (#8405)Patrick Cloke2-1/+2
2020-09-25Fix occasional "Re-starting finished log context" from keyring (#8398)Richard van der Hoff3-90/+101
* 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.
2020-09-25Allow existing users to login via OpenID Connect. (#8345)Tdxdxoz6-17/+76
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.
2020-09-25Fix schema delta for servers that have not backfilled (#8396)Erik Johnston3-2/+9
Fixes #8395.
2020-09-24Fix MultiWriteIdGenerator's handling of restarts. (#8374)Erik Johnston7-30/+274
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.
2020-09-24s/URLs/variables in changelog v1.20.1 github/release-v1.20.1 release-v1.20.1Andrew Morgan1-1/+1
2020-09-24s/accidentally/incorrectly in changelogAndrew Morgan1-1/+1
2020-09-24Update changelog wordingAndrew Morgan1-1/+1
2020-09-241.20.1Andrew Morgan5-3/+17
2020-09-24Mark the shadow_banned column as boolean in synapse_port_db. (#8386)Patrick Cloke3-0/+2
2020-09-24Hotfix: disable autoescape by default when rendering Jinja2 templates (#8394)Andrew Morgan3-3/+12
#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.
2020-09-24Add type annotations to SimpleHttpClient (#8372)Richard van der Hoff4-61/+143
2020-09-24Add new sequences to port DB script (#8387)Erik Johnston2-0/+25
2020-09-24Add EventStreamPosition type (#8388)Erik Johnston11-57/+100
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)
2020-09-24Mark the shadow_banned column as boolean in synapse_port_db. (#8386)Patrick Cloke3-0/+2
2020-09-23Factor out `_send_dummy_event_for_room` (#8370)Richard van der Hoff2-48/+55
this makes it possible to use from the manhole, and seems cleaner anyway.
2020-09-23