Andrew Morgan
7affcd01c7
Merge branch 'develop' of github.com:matrix-org/synapse into anoa/user_param_ui_auth
...
* 'develop' of github.com:matrix-org/synapse: (369 commits)
Add functions to `MultiWriterIdGen` used by events stream (#8164 )
Do not allow send_nonmember_event to be called with shadow-banned users. (#8158 )
Changelog fixes
1.19.1rc1
Make StreamIdGen `get_next` and `get_next_mult` async (#8161 )
Wording fixes to 'name' user admin api filter (#8163 )
Fix missing double-backtick in RST document
Search in columns 'name' and 'displayname' in the admin users endpoint (#7377 )
Add type hints for state. (#8140 )
Stop shadow-banned users from sending non-member events. (#8142 )
Allow capping a room's retention policy (#8104 )
Add healthcheck for default localhost 8008 port on /health endpoint. (#8147 )
Fix flaky shadow-ban tests. (#8152 )
Fix join ratelimiter breaking profile updates and idempotency (#8153 )
Do not apply ratelimiting on joins to appservices (#8139 )
Don't fail /submit_token requests on incorrect session ID if request_token_inhibit_3pid_errors is turned on (#7991 )
Do not apply ratelimiting on joins to appservices (#8139 )
Micro-optimisations to get_auth_chain_ids (#8132 )
Allow denying or shadow banning registrations via the spam checker (#8034 )
Stop shadow-banned users from sending invites. (#8095 )
...
2020-08-26 12:22:25 +01:00
Erik Johnston
eba98fb024
Add functions to MultiWriterIdGen used by events stream ( #8164 )
2020-08-25 17:32:30 +01:00
Patrick Cloke
5099bd68da
Do not allow send_nonmember_event to be called with shadow-banned users. ( #8158 )
2020-08-25 10:52:15 -04:00
Brendan Abolivier
6e1c64a668
Merge tag 'v1.19.1rc1' into develop
...
Synapse 1.19.1rc1 (2020-08-25)
==============================
Bugfixes
--------
- Fix a bug introduced in v1.19.0 where appservices with ratelimiting disabled would still be ratelimited when joining rooms. ([\#8139](https://github.com/matrix-org/synapse/issues/8139 ))
- Fix a bug introduced in v1.19.0 that would cause e.g. profile updates to fail due to incorrect application of rate limits on join requests. ([\#8153](https://github.com/matrix-org/synapse/issues/8153 ))
2020-08-25 15:48:11 +01:00
Brendan Abolivier
0a4e541dc5
Changelog fixes
2020-08-25 15:29:57 +01:00
Brendan Abolivier
b79d69796c
1.19.1rc1
2020-08-25 15:24:39 +01:00
Erik Johnston
2231dffee6
Make StreamIdGen get_next and get_next_mult async ( #8161 )
...
This is mainly so that `StreamIdGenerator` and `MultiWriterIdGenerator`
will have the same interface, allowing them to be used interchangeably.
2020-08-25 15:10:08 +01:00
Andrew Morgan
74bf8d4d06
Wording fixes to 'name' user admin api filter ( #8163 )
...
Some fixes to wording I noticed after merging #7377 .
2020-08-25 15:03:24 +01:00
Andrew Morgan
79ac619403
Fix missing double-backtick in RST document
2020-08-25 14:24:06 +01:00
Manuel Stahl
97962ad17b
Search in columns 'name' and 'displayname' in the admin users endpoint ( #7377 )
...
* Search in columns 'name' and 'displayname' in the admin users endpoint
Signed-off-by: Manuel Stahl <manuel.stahl@awesome-technologies.de >
2020-08-25 14:18:14 +01:00
Patrick Cloke
5758dcf30c
Add type hints for state. ( #8140 )
2020-08-24 14:25:27 -04:00
Patrick Cloke
cbd8d83da7
Stop shadow-banned users from sending non-member events. ( #8142 )
2020-08-24 13:58:56 -04:00
Brendan Abolivier
420484a334
Allow capping a room's retention policy ( #8104 )
2020-08-24 18:21:04 +01:00
Christopher May-Townsend
64e8a4697a
Add healthcheck for default localhost 8008 port on /health endpoint. ( #8147 )
2020-08-24 18:15:18 +01:00
Patrick Cloke
3f8f96be00
Fix flaky shadow-ban tests. ( #8152 )
2020-08-24 13:08:33 -04:00
Brendan Abolivier
393a811a41
Fix join ratelimiter breaking profile updates and idempotency ( #8153 )
2020-08-24 18:06:04 +01:00
Will Hunt
2df82ae451
Do not apply ratelimiting on joins to appservices ( #8139 )
...
Add new method ratelimiter.can_requester_do_action and ensure that appservices are exempt from being ratelimited.
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
Co-authored-by: Erik Johnston <erik@matrix.org >
2020-08-24 14:53:53 +01:00
Brendan Abolivier
3f49f74610
Don't fail /submit_token requests on incorrect session ID if request_token_inhibit_3pid_errors is turned on ( #7991 )
...
* Don't raise session_id errors on submit_token if request_token_inhibit_3pid_errors is set
* Changelog
* Also wait some time before responding to /requestToken
* Incorporate review
* Update synapse/storage/databases/main/registration.py
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
* Incorporate review
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2020-08-24 11:33:55 +01:00
Will Hunt
cbbf9126cb
Do not apply ratelimiting on joins to appservices ( #8139 )
...
Add new method ratelimiter.can_requester_do_action and ensure that appservices are exempt from being ratelimited.
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
Co-authored-by: Erik Johnston <erik@matrix.org >
2020-08-21 15:07:56 +01:00
Richard van der Hoff
09fd0eda81
Micro-optimisations to get_auth_chain_ids ( #8132 )
2020-08-21 10:06:45 +01:00
Patrick Cloke
3f91638da6
Allow denying or shadow banning registrations via the spam checker ( #8034 )
2020-08-20 15:42:58 -04:00
Patrick Cloke
e259d63f73
Stop shadow-banned users from sending invites. ( #8095 )
2020-08-20 15:07:42 -04:00
Richard van der Hoff
318f4e738e
Be more tolerant of membership events in unknown rooms ( #8110 )
...
It turns out that not all out-of-band membership events are labelled as such,
so we need to be more accepting here.
2020-08-20 16:42:12 +01:00
Patrick Cloke
592cdf73be
Improve the error code when trying to register using a name reserved for guests. ( #8135 )
2020-08-20 10:39:41 -04:00
Patrick Cloke
dbc630a628
Use the JSON encoder without whitespace in more places. ( #8124 )
2020-08-20 10:32:33 -04:00
Patrick Cloke
5eac0b7e76
Add more types to synapse.storage.database. ( #8127 )
2020-08-20 09:00:59 -04:00
Patrick Cloke
731dfff347
Ensure a group ID is valid before trying to get rooms for it. ( #8129 )
2020-08-20 06:41:32 -04:00
Patrick Cloke
76c43f086a
Do not assume calls to runInteraction return Deferreds. ( #8133 )
2020-08-20 06:39:55 -04:00
Richard van der Hoff
12aebdfa5a
Close the database connection we create during startup ( #8131 )
...
... otherwise it gets leaked.
2020-08-19 20:41:53 +01:00
Erik Johnston
c9c544cda5
Remove ChainedIdGenerator. ( #8123 )
...
It's just a thin wrapper around two ID gens to make `get_current_token`
and `get_next` return tuples. This can easily be replaced by calling the
appropriate methods on the underlying ID gens directly.
2020-08-19 13:41:51 +01:00
Patrick Cloke
f594e434c3
Switch the JSON byte producer from a pull to a push producer. ( #8116 )
2020-08-19 08:07:57 -04:00
Ryan Cole
cfeb37f039
Updated docs: Added note about missing 308 redirect support. ( #8120 )
...
* Updated docs: Added note about missing 308 redirect support.
* Added changelog
2020-08-19 12:26:50 +01:00
Patrick Cloke
eebf52be06
Be stricter about JSON that is accepted by Synapse ( #8106 )
2020-08-19 07:26:03 -04:00
Patrick Cloke
d89692ea84
Convert runWithConnection to async. ( #8121 )
2020-08-19 07:09:24 -04:00
Patrick Cloke
d294f0e7e1
Remove the unused inlineCallbacks code-paths in the caching code ( #8119 )
2020-08-19 07:09:07 -04:00
Erik Johnston
76d21d14a0
Separate get_current_token into two. ( #8113 )
...
The function is used for two purposes: 1) for subscribers of streams to
get a token they can use to get further updates with, and 2) for
replication to track position of the writers of the stream.
For streams with a single writer the two scenarios produce the same
result, however the situation becomes complicated for streams with
multiple writers. The current `MultiWriterIdGenerator` does not
correctly handle the first case (which is not an issue as its only used
for the `caches` stream which nothing subscribes to outside of
replication).
2020-08-19 10:39:31 +01:00
Patrick Cloke
f40645e60b
Convert events worker database to async/await. ( #8071 )
2020-08-18 16:20:49 -04:00
Patrick Cloke
acfb7c3b5d
Add a link to the matrix-synapse-rest-password-provider. ( #8111 )
2020-08-18 09:54:35 -04:00
Patrick Cloke
3c01724b33
Fix the return type of send_nonmember_events. ( #8112 )
2020-08-18 09:53:13 -04:00
Andrew Morgan
5cf7c12995
Remove : from allowed client_secret chars ( #8101 )
...
Closes: https://github.com/matrix-org/synapse/issues/6766
Equivalent Sydent PR: https://github.com/matrix-org/sydent/pull/309
I believe it's now time to remove the extra allowed `:` from `client_secret` parameters.
2020-08-18 14:14:27 +01:00
Patrick Cloke
408aef8276
Rename changelog from bugfix to misc.
2020-08-18 09:09:11 -04:00
Patrick Cloke
2f4d60a5ba
Iteratively encode JSON responses to avoid blocking the reactor. ( #8013 )
2020-08-18 08:49:59 -04:00
Patrick Cloke
25e55d2598
Return the previous stream token if a non-member event is a duplicate. ( #8093 )
2020-08-18 07:53:23 -04:00
Andrew Morgan
8b6c176aee
Add resources.consent conditional dependency back ( #8107 )
...
Turns out that part of the codebase (synapse.config.server) checks for this key explicitly. Remove that check.
2020-08-18 10:59:54 +01:00
Patrick Cloke
050e20e7ca
Convert some of the general database methods to async ( #8100 )
2020-08-17 12:18:01 -04:00
Andrew Morgan
e04e465b4d
Use the default templates when a custom template file cannot be found ( #8037 )
...
Fixes https://github.com/matrix-org/synapse/issues/6583
2020-08-17 17:05:00 +01:00
Olivier Wilkinson (reivilibre)
8390e00c7f
Merge branch 'master' into develop
2020-08-17 14:28:49 +01:00
Olivier Wilkinson (reivilibre)
3234d5c305
Changelog changes
...
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2020-08-17 14:21:20 +01:00
Olivier Wilkinson (reivilibre)
ea4e4d2f0b
1.19.0
2020-08-17 14:12:46 +01:00
Patrick Cloke
ad6190c925
Convert stream database to async/await. ( #8074 )
2020-08-17 07:24:46 -04:00
Patrick Cloke
ac77cdb64e
Add a shadow-banned flag to users. ( #8092 )
2020-08-14 12:37:59 -04:00
Patrick Cloke
b069b78bb4
Convert pusher databases to async/await. ( #8075 )
2020-08-14 10:30:16 -04:00
Patrick Cloke
e8861957d9
Convert receipts and events databases to async/await. ( #8076 )
2020-08-14 10:05:19 -04:00
Erik Johnston
dc22090a67
Add type hints to synapse.handlers.room ( #8090 )
2020-08-14 14:47:53 +01:00
Patrick Cloke
6b7ce1d332
Remove some unused database functions. ( #8085 )
2020-08-14 09:25:40 -04:00
Patrick Cloke
894dae74fe
Convert misc database code to async ( #8087 )
2020-08-14 07:24:26 -04:00
Patrick Cloke
7bdf9828d5
Remove a space at the start of a changelog entry.
2020-08-13 14:16:18 -04:00
Olivier Wilkinson (reivilibre)
bfd79c2988
Merge tag 'v1.19.0rc1' into develop
...
Synapse 1.19.0rc1 (2020-08-13)
==============================
Removal warning
---------------
As outlined in the [previous release](https://github.com/matrix-org/synapse/releases/tag/v1.18.0 ), we are no longer publishing Docker images with the `-py3` tag suffix. On top of that, we have also removed the `latest-py3` tag. Please see [the announcement in the upgrade notes for 1.18.0](https://github.com/matrix-org/synapse/blob/develop/UPGRADE.rst#upgrading-to-v1180 ).
Features
--------
- Add option to allow server admins to join rooms which fail complexity checks. Contributed by @lugino-emeritus. ([\#7902](https://github.com/matrix-org/synapse/issues/7902 ))
- Add an option to purge room or not with delete room admin endpoint (`POST /_synapse/admin/v1/rooms/<room_id>/delete`). Contributed by @dklimpel. ([\#7964](https://github.com/matrix-org/synapse/issues/7964 ))
- Add rate limiting to users joining rooms. ([\#8008](https://github.com/matrix-org/synapse/issues/8008 ))
- Add a `/health` endpoint to every configured HTTP listener that can be used as a health check endpoint by load balancers. ([\#8048](https://github.com/matrix-org/synapse/issues/8048 ))
- Allow login to be blocked based on the values of SAML attributes. ([\#8052](https://github.com/matrix-org/synapse/issues/8052 ))
- Allow guest access to the `GET /_matrix/client/r0/rooms/{room_id}/members` endpoint, according to MSC2689. Contributed by Awesome Technologies Innovationslabor GmbH. ([\#7314](https://github.com/matrix-org/synapse/issues/7314 ))
Bugfixes
--------
- Fix a bug introduced in Synapse v1.7.2 which caused inaccurate membership counts in the room directory. ([\#7977](https://github.com/matrix-org/synapse/issues/7977 ))
- Fix a long standing bug: 'Duplicate key value violates unique constraint "event_relations_id"' when message retention is configured. ([\#7978](https://github.com/matrix-org/synapse/issues/7978 ))
- Fix "no create event in auth events" when trying to reject invitation after inviter leaves. Bug introduced in Synapse v1.10.0. ([\#7980](https://github.com/matrix-org/synapse/issues/7980 ))
- Fix various comments and minor discrepencies in server notices code. ([\#7996](https://github.com/matrix-org/synapse/issues/7996 ))
- Fix a long standing bug where HTTP HEAD requests resulted in a 400 error. ([\#7999](https://github.com/matrix-org/synapse/issues/7999 ))
- Fix a long-standing bug which caused two copies of some log lines to be written when synctl was used along with a MemoryHandler logger. ([\#8011](https://github.com/matrix-org/synapse/issues/8011 ), [\#8012](https://github.com/matrix-org/synapse/issues/8012 ))
Updates to the Docker image
---------------------------
- We no longer publish Docker images with the `-py3` tag suffix, as [announced in the upgrade notes](https://github.com/matrix-org/synapse/blob/develop/UPGRADE.rst#upgrading-to-v1180 ). ([\#8056](https://github.com/matrix-org/synapse/issues/8056 ))
Improved Documentation
----------------------
- Document how to set up a client .well-known file and fix several pieces of outdated documentation. ([\#7899](https://github.com/matrix-org/synapse/issues/7899 ))
- Improve workers docs. ([\#7990](https://github.com/matrix-org/synapse/issues/7990 ), [\#8000](https://github.com/matrix-org/synapse/issues/8000 ))
- Fix typo in `docs/workers.md`. ([\#7992](https://github.com/matrix-org/synapse/issues/7992 ))
- Add documentation for how to undo a room shutdown. ([\#7998](https://github.com/matrix-org/synapse/issues/7998 ), [\#8010](https://github.com/matrix-org/synapse/issues/8010 ))
Internal Changes
----------------
- Reduce the amount of whitespace in JSON stored and sent in responses. Contributed by David Vo. ([\#7372](https://github.com/matrix-org/synapse/issues/7372 ))
- Switch to the JSON implementation from the standard library and bump the minimum version of the canonicaljson library to 1.2.0. ([\#7936](https://github.com/matrix-org/synapse/issues/7936 ), [\#7979](https://github.com/matrix-org/synapse/issues/7979 ))
- Convert various parts of the codebase to async/await. ([\#7947](https://github.com/matrix-org/synapse/issues/7947 ), [\#7948](https://github.com/matrix-org/synapse/issues/7948 ), [\#7949](https://github.com/matrix-org/synapse/issues/7949 ), [\#7951](https://github.com/matrix-org/synapse/issues/7951 ), [\#7963](https://github.com/matrix-org/synapse/issues/7963 ), [\#7973](https://github.com/matrix-org/synapse/issues/7973 ), [\#7975](https://github.com/matrix-org/synapse/issues/7975 ), [\#7976](https://github.com/matrix-org/synapse/issues/7976 ), [\#7981](https://github.com/matrix-org/synapse/issues/7981 ), [\#7987](https://github.com/matrix-org/synapse/issues/7987 ), [\#7989](https://github.com/matrix-org/synapse/issues/7989 ), [\#8003](https://github.com/matrix-org/synapse/issues/8003 ), [\#8014](https://github.com/matrix-org/synapse/issues/8014 ), [\#8016](https://github.com/matrix-org/synapse/issues/8016 ), [\#8027](https://github.com/matrix-org/synapse/issues/8027 ), [\#8031](https://github.com/matrix-org/synapse/issues/8031 ), [\#8032](https://github.com/matrix-org/synapse/issues/8032 ), [\#8035](https://github.com/matrix-org/synapse/issues/8035 ), [\#8042](https://github.com/matrix-org/synapse/issues/8042 ), [\#8044](https://github.com/matrix-org/synapse/issues/8044 ), [\#8045](https://github.com/matrix-org/synapse/issues/8045 ), [\#8061](https://github.com/matrix-org/synapse/issues/8061 ), [\#8062](https://github.com/matrix-org/synapse/issues/8062 ), [\#8063](https://github.com/matrix-org/synapse/issues/8063 ), [\#8066](https://github.com/matrix-org/synapse/issues/8066 ), [\#8069](https://github.com/matrix-org/synapse/issues/8069 ), [\#8070](https://github.com/matrix-org/synapse/issues/8070 ))
- Move some database-related log lines from the default logger to the database/transaction loggers. ([\#7952](https://github.com/matrix-org/synapse/issues/7952 ))
- Add a script to detect source code files using non-unix line terminators. ([\#7965](https://github.com/matrix-org/synapse/issues/7965 ), [\#7970](https://github.com/matrix-org/synapse/issues/7970 ))
- Log the SAML session ID during creation. ([\#7971](https://github.com/matrix-org/synapse/issues/7971 ))
- Implement new experimental push rules for some users. ([\#7997](https://github.com/matrix-org/synapse/issues/7997 ))
- Remove redundant and unreliable signature check for v1 Identity Service lookup responses. ([\#8001](https://github.com/matrix-org/synapse/issues/8001 ))
- Improve the performance of the register endpoint. ([\#8009](https://github.com/matrix-org/synapse/issues/8009 ))
- Reduce less useful output in the newsfragment CI step. Add a link to the changelog section of the contributing guide on error. ([\#8024](https://github.com/matrix-org/synapse/issues/8024 ))
- Rename storage layer objects to be more sensible. ([\#8033](https://github.com/matrix-org/synapse/issues/8033 ))
- Change the default log config to reduce disk I/O and storage for new servers. ([\#8040](https://github.com/matrix-org/synapse/issues/8040 ))
- Add an assertion on `prev_events` in `create_new_client_event`. ([\#8041](https://github.com/matrix-org/synapse/issues/8041 ))
- Add a comment to `ServerContextFactory` about the use of `SSLv23_METHOD`. ([\#8043](https://github.com/matrix-org/synapse/issues/8043 ))
- Log `OPTIONS` requests at `DEBUG` rather than `INFO` level to reduce amount logged at `INFO`. ([\#8049](https://github.com/matrix-org/synapse/issues/8049 ))
- Reduce amount of outbound request logging at `INFO` level. ([\#8050](https://github.com/matrix-org/synapse/issues/8050 ))
- It is no longer necessary to explicitly define `filters` in the logging configuration. (Continuing to do so is redundant but harmless.) ([\#8051](https://github.com/matrix-org/synapse/issues/8051 ))
- Add and improve type hints. ([\#8058](https://github.com/matrix-org/synapse/issues/8058 ), [\#8064](https://github.com/matrix-org/synapse/issues/8064 ), [\#8060](https://github.com/matrix-org/synapse/issues/8060 ), [\#8067](https://github.com/matrix-org/synapse/issues/8067 ))
2020-08-13 18:22:58 +01:00
Olivier Wilkinson (reivilibre)
93848f3c89
More changelog tweaks
...
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2020-08-13 17:57:46 +01:00
Olivier Wilkinson (reivilibre)
4550b77312
More changelog tweaks
...
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2020-08-13 17:46:22 +01:00
Olivier Wilkinson (reivilibre)
a69ba6f457
Remove unwanted changelog line
...
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2020-08-13 17:17:37 +01:00
Olivier Wilkinson (reivilibre)
091ca3910d
1.19.0rc1
2020-08-13 17:12:21 +01:00
Richard van der Hoff
53834bb9c4
Run remove_push_actions_from_staging in foreground ( #8081 )
...
If we got an error persisting an event, we would try to remove the push actions
asynchronously, which would lead to a 'Re-starting finished log context'
warning.
I don't think there's any need for this to be asynchronous.
2020-08-13 17:05:31 +01:00
reivilibre
ff0e894656
Drop federation transmission queues during a significant remote outage. ( #7864 )
...
* Empty federation transmission queues when we are backing off.
Fixes #7828 .
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
* Address feedback
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
* Reword newsfile
2020-08-13 12:35:04 +01:00
Patrick Cloke
dd8f28bd3f
Fix unawaited coroutine error in tests. ( #8072 )
2020-08-13 07:11:39 -04:00
Patrick Cloke
fbe930dad2
Convert the roommember database to async/await. ( #8070 )
2020-08-12 12:14:34 -04:00
Patrick Cloke
5ecc8b5825
Convert devices database to async/await. ( #8069 )
2020-08-12 10:51:42 -04:00
Erik Johnston
5dd73d029e
Add type hints to handlers.message and events.builder ( #8067 )
2020-08-12 15:05:50 +01:00
Patrick Cloke
d68e10f308
Convert account data, device inbox, and censor events databases to async/await ( #8063 )
2020-08-12 09:29:06 -04:00
Patrick Cloke
a3a59bab7b
Convert appservice, group server, profile and more databases to async ( #8066 )
2020-08-12 09:28:48 -04:00
Erik Johnston
9d1e4942ab
Fix typing for notifier ( #8064 )
2020-08-12 14:03:08 +01:00
Erik Johnston
6ba621d786
Merge pull request #8060 from matrix-org/erikj/type_server
...
Change HomeServer definition to work with typing.
2020-08-11 22:32:14 +01:00
Patrick Cloke
04faa0bfa9
Convert tags and metrics databases to async/await ( #8062 )
2020-08-11 17:21:20 -04:00
Patrick Cloke
a0acdfa9e9
Converts event_federation and registration databases to async/await ( #8061 )
2020-08-11 17:21:13 -04:00
Erik Johnston
fdb46b5442
Merge remote-tracking branch 'origin/develop' into erikj/type_server
2020-08-11 22:03:14 +01:00
Erik Johnston
c066928915
Add comment explaining cast
2020-08-11 22:01:12 +01:00
Erik Johnston
61d8ff0d44
Auto set logging filter ( #8051 )
...
We do this to prevent foot guns. The default config uses a MemoryFilter,
but users are free to change to logging to files directly. If they do
then they have to ensure to set the `filters: [context]` on the right
handler, otherwise records get written with the wrong context.
Instead we move the logic to happen when we generate a record, which is
when we *log* rather than *handle*.
(It's possible to add filters to loggers in the config, however they
don't apply to descendant loggers and so they have to be manually set on
*every* logger used in the code base)
2020-08-11 21:58:56 +01:00
Erik Johnston
3c796e4159
Update changelog.d/8051.misc
...
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2020-08-11 21:08:43 +01:00
Erik Johnston
a1e9bb9eae
Add typing info to Notifier ( #8058 )
2020-08-11 19:40:02 +01:00
Erik Johnston
8a3dac3c19
Handle optional dependencies for Oidc and Saml
2020-08-11 18:20:45 +01:00
Erik Johnston
e1af09dccb
Newsfile
2020-08-11 18:10:46 +01:00
Erik Johnston
0304ad0c3d
Move setting of Filter into code.
...
We do this to prevent foot guns. The default config uses a MemoryFilter,
but users are free to change to logging to files directly. If they do
then they have to ensure to set the `filters: [context]` on the right
handler, otherwise records get written with the wrong context.
Instead we move the logic to happen when we generate a record, which is
when we *log* rather than *handle*.
(It's possible to add filters to loggers in the config, however they
don't apply to descendant loggers and so they have to be manually set on
*every* logger used in the code base)
2020-08-11 18:10:46 +01:00
Erik Johnston
a0f574f3c2
Reduce INFO logging ( #8050 )
...
c.f. #8021
A lot of the code here is to change the `Completed 200 OK` logging to include the request URI so that we can drop the `Sending request...` log line.
Some notes:
1. We won't log retries, which may be confusing considering the time taken log line includes retries and sleeps.
2. The `_send_request_with_optional_trailing_slash` will always be logged *without* the forward slash, even if it succeeded only with the forward slash.
2020-08-11 18:10:07 +01:00
Erik Johnston
db131b6b22
Change the default log config to reduce disk I/O and storage ( #8040 )
...
* Change default log config to buffer by default.
This batches up writes to the filesystem, which is more efficient for
disk I/O. This means that it can take some time for logs to get written
to disk. Note that ERROR logs (and above) immediately flush the buffer.
This only effects new installs, as we only write the log config if
started with `--generate-config` (in the same way we do for generating
signing keys).
* Default to keeping last 4 days of logs.
This hopefully reduces the amount of logs kept for new servers. Keeping
the last 1GB of logs is likely overkill for new servers, but equally may
not be enough for busy ones.
Instead, we keep the last four days worth of logs, enough so that admins
can investigate any problems that happened over e.g. a long weekend.
2020-08-11 18:09:46 +01:00
Erik Johnston
64e5bb0dc8
Newsfile
2020-08-11 18:03:26 +01:00
Erik Johnston
0f1afbe8dc
Change HomeServer definition to work with typing.
...
Duplicating function signatures between server.py and server.pyi is
silly. This commit changes that by changing all `build_*` methods to
`get_*` methods and changing the `_make_dependency_method` to work work
as a descriptor that caches the produced value.
There are some changes in other files that were made to fix the typing
in server.py.
2020-08-11 18:00:17 +01:00
Richard van der Hoff
0cb169900e
Implement login blocking based on SAML attributes ( #8052 )
...
Hopefully this mostly speaks for itself. I also did a bit of cleaning up of the
error handling.
Fixes #8047
2020-08-11 16:08:10 +01:00
Richard van der Hoff
aa827b6ad7
Merge remote-tracking branch 'origin/master' into develop
2020-08-10 23:42:12 +01:00
Richard van der Hoff
39c3f68758
Stop uploading -py3 docker images ( #8056 )
2020-08-10 23:41:50 +01:00
Richard van der Hoff
fcbab08cbd
Add an assertion on prev_events in create_new_client_event ( #8041 )
...
I think this would have caught all the cases in
https://github.com/matrix-org/synapse/issues/7642 - and I think a 500 makes
more sense here than a 403
2020-08-10 12:29:47 +01:00
Brendan Abolivier
cdbb8e6d6e
Implement new experimental push rules ( #7997 )
...
With an undocumented configuration setting to enable them for specific users.
2020-08-10 11:48:01 +01:00
Brendan Abolivier
5c43c43240
Typo
2020-08-10 11:23:24 +01:00
Brendan Abolivier
1a3aabcf3f
Lint
2020-08-10 11:13:21 +01:00
Brendan Abolivier
cee6c6012e
why mypy why
2020-08-10 11:10:34 +01:00
Patrick Cloke
7f837959ea
Convert directory, e2e_room_keys, end_to_end_keys, monthly_active_users database to async ( #8042 )
2020-08-07 13:36:29 -04:00
Patrick Cloke
f3fe6961b2
Convert additional database stores to async/await ( #8045 )
2020-08-07 12:17:17 -04:00
Travis Ralston
1048ed2afa
Clarify that undoing a shutdown might not be possible ( #8010 )
2020-08-07 17:16:24 +01:00
Richard van der Hoff
de6f892065
Add a comment about SSLv23_METHOD ( #8043 )
2020-08-07 15:14:29 +01:00
Erik Johnston
2f9fd5ab00
Don't log OPTIONS request at INFO ( #8049 )
2020-08-07 14:53:05 +01:00
Patrick Cloke
4e874ed593
Remove unnecessary maybeDeferred calls ( #8044 )
2020-08-07 09:44:48 -04:00
Erik Johnston
7620912d84
Add health check endpoint ( #8048 )
2020-08-07 14:21:24 +01:00
David Vo
4dd27e6d11
Reduce unnecessary whitespace in JSON. ( #7372 )
2020-08-07 08:02:55 -04:00
Brendan Abolivier
367e9e6e9e
Lint
2020-08-06 17:57:58 +01:00
Brendan Abolivier
bf33d5c457
Incorporate review
2020-08-06 17:52:34 +01:00
Brendan Abolivier
2ffd6783c7
Revert #7736 ( #8039 )
2020-08-06 17:15:35 +01:00
Patrick Cloke
fe6cfc80ec
Convert some util functions to async ( #8035 )
2020-08-06 08:39:35 -04:00
Patrick Cloke
d4a7829b12
Convert synapse.api to async/await ( #8031 )
2020-08-06 08:30:06 -04:00
Patrick Cloke
c36228c403
Convert run_as_background_process inner function to async. ( #8032 )
2020-08-06 08:20:42 -04:00
Patrick Cloke
66f24449dd
Improve performance of the register endpoint ( #8009 )
2020-08-06 08:09:55 -04:00
Brendan Abolivier
118a9eafb3
Merge branch 'develop' of github.com:matrix-org/synapse into babolivier/new_push_rules
2020-08-06 10:52:50 +01:00
Brendan Abolivier
dd11f575a2
Incorporate review
2020-08-06 10:52:26 +01:00
Erik Johnston
079bc3c8e3
Fixup worker doc (again) ( #8000 )
2020-08-06 10:35:59 +01:00
Erik Johnston
a7bdf98d01
Rename database classes to make some sense ( #8033 )
2020-08-05 21:38:57 +01:00
Richard van der Hoff
0a86850ba3
Stop the parent process flushing the logs on exit ( #8012 )
...
This solves the problem that the first few lines are logged twice on matrix.org. Hopefully the comments explain it.
2020-08-05 09:35:17 +01:00
Richard van der Hoff
8b786db323
bug report template: move comments into comment ( #8030 )
2020-08-05 09:34:42 +01:00
Andrew Morgan
7cac9006d6
Spruce up the check-newsfragment CI output ( #8024 )
...
This PR:
* Reduces the amount of noise in the `check-newsfragment` CI output by hiding the dependency installation output by default.
* Prints a link to the changelog/debian changelog section of the contributing guide if an error is found.
2020-08-04 22:10:23 +01:00
Patrick Cloke
8ff2deda72
Fix async/await calls for broken media providers. ( #8027 )
2020-08-04 09:44:25 -04:00
Patrick Cloke
88a3ff12f0
Convert the SimpleHttpClient to async. ( #8016 )
2020-08-04 07:22:04 -04:00
Patrick Cloke
e19de43eb5
Convert streams to async. ( #8014 )
2020-08-04 07:21:47 -04:00
Richard van der Hoff
916cf2d439
re-implement daemonize ( #8011 )
...
This has long been something I've wanted to do. Basically the `Daemonize` code
is both too flexible and not flexible enough, in that it offers a bunch of
features that we don't use (changing UID, closing FDs in the child, logging to
syslog) and doesn't offer a bunch that we could do with (redirecting stdout/err
to a file instead of /dev/null; having the parent not exit until the child is
running).
As a first step, I've lifted the Daemonize code and removed the bits we don't
use. This should be a non-functional change. Fixing everything else will come
later.
2020-08-04 10:03:41 +01:00
Andrew Morgan
481f76c7aa
Remove signature check on v1 identity server lookups ( #8001 )
...
We've [decided](https://github.com/matrix-org/synapse/issues/5253#issuecomment-665976308 ) to remove the signature check for v1 lookups.
The signature check has been removed in v2 lookups. v1 lookups are currently deprecated. As mentioned in the above linked issue, this verification was causing deployments for the vector.im and matrix.org IS deployments, and this change is the simplest solution, without being unjustified.
Implementations are encouraged to use the v2 lookup API as it has [increased privacy benefits](https://github.com/matrix-org/matrix-doc/pull/2134 ).
2020-08-03 21:56:43 +01:00
Andrew Morgan
5d92a1428c
Prevent join->join membership transitions changing member count ( #7977 )
...
`StatsHandler` handles updates to the `current_state_delta_stream`, and updates room stats such as the amount of state events, joined users, etc.
However, it counts every new join membership as a new user entering a room (and that user being in another room), whereas it's possible for a user's membership status to go from join -> join, for instance when they change their per-room profile information.
This PR adds a check for join->join membership transitions, and bails out early, as none of the further checks are necessary at that point.
Due to this bug, membership stats in many rooms have ended up being wildly larger than their true values. I am not sure if we also want to include a migration step which recalculates these statistics (possibly using the `_populate_stats_process_rooms` bg update).
Bug introduced in the initial implementation https://github.com/matrix-org/synapse/pull/4338 .
2020-08-03 21:54:24 +01:00
Patrick Cloke
6812509807
Implement handling of HTTP HEAD requests. ( #7999 )
2020-08-03 08:45:42 -04:00
Patrick Cloke
2a89ce8cd4
Convert the crypto module to async/await. ( #8003 )
2020-08-03 08:29:01 -04:00
Michael Albert
b6c6fb7950
Allow guests to operate in encrypted rooms ( #7314 )
...
Signed-off-by: Michael Albert <michael.albert@awesome-technologies.de >
2020-08-03 12:13:49 +01:00
Patrick Cloke
3b415e23a5
Convert replication code to async/await. ( #7987 )
2020-08-03 07:12:55 -04:00
Patrick Cloke
db5970ac6d
Convert ACME code to async/await. ( #7989 )
2020-08-03 07:09:33 -04:00
Brendan Abolivier
e2f1cccc8a
Fix PUT /pushrules to use the right rule IDs
2020-08-03 11:52:52 +01:00
Brendan Abolivier
1678057b56
Back out the database hack and replace it with a temporary config setting
2020-08-03 11:22:22 +01:00
Patrick Cloke
d1008fe949
Fix some comments and types in service notices ( #7996 )
2020-07-31 16:22:06 -04:00
Erik Johnston
394be6a0e6
Merge pull request #8008 from matrix-org/erikj/add_rate_limiting_to_joins
...
Add ratelimiting on joins
2020-07-31 18:21:48 +01:00
Erik Johnston
faba873d4b
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/add_rate_limiting_to_joins
2020-07-31 15:07:01 +01:00
Erik Johnston
9b3ab57acd
Newsfile
2020-07-31 15:06:56 +01:00
Erik Johnston
18de00adb4
Add ratelimiting on joins
2020-07-31 15:06:56 +01:00
Brendan Abolivier
cf42d0a60c
Fix cache name
2020-07-31 15:06:41 +01:00
Brendan Abolivier
79d991eff0
Fix cache invalidation calls
2020-07-31 13:58:42 +01:00
Brendan Abolivier
713d70d6c6
Merge branch 'develop' of github.com:matrix-org/synapse into babolivier/new_push_rules
2020-07-31 13:58:09 +01:00
Travis Ralston
e2a4ba6f9b
Add docs for undoing room shutdowns ( #7998 )
...
These docs were tested successfully in production by a customer, so it's probably fine.
2020-07-31 04:41:44 +01:00
Brendan Abolivier
60328ce9fb
Lint
2020-07-30 19:02:28 +01:00
Brendan Abolivier
69158e554f
Merge branch 'develop' of github.com:matrix-org/synapse into babolivier/new_push_rules
2020-07-30 19:00:29 +01:00
Brendan Abolivier
8b04c4cd70
Changelog
2020-07-30 17:43:17 +01:00
Stuart Mumford
6d4b790021
Update workers docs ( #7990 )
2020-07-30 17:30:11 +01:00
Richard van der Hoff
0a7fb24716
Fix invite rejection when we have no forward-extremeties ( #7980 )
...
Thanks to some slightly overzealous cleanup in the
`delete_old_current_state_events`, it's possible to end up with no
`event_forward_extremities` in a room where we have outstanding local
invites. The user would then get a "no create event in auth events" when trying
to reject the invite.
We can hack around it by using the dangling invite as the prev event.
2020-07-30 16:58:57 +01:00
Erik Johnston
606805bf06
Fix typo in docs/workers.md ( #7992 )
2020-07-30 16:28:36 +01:00
Olivier Wilkinson (reivilibre)
3aa36b782c
Merge branch 'master' into develop
2020-07-30 15:18:36 +01:00
Patrick Cloke
c978f6c451
Convert federation client to async/await. ( #7975 )
2020-07-30 08:01:33 -04:00
Patrick Cloke
4cce8ef74e
Convert appservice to async. ( #7973 )
2020-07-30 07:27:39 -04:00
Patrick Cloke
b3a97d6dac
Convert some of the data store to async. ( #7976 )
2020-07-30 07:20:41 -04:00
Olivier Wilkinson (reivilibre)
320ef98852
Fix formatting of changelog and upgrade notes
...
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2020-07-30 11:59:11 +01:00
Patrick Cloke
3950ae51ef
Ensure that remove_pusher is always async ( #7981 )
2020-07-30 06:56:55 -04:00
Olivier Wilkinson (reivilibre)
fc0ef72d9c
Add deprecation warnings
...
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2020-07-30 11:55:04 +01:00
Olivier Wilkinson (reivilibre)
a9631b7b4b
1.18.0
2020-07-30 10:56:54 +01:00
Erik Johnston
2c1b9d6763
Update worker docs with recent enhancements ( #7969 )
2020-07-29 23:22:13 +01:00
Patrick Cloke
a53e0160a2
Ensure the msg property of HttpResponseException is a string. ( #7979 )
2020-07-29 13:56:06 -04:00
Patrick Cloke
d90087cffa
Remove from the event_relations table when purging historical events. ( #7978 )
2020-07-29 13:55:01 -04:00
Patrick Cloke
3a00bd1378
Add additional logging for SAML sessions. ( #7971 )
2020-07-29 13:54:44 -04:00
Brendan Abolivier
f23c77389d
Add MSC reference to changelog for #7736
2020-07-29 18:31:03 +01:00
Brendan Abolivier
8dff4a1242
Re-implement unread counts ( #7736 )
2020-07-29 18:26:55 +01:00
Aaron Raimist
2184f61fae
Various improvements to the docs ( #7899 )
2020-07-29 10:35:44 -04:00
Patrick Cloke
3345c166a4
Convert storage layer to async/await. ( #7963 )
2020-07-28 16:09:53 -04:00
Dirk Klimpel
e866e3b896
Add an option to disable purge in delete room admin API ( #7964 )
...
Add option ```purge``` to ```POST /_synapse/admin/v1/rooms/<room_id>/delete```
Fixes : #3761
Signed-off-by: Dirk Klimpel dirk@klimpel.org
2020-07-28 20:08:23 +01:00
Brendan Abolivier
9725c59247
Implement new experimental push rules with a database hack to enable them
2020-07-28 19:20:55 +01:00
Andrew Morgan
8a25332d94
Move some log lines from default logger to sql/transaction loggers ( #7952 )
...
Idea from matrix-org/synapse-dinsic#49
2020-07-28 18:52:13 +01:00
Patrick Cloke
2c1e1b153d
Use the JSON module from the std library instead of simplejson. ( #7936 )
2020-07-28 10:28:59 -04:00
Richard van der Hoff
8078dec3be
Fix exit code for check_line_terminators.sh ( #7970 )
...
If there are *no* files with CRLF line endings, then the xargs exits with a
non-zero exit code (as expected), but then, since that is the last thing to
happen in the script, the script as a whole exits non-zero, making the whole
thing fail.
using `if/then/fi` instead of `&& (...)` means that the script exits with a
zero exit code.
2020-07-28 08:52:25 -04:00
lugino-emeritus
3857de2194
Option to allow server admins to join complex rooms ( #7902 )
...
Fixes #7901 .
Signed-off-by: Niklas Tittjung <nik_t.01@web.de >
2020-07-28 13:41:44 +01:00
Richard van der Hoff
349119a340
Merge tag 'v1.18.0rc2' into develop
...
Synapse 1.18.0rc2 (2020-07-28)
==============================
Bugfixes
--------
- Fix an `AssertionError` exception introduced in v1.18.0rc1. ([\#7876](https://github.com/matrix-org/synapse/issues/7876 ))
- Fix experimental support for moving typing off master when worker is restarted, which is broken in v1.18.0rc1. ([\#7967](https://github.com/matrix-org/synapse/issues/7967 ))
Internal Changes
----------------
- Further optimise queueing of inbound replication commands. ([\#7876](https://github.com/matrix-org/synapse/issues/7876 ))
2020-07-28 11:31:31 +01:00
Richard van der Hoff
7000a215e6
1.18.0rc2
2020-07-28 11:22:32 +01:00
Erik Johnston
a8f7ed28c6
Typing worker needs to handle stream update requests ( #7967 )
...
IIRC this doesn't break tests because its only hit on reconnection, or something.
Basically, when a process needs to fetch missing updates for the `typing` stream it needs to query the writer instance via HTTP (as we don't write typing notifications to the DB), the problem was that the endpoint (`streams`) was only registered on master and specifically not on the typing writer worker.
2020-07-28 11:04:53 +01:00
Erik Johnston
aaf9ce72a0
Fix typo in metrics docs ( #7966 )
2020-07-28 10:03:18 +01:00
Andrew Morgan
c4ce0da6fe
Add script for finding files with unix line terminators ( #7965 )
...
This PRs adds a script to check for unix-line terminators in the repo. It will be used to address https://github.com/matrix-org/synapse/issues/7943 by adding the check to CI.
I've changed the original script slightly as proposed in https://github.com/matrix-org/pipelines/pull/81#discussion_r460580664
2020-07-28 01:26:50 +01:00
Patrick Cloke
68626ff8e9
Convert the remaining media repo code to async / await. ( #7947 )
2020-07-27 14:40:11 -04:00
Richard van der Hoff
f57b99af22
Handle replication commands synchronously where possible ( #7876 )
...
Most of the stuff we do for replication commands can be done synchronously. There's no point spinning up background processes if we're not going to need them.
2020-07-27 18:54:43 +01:00
Patrick Cloke
8553f46498
Convert a synapse.events to async/await. ( #7949 )
2020-07-27 13:40:22 -04:00
Patrick Cloke
5f65e62681
Convert groups and visibility code to async / await. ( #7951 )
2020-07-27 12:32:08 -04:00
Patrick Cloke
8144bc26a7
Convert push to async/await. ( #7948 )
2020-07-27 12:21:34 -04:00
Richard van der Hoff
7c2e2c2077
update changelog
2020-07-27 17:08:41 +01:00
Richard van der Hoff
f88c48f3b8
1.18.0rc1
2020-07-27 16:57:40 +01:00
Erik Johnston
1ef9efc1e0
Fix error reporting when using opentracing.trace ( #7961 )
2020-07-27 16:20:24 +01:00
Erik Johnston
84d099ae11
Fix typing replication not being handled on master ( #7959 )
...
Handling of incoming typing stream updates from replication was not
hooked up on master, effecting set ups where typing was handled on a
different worker.
This is really only a problem if the master process is also handling
sync requests, which is unlikely for those that are at the stage of
moving typing off.
The other observable effect is that if a worker restarts or a
replication connect drops then the typing worker will issue a
`POSITION typing`, triggering master process to try and stream *all*
typing updates from position 0.
Fixes #7907
2020-07-27 14:10:53 +01:00
Patrick Cloke
d8a9cd8d3e
Remove hacky error handling for inlineDeferreds. ( #7950 )
2020-07-27 08:35:56 -04:00
Andrew Morgan
c4268e3da6
Convert tests/rest/admin/test_room.py to unix file endings ( #7953 )
...
Converts tests/rest/admin/test_room.py to have unix file endings after they were accidentally changed in #7613 .
Keeping the same changelog as #7613 as it hasn't gone out in a release yet.
2020-07-27 13:22:52 +01:00
Patrick Cloke
3fc8fdd150
Support oEmbed for media previews. ( #7920 )
...
Fixes previews of Twitter URLs by using their oEmbed endpoint to grab content.
2020-07-27 07:50:44 -04:00
Patrick Cloke
b975fa2e99
Convert state resolution to async/await ( #7942 )
2020-07-24 10:59:51 -04:00
Patrick Cloke
e739b20588
Fix up types and comments that refer to Deferreds. ( #7945 )
2020-07-24 10:53:25 -04:00
Patrick Cloke
53f7b49f5b
Do not convert async functions to Deferreds in the interactive_auth_handler ( #7944 )
2020-07-24 09:43:49 -04:00
Patrick Cloke
5ea29d7f85
Convert more of the media code to async/await ( #7873 )
2020-07-24 09:39:02 -04:00
Patrick Cloke
6a080ea184
Return an empty body for OPTIONS requests. ( #7886 )
2020-07-24 07:08:07 -04:00
Richard van der Hoff
1ec688bf21
Downgrade warning on client disconnect to INFO ( #7928 )
...
Clients disconnecting before we finish processing the request happens from time
to time. We don't need to yell about it
2020-07-24 09:55:47 +01:00
Patrick Cloke
fefe9943ef
Convert presence handler helpers to async/await. ( #7939 )
2020-07-23 16:47:36 -04:00
Patrick Cloke
83434df381
Update the auth providers to be async. ( #7935 )
2020-07-23 15:45:39 -04:00
Richard van der Hoff
7078866969
Put a cache on /state_ids ( #7931 )
...
If we send out an event which refers to `prev_events` which other servers in
the federation are missing, then (after a round or two of backfill attempts),
they will end up asking us for `/state_ids` at a particular point in the DAG.
As per https://github.com/matrix-org/synapse/issues/7893 , this is quite
expensive, and we tend to see lots of very similar requests around the same
time.
We can therefore handle this much more efficiently by using a cache, which (a)
ensures that if we see the same request from multiple servers (or even the same
server, multiple times), then they share the result, and (b) any other servers
that miss the initial excitement can also benefit from the work.
[It's interesting to note that `/state` has a cache for exactly this
reason. `/state` is now essentially unused and replaced with `/state_ids`, but
evidently when we replaced it we forgot to add a cache to the new endpoint.]
2020-07-23 18:38:19 +01:00
Richard van der Hoff
4876af06dd
Abort federation requests if the client disconnects early ( #7930 )
...
For inbound federation requests, if a given remote server makes too many
requests at once, we start stacking them up rather than processing them
immediatedly.
However, that means that there is a fair chance that the requesting server will
disconnect before we start processing the request. In that case, if it was a
read-only request (ie, a GET request), there is absolutely no point in
building a response (and some requests are quite expensive to handle).
Even in the case of a POST request, one of two things will happen:
* Most likely, the requesting server will retry the request and we'll get the
information anyway.
* Even if it doesn't, the requesting server has to assume that we didn't get
the memo, and act accordingly.
In short, we're better off aborting the request at this point rather than
ploughing on with what might be a quite expensive request.
2020-07-23 16:52:33 +01:00
Michael Kaye
ff22672fd6
Reorder database docs to promote postgresql. ( #7933 )
2020-07-23 07:48:49 -04:00
Patrick Cloke
68cd935826
Convert the federation agent and related code to async/await. ( #7874 )
2020-07-23 07:05:57 -04:00
Patrick Cloke
13d77464c9
Follow-up to admin API to re-activate accounts ( #7908 )
2020-07-22 12:33:19 -04:00
Patrick Cloke
cc9bb3dc3f
Convert the message handler to async/await. ( #7884 )
2020-07-22 12:29:15 -04:00
Brendan Abolivier
a4cf94a3c2
Merge pull request #7934 from matrix-org/babolivier/acme_eol
...
Update the dates for ACME v1 EOL
2020-07-22 16:45:09 +01:00
Brendan Abolivier
55f2617f8c
Update the dates for ACME v1 EOL
...
As per https://community.letsencrypt.org/t/end-of-life-plan-for-acmev1/88430
2020-07-22 16:18:40 +01:00
Richard van der Hoff
923c995023
Skip serializing /sync response if client has disconnected ( #7927 )
...
... it's a load of work which may be entirely redundant.
2020-07-22 13:44:16 +01:00
Richard van der Hoff
b74919c72e
Add debugging to sync response generation ( #7929 )
2020-07-22 13:43:10 +01:00
Richard van der Hoff
931b026844
Remove an unused prometheus metric ( #7878 )
2020-07-22 00:40:55 +01:00
Richard van der Hoff
05060e0223
Track command processing as a background process ( #7879 )
...
I'm going to be doing more stuff synchronously, and I don't want to lose the
CPU metrics down the sofa.
2020-07-22 00:40:42 +01:00
Richard van der Hoff
15997618e2
Clean up PreserveLoggingContext ( #7877 )
...
This had some dead code and some just plain wrong docstrings.
2020-07-22 00:40:27 +01:00
Richard van der Hoff
2ccd48e921
fix an incorrect comment
2020-07-22 00:24:56 +01:00
Patrick Cloke
de119063f2
Convert room list handler to async/await. ( #7912 )
2020-07-21 07:51:48 -04:00
Jason Robinson
759481af6d
Element CSS and logo in email templates ( #7919 )
...
Use Element CSS and logo in notification emails when app name is Element.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2020-07-21 11:58:01 +01:00
Andrew Morgan
b7ddece2a6
Lint the contrib/ directory in CI and linting scripts, add synctl to linting script ( #7914 )
...
Run `isort`, `flake8` and `black` over the `contrib/` directory and `synctl` script. The latter was already being done in CI, but now the linting script does it too.
Fixes https://github.com/matrix-org/synapse/issues/7910
2020-07-20 21:43:49 +01:00
Karthikeyan Singaravelan
5662e2b0f3
Remove unused code from synapse.logging.utils. ( #7897 )
2020-07-20 15:20:53 -04:00
Adrian
64d2280299
Fix a typo in the sample config. ( #7890 )
2020-07-20 13:42:52 -04:00
Karthikeyan Singaravelan
a7b06a81f0
Fix deprecation warning: import ABC from collections.abc ( #7892 )
2020-07-20 13:33:04 -04:00
Andrew Morgan
5ecf98f59e
Change sample config's postgres user to synapse_user ( #7889 )
...
The [postgres setup docs](https://github.com/matrix-org/synapse/blob/develop/docs/postgres.md#set-up-database ) recommend setting up your database with user `synapse_user`.
However, uncommenting the postgres defaults in the sample config leave you with user `synapse`.
This PR switches the sample config to recommend `synapse_user`. Took a me a second to figure this out, so assume this will beneficial to others.
2020-07-20 18:29:25 +01:00
Karthikeyan Singaravelan
438020732e
Fix deprecation warning due to invalid escape sequences ( #7895 )
...
* Fix deprecation warnings due to invalid escape sequences.
* Add changelog
Signed-off-by: Karthikeyan Singaravelan <tir.karthi@gmail.com >
2020-07-20 16:45:51 +01:00
Gary Kim
f2af3e4fc5
Remove Ubuntu Eoan that is now EOL ( #7888 )
2020-07-17 15:38:41 -04:00
Patrick Cloke
d1d5fa66e4
Fix the trace function for async functions. ( #7872 )
...
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2020-07-17 13:32:01 -04:00
Michael Kaye
1ec2961b3b
Add help for creating a user via docker ( #7885 )
2020-07-17 13:25:48 -04:00
Christopher May-Townsend
a5545cf86d
Switch to Debian:Slim from Alpine for the docker image ( #7839 )
...
As mentioned in #7397 , switching to a debian base should help with multi-arch work to save time on compiling. This is unashamedly based on #6373 , but without the extra functionality. Switch python version back to generic 3.7 to always pull the latest. Essentially, keeping this as small as possible. The image is bigger though unfortunately.
2020-07-17 17:40:53 +01:00
Erik Johnston
2d2acc1cf2
Stop using 'device_max_stream_id' ( #7882 )
...
It serves no purpose and updating everytime we write to the device inbox
stream means all such transactions will conflict, causing lots of
transaction failures and retries.
2020-07-17 17:03:27 +01:00
Erik Johnston
a3ad045286
Fix TypeError in synapse.notifier ( #7880 )
...
Fixes #7774
2020-07-17 14:11:05 +01:00
Patrick Cloke
852930add7
Add a default limit (of 100) to get/sync operations. ( #7858 )
2020-07-17 07:59:23 -04:00
Erik Johnston
4642fd66df
Change "unknown room ver" logging to warning. ( #7881 )
...
It's somewhat expected for us to have unknown room versions in the
database due to room version experiments.
2020-07-17 12:10:43 +01:00
Patrick Cloke
6b3ac3b8cd
Convert device handler to async/await ( #7871 )
2020-07-17 07:09:25 -04:00
Patrick Cloke
00e57b755c
Convert synapse.app to async/await. ( #7868 )
2020-07-17 07:08:56 -04:00
Patrick Cloke
6fca1b3506
Convert _base, profile, and _receipts handlers to async/await ( #7860 )
2020-07-17 07:08:30 -04:00
Michael Albert
fff483ea96
Add admin endpoint to get members in a room. ( #7842 )
2020-07-16 16:43:23 -04:00
Patrick Cloke
f460da6031
Consistently use db_to_json to convert from database values to JSON objects. ( #7849 )
2020-07-16 11:32:19 -04:00
Luke Faraone
b0f031f92a
Combine nginx federation server blocks ( #7823 )
...
I'm pretty sure there's no technical reason these have to be distinct server blocks, so collapse into one and go with the more terse location block.
Signed-off-by: Luke W Faraone <luke@faraone.cc >
2020-07-16 16:01:45 +01:00
Richard van der Hoff
e5300063ed
Optimise queueing of inbound replication commands ( #7861 )
...
When we get behind on replication, we tend to stack up background processes
behind a linearizer. Bg processes are heavy (particularly with respect to
prometheus metrics) and linearizers aren't terribly efficient once the queue
gets long either.
A better approach is to maintain a queue of requests to be processed, and
nominate a single process to work its way through the queue.
Fixes : #7444
2020-07-16 15:49:37 +01:00
Richard van der Hoff
346476df21
Reject attempts to join empty rooms over federation ( #7859 )
...
We shouldn't allow others to make_join through us if we've left the room;
reject such attempts with a 404.
Fixes #7835 . Fixes #6958 .
2020-07-16 15:17:31 +01:00
Erik Johnston
f2e38ca867
Allow moving typing off master ( #7869 )
2020-07-16 15:12:54 +01:00
Erik Johnston
649a7ead5c
Add ability to run multiple pusher instances ( #7855 )
...
This reuses the same scheme as federation sender sharding
2020-07-16 14:06:28 +01:00
Richard van der Hoff
a827838706
Merge pull request #7866 from matrix-org/rav/fix_guest_user_id
...
Fix guest user registration with lots of client readers
2020-07-16 13:54:45 +01:00
Richard van der Hoff
a973bcb8a4
Add some tiny type annotations ( #7870 )
...
I found these made pycharm have more of a clue as to what was going on in other places.
2020-07-16 13:52:29 +01:00
Richard van der Hoff
16368c8a34
changelog
2020-07-16 13:01:11 +01:00
Richard van der Hoff
c445bc0cad
Use a postgres sequence to generate guest user IDs
2020-07-16 13:00:25 +01:00
Richard van der Hoff
3c36ae17a5
Use SequenceGenerator for state group ID allocation
2020-07-16 11:25:08 +01:00
Richard van der Hoff
42509b8fb6
Use PostgresSequenceGenerator from MultiWriterIdGenerator
...
partly just to show it works, but alwo to remove a bit of code duplication.
2020-07-16 11:25:08 +01:00
Richard van der Hoff
90b0cdda42
Add some helper classes for generating ID sequences
2020-07-16 11:25:08 +01:00
Olivier Wilkinson (reivilibre)
12528dc42f
Remove obsolete comment.
...
It was correct at the time of our friend Jorik writing it (checking
git blame), but the world has moved now and it is no longer a
generator.
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2020-07-16 11:12:48 +01:00
Patrick Cloke
35450519de
Ensure that calls to json.dumps are compatible with the standard library json. ( #7836 )
2020-07-15 13:40:54 -04:00
Richard van der Hoff
a57df9b827
Avoid brand new rooms in delete_old_current_state_events ( #7854 )
...
When considering rooms to clean up in `delete_old_current_state_events`, skip
rooms which we are creating, which otherwise look a bit like rooms we have
left.
Fixes #7834 .
2020-07-15 18:33:03 +01:00
Erik Johnston
97e1159ac1
Merge branch 'erikj/faster_typing' of github.com:matrix-org/synapse into develop
2020-07-15 16:54:30 +01:00
Patrick Cloke
8c7d0f163d
Allow accounts to be re-activated from the admin APIs. ( #7847 )
2020-07-15 11:00:21 -04:00
Erik Johnston
9006e125af
Fix tests
2020-07-15 15:47:27 +01:00
Erik Johnston
62352c3a1b
Fix typo
2020-07-15 15:46:16 +01:00
Erik Johnston
3032b54ac9
Newsfile
2020-07-15 15:45:19 +01:00
Erik Johnston
3a3a618460
Use get_users_in_room rather than state handler in typing for speed
2020-07-15 15:42:07 +01:00
Erik Johnston
f13061d515
Fix client reader sharding tests ( #7853 )
...
* Fix client reader sharding tests
* Newsfile
* Fix typing
* Update changelog.d/7853.misc
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
* Move mocking of http_client to tests
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2020-07-15 15:27:35 +01:00
Patrick Cloke
b11450dedc
Convert E2E key and room key handlers to async/await. ( #7851 )
2020-07-15 08:48:58 -04:00
Patrick Cloke
111e70d75c
Return the proper 403 Forbidden error during errors with JWT logins. ( #7844 )
2020-07-15 07:10:21 -04:00
Richard van der Hoff
1d9dca02f9
remove retry_on_integrity_error wrapper for persist_events ( #7848 )
...
As far as I can tell from the sentry logs, the only time this has actually done
anything in the last two years is when we had two master workers running at
once, and even then, it made a bit of a mess of it (see
https://github.com/matrix-org/synapse/issues/7845#issuecomment-658238739 ).
Generally I feel like this code is doing more harm than good.
2020-07-15 10:34:53 +01:00
Patrick Cloke
8d0097bef1
Fix bug in per-room message retention policies. ( #7850 )
2020-07-14 15:51:13 -04:00
Brendan Abolivier
85223106f3
Allow email subjects to be customised through Synapse's configuration ( #7846 )
2020-07-14 19:10:42 +01:00
Dirk Klimpel
491f0dab1b
Add delete room admin endpoint ( #7613 )
...
The Delete Room admin API allows server admins to remove rooms from server
and block these rooms.
`DELETE /_synapse/admin/v1/rooms/<room_id>`
It is a combination and improvement of "[Shutdown room](https://github.com/matrix-org/synapse/blob/develop/docs/admin_api/shutdown_room.md )" and "[Purge room](https://github.com/matrix-org/synapse/blob/develop/docs/admin_api/purge_room.md )" API.
Fixes : #6425
It also fixes a bug in [synapse/storage/data_stores/main/room.py](synapse/storage/data_stores/main/room.py) in ` get_room_with_stats`.
It should return `None` if the room is unknown. But it returns an `IndexError`.
901b1fa561/synapse/storage/data_stores/main/room.py (L99-L105)
Related to:
- #5575
- https://github.com/Awesome-Technologies/synapse-admin/issues/17
Signed-off-by: Dirk Klimpel dirk@klimpel.org
2020-07-14 12:36:23 +01:00
Patrick Cloke
77d2c05410
Add the option to validate the iss and aud claims for JWT logins. ( #7827 )
2020-07-14 07:16:43 -04:00
Patrick Cloke
4db1509516
Improve the type hints of synapse.api.errors. ( #7820 )
2020-07-14 07:03:58 -04:00
Luke Faraone
93c8b077ed
Clearly state built-in ACME no longer works ( #7824 )
...
I'm tempted to remove this section entirely, but it's helpful for admins who are trying to figure out why their Synapse is crashing on start with ACME errors.
Signed-off-by: Luke W Faraone <luke@faraone.cc >
2020-07-14 10:49:10 +01:00
Erik Johnston
f886a69916
Correctly pass app_name to all email templates. ( #7829 )
...
We didn't do this for e.g. registration emails.
2020-07-14 10:00:53 +01:00
Patrick Cloke
457096e6df
Support handling registration requests across multiple client readers. ( #7830 )
2020-07-13 13:31:46 -04:00
Brendan Abolivier
504c8f3483
Fix handling of "off" in encryption_enabled_by_default_for_room_type ( #7822 )
...
Fixes https://github.com/matrix-org/synapse/issues/7821 , introduced in https://github.com/matrix-org/synapse/pull/7639
Turns out PyYAML translates `off` into a `False` boolean if it's
unquoted (see https://stackoverflow.com/questions/36463531/pyyaml-automatically-converting-certain-keys-to-boolean-values ),
which seems to be a liberal interpretation of this bit of the YAML spec: https://yaml.org/spec/1.1/current.html#id864510
An alternative fix would be to implement the solution mentioned in the
SO post linked above, but I'm aware it might break existing setups
(which might use these values in the configuration file) so it's
probably better just to add an extra check for this one. We should be
aware that this is a thing for the next times we do that though.
I didn't find any other occurrence of this bug elsewhere in the
codebase.
2020-07-13 17:14:42 +01:00
Richard van der Hoff
fa361c8f65
Update grafana dashboard
2020-07-13 14:48:21 +01:00
Richard van der Hoff
59e64b6d5b
Merge branch 'master' into develop
2020-07-13 11:42:52 +01:00
Richard van der Hoff
29df3d0e9f
1.17.0
2020-07-13 10:20:36 +01:00
Patrick Cloke
66a4af8d96
Do not use canonicaljson to magically handle decoding bytes from JSON. ( #7802 )
2020-07-10 14:30:08 -04:00
Patrick Cloke
d9e47af617
Add types to the server code and remove unused parameter ( #7813 )
2020-07-10 14:28:42 -04:00
Sorunome
1bca21e1da
Include room states on invite events sent to ASes ( #6455 )
2020-07-10 18:44:56 +01:00
Richard van der Hoff
6cef918a4b
Merge branch 'release-v1.17.0' into develop
2020-07-10 18:38:50 +01:00
Richard van der Hoff
8ccb7f08d9
Merge branch 'master' into release-v1.17.0
2020-07-10 18:38:18 +01:00
Erik Johnston
f299441cc6
Add ability to shard the federation sender ( #7798 )
2020-07-10 18:26:36 +01:00
Erik Johnston
f1245dc3c0
Fix resync remote devices on receive PDU in worker mode. ( #7815 )
...
The replication client requires that arguments are given as keyword
arguments, which was not done in this case. We also pull out the logic
so that we can catch and handle any exceptions raised, rather than
leaving them unhandled.
2020-07-10 18:23:17 +01:00
Erik Johnston
e29c44340b
Fix recursion error when fetching auth chain over federation ( #7817 )
...
When fetching the state of a room over federation we receive the event
IDs of the state and auth chain. We then fetch those events that we
don't already have.
However, we used a function that recursively fetched any missing auth
events for the fetched events, which can lead to a lot of recursion if
the server is missing most of the auth chain. This work is entirely
pointless because would have queued up the missing events in the auth
chain to be fetched already.
Let's just diable the recursion, since it only gets called from one
place anyway.
2020-07-10 18:15:35 +01:00
Richard van der Hoff
e66e38bbd7
update changelog
2020-07-10 12:20:52 +01:00
Richard van der Hoff
b1beb3ff59
fix migration, again
2020-07-10 12:18:35 +01:00
Richard van der Hoff
e6fbb0c121
fix changelog
2020-07-10 12:11:46 +01:00
Richard van der Hoff
c9f7c683ae
1.16.1
2020-07-10 12:11:12 +01:00
Richard van der Hoff
cbabcec05c
Drop incorrectly-added table local_rejections_stream. ( #7816 )
2020-07-10 12:07:59 +01:00
Richard van der Hoff
43726783e4
1.17.0rc1
2020-07-09 16:53:19 +01:00
Patrick Cloke
38e1fac886
Fix some spelling mistakes / typos. ( #7811 )
2020-07-09 09:52:58 -04:00
Richard van der Hoff
53ee214f2f
update_membership declaration: now always returns an event id. (#7809 )
2020-07-09 13:01:42 +01:00
Richard van der Hoff
8ca39bd2c3
Improve stacktraces from exceptions in background processes ( #7808 )
...
use `Failure()` to fish out the real exception.
2020-07-09 13:01:33 +01:00
Richard van der Hoff
08c5181a8d
Fix can only concatenate list (not "tuple") to list exception ( #7810 )
...
It seems auth_events can be either a list or a tuple, depending on Things.
2020-07-09 12:48:15 +01:00
Patrick Cloke
8fa7fdd4cb
Pass original request headers from workers to the main process. ( #7797 )
2020-07-09 07:34:46 -04:00
Richard van der Hoff
2ab0b021f1
Generate real events when we reject invites ( #7804 )
...
Fixes #2181 .
The basic premise is that, when we
fail to reject an invite via the remote server, we can generate our own
out-of-band leave event and persist it as an outlier, so that we have something
to send to the client.
2020-07-09 10:40:19 +01:00
Richard van der Hoff
67593b1728
Add HomeServer.signing_key property ( #7805 )
...
... instead of duplicating `config.signing_key[0]` everywhere
2020-07-08 17:51:56 +01:00
Richard van der Hoff
ef5ed5292b
Revert "Update the installation docs on apt-transport-https ( #7801 )"
...
This reverts commit e0c0129693 .
As discussed at
https://github.com/matrix-org/synapse/pull/7801#pullrequestreview-444652786 , I
don't think this is an improvement.
2020-07-08 16:57:10 +01:00
Patrick Cloke
e7efd8f827
Do not use simplejson in Synapse. ( #7800 )
2020-07-08 07:15:08 -04:00
Patrick Cloke
ff0680f69d
Stop passing bytes when dumping JSON ( #7799 )
2020-07-08 07:14:56 -04:00
Dirk Heinrichs
e0c0129693
Update the installation docs on apt-transport-https ( #7801 )
...
* Starting with apt 1.6, https support has moved into the main package and apt-transport-https has become a transitional dummy package.
Signed-off-by: Dirk Heinrichs <dirk.heinrichs@altum.de >
2020-07-08 11:34:13 +01:00
Richard van der Hoff
59ddcd790b
Merge branch 'master' into develop
2020-07-08 11:25:34 +01:00
Richard van der Hoff
e7f880ce7e
shuffle changelog slightly
2020-07-08 11:09:28 +01:00
Richard van der Hoff
98894341e7
1.16.0
2020-07-08 11:03:55 +01:00
Nicolai Søborg
96bb01d8ec
Change Caddy links (old is deprecated) ( #7789 )
...
* Change Caddy links
Current links points to Caddy v1 which is deprecated.
Signed-off-by: Nicolai Søborg <git@xn--sb-lka.org >
2020-07-08 10:09:16 +01:00
Richard van der Hoff
76dbd7b8d6
Stop populating unused table local_invites. ( #7793 )
...
This table is no longer used, so we may as well stop populating it. Removing it
would prevent people rolling back to older releases of Synapse, so that can
happen in a future release.
2020-07-07 14:20:40 +01:00
Erik Johnston
67d7756fcf
Refactor getting replication updates from database v2. ( #7740 )
2020-07-07 12:11:35 +01:00
Juho Vanhanen
d378c3da78
Add libwebp dependency to Dockerfile ( #7791 )
...
* Add libwebp dependency to Dockerfile
Signed-off-by: Juho Vanhanen <juho@vanhanen.io >
2020-07-06 13:37:39 +01:00
Patrick Cloke
2a266f4511
Add documentation for JWT login type and improve sample config. ( #7776 )
2020-07-06 08:31:51 -04:00
Patrick Cloke
6d687ebba1
Convert the appservice handler to async/await. ( #7775 )
2020-07-06 07:40:35 -04:00
reivilibre
57feeab364
Don't ignore set_tweak actions with no explicit value. ( #7766 )
...
* Fix spec compliance; tweaks without values are valid
(default to True, which is only concretely specified for
`highlight`, but it seems only reasonable to generalise)
* Changelog for 7766.
* Add documentation to `tweaks_for_actions`
May as well tidy up when I'm here.
* Add a test for `tweaks_for_actions`
2020-07-06 11:43:41 +01:00
Oliver Kurz
4e118742ca
Allow to use higher versions of prometheus_client ( #7780 )
...
Fixes https://github.com/matrix-org/synapse/issues/7641
The package was pinned to <0.8.0 without an obvious reasoning with
7ad1d7635
in https://github.com/matrix-org/synapse/pull/5636
while the version selection looks to just try to exclude an arbitrary
next minor version number that might introduce API breaking changes.
Selecting the next minor number might be a good conservative selection.
Downstream distributions already reported success patching out the version
requirements.
This also fixes the integration of upgraded packages into openSUSE packages,
e.g. for openSUSE Tumbleweed which already ships prometheus_client >= 0.8 .
Signed-off-by: Oliver Kurz <okurz@suse.de >
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2020-07-06 10:21:41 +01:00
Will Hunt
62b1ce8539
isort 5 compatibility ( #7786 )
...
The CI appears to use the latest version of isort, which is a problem when isort gets a major version bump. Rather than try to pin the version, I've done the necessary to make isort5 happy with synapse.
2020-07-05 16:32:02 +01:00
Erik Johnston
5cdca53aa0
Merge different Resource implementation classes ( #7732 )
2020-07-03 19:02:19 +01:00
Dirk Klimpel
21a212f8e5
Fix inconsistent handling of upper and lower cases of email addresses. ( #7021 )
...
fixes #7016
2020-07-03 14:03:13 +01:00
Alex Kotov
8097659f6e
Allow YAML config file to contain None ( #7779 )
...
Useful when config file is fully commented
Signed-off-by: Alex Kotov <kotovalexarian@gmail.com >
2020-07-03 13:19:03 +01:00
Patrick Cloke
f3e0f16240
Merge tag 'v1.16.0rc2' into develop
...
Synapse 1.16.0rc2 (2020-07-02)
==============================
Synapse 1.16.0rc2 includes the security fixes released with Synapse 1.15.2.
Please see [below](https://github.com/matrix-org/synapse/blob/master/CHANGES.md#synapse-1152-2020-07-02 ) for more details.
Improved Documentation
----------------------
- Update postgres image in example `docker-compose.yaml` to tag `12-alpine`. ([\#7696](https://github.com/matrix-org/synapse/issues/7696 ))
Internal Changes
----------------
- Add some metrics for inbound and outbound federation latencies: `synapse_federation_server_pdu_process_time` and `synapse_event_processing_lag_by_event`. ([\#7771](https://github.com/matrix-org/synapse/issues/7771 ))
2020-07-02 11:25:56 -04:00
Patrick Cloke
6f238a7074
Fix a typo.
2020-07-02 11:14:28 -04:00
Patrick Cloke
1a76cdf8d4
Move 1.15.2 after 1.16.0rc2.
2020-07-02 11:14:00 -04:00
Patrick Cloke
1319e53251
1.16.0rc2
2020-07-02 11:06:35 -04:00
Patrick Cloke
f2bcc6ecbf
Merge branch 'master' into release-v1.16.0
2020-07-02 11:02:42 -04:00
Patrick Cloke
4d978d7db4
Merge branch 'master' into develop
2020-07-02 10:55:41 -04:00
Patrick Cloke
fedb632d0a
Merge tag 'v1.15.2'
...
Synapse 1.15.2 (2020-07-02)
===========================
Due to the two security issues highlighted below, server administrators are
encouraged to update Synapse. We are not aware of these vulnerabilities being
exploited in the wild.
Security advisory
-----------------
* A malicious homeserver could force Synapse to reset the state in a room to a
small subset of the correct state. This affects all Synapse deployments which
federate with untrusted servers. ([96e9afe6 ](96e9afe625 ))
* HTML pages served via Synapse were vulnerable to clickjacking attacks. This
predominantly affects homeservers with single-sign-on enabled, but all server
administrators are encouraged to upgrade. ([ea26e9a9 ](ea26e9a98b ))
This was reported by [Quentin Gliech](https://sandhose.fr/ ).
2020-07-02 10:54:29 -04:00
Patrick Cloke
244649b7d5
Remove an extraneous space.
2020-07-02 10:53:14 -04:00
Patrick Cloke
5ae0a4cf76
Add links to the fixes.
2020-07-02 10:45:22 -04:00
Patrick Cloke
1d61a24f42
Fix tense in the release notes.
2020-07-02 10:41:11 -04:00
Patrick Cloke
e8c36e527d
1.15.2
2020-07-02 10:35:59 -04:00
Erik Johnston
96e9afe625
Correctly handle outliers as prev events over federation
2020-07-02 10:00:33 -04:00
Patrick Cloke
ea26e9a98b
Ensure that HTML pages served from Synapse include headers to avoid embedding.
2020-07-02 09:58:31 -04:00
reivilibre
e5808c4cfb
Hack to add push priority to push notifications ( #7765 )
...
* Remove obsolete comment about ancient temporary code
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
* Implement hack to set push priority
based on whether the tweaks indicate the event might cause
effects.
* Changelog for 7765
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
* Antilint
* Add tests for push priority
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
* Update synapse/push/httppusher.py
Co-authored-by: Brendan Abolivier <babolivier@matrix.org >
* Antilint
* Remove needless invites from tests.
Co-authored-by: Brendan Abolivier <babolivier@matrix.org >
2020-07-01 17:02:31 +01:00
Richard van der Hoff
e866512367
Add early returns to _check_for_soft_fail ( #7769 )
...
my editor was complaining about unset variables, so let's add some early
returns to fix that and reduce indentation/cognitive load.
2020-07-01 16:41:19 +01:00
Richard van der Hoff
f01e2ca039
Use symbolic names for replication stream names ( #7768 )
...
This makes it much easier to find where streams are referenced.
2020-07-01 16:35:40 +01:00
Richard van der Hoff
a6eae69ffe
Type checking for FederationHandler ( #7770 )
...
fix a few things to make this pass mypy.
2020-07-01 16:21:02 +01:00
Erik Johnston
1e03513f9a
Fix new metric where we used ms instead of seconds ( #7771 )
...
Introduced in #7755 , not yet released.
2020-07-01 15:23:58 +01:00
Richard van der Hoff
244dbb04f7
Fix incorrect error message when database CTYPE was set incorrectly. ( #7760 )
2020-07-01 13:56:16 +01:00
Andrew Morgan
8718021469
Pin link in CHANGES.md
2020-07-01 11:47:25 +01:00
Andrew Morgan
70e506f0aa
Fixes to CHANGES.md
2020-07-01 11:42:01 +01:00
Andrew Morgan
dc80a0762d
1.16.0rc1
2020-07-01 11:26:58 +01:00
Brendan Abolivier
74d3e177f0
Back out MSC2625 implementation ( #7761 )
2020-07-01 11:08:25 +01:00
Patrick Cloke
71cccf1593
Additional configuration options for auto-join rooms ( #7763 )
2020-06-30 15:41:36 -04:00
Erik Johnston
a99658074d
Add some metrics for inbound and outbound federation processing times ( #7755 )
2020-06-30 16:58:06 +01:00
Andrew Morgan
2f6afdd8b4
Explain the purpose of the "tests" conditional dependency requirement ( #7751 )
2020-06-30 10:11:36 +01:00
Erik Johnston
831b31e563
Add another yield point to state res v2 ( #7746 )
2020-06-26 10:44:52 +01:00
Andrew Morgan
177b2d0c19
Move flake8 to end. Don't exit script on failure ( #7738 )
2020-06-25 17:58:55 +01:00
Dagfinn Ilmari Mannsåker
b099ef07d6
Make tox actions work on Debian 10 ( #7703 )
...
- Remove the requirement for a specific version of Python
- Move dep comment to a separate line, Tox 3.7.0 like trailing ones
Signed-off-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org >
2020-06-25 17:45:35 +01:00
Andrew Morgan
af21fbb338
Simplify medium and address assignment
2020-06-25 11:05:52 +01:00
Andrew Morgan
cb272bcfe8
Explain why we rate-limit using a threepid
2020-06-25 11:03:10 +01:00
Erik Johnston
0e0a2817a2
Yield during large v2 state res. ( #7735 )
...
State res v2 across large data sets can be very CPU intensive, and if
all the relevant events are in the cache the algorithm will run from
start to finish within a single reactor tick. This can result in
blocking the reactor tick for several seconds, which can have major
repercussions on other requests.
To fix this we simply add the occaisonal `sleep(0)` during iterations to
yield execution until the next reactor tick. The aim is to only do this
for large data sets so that we don't impact otherwise quick resolutions.=
2020-06-24 18:48:18 +01:00
Sorunome
6920e58136
add org.matrix.login.jwt so that m.login.jwt can be deprecated ( #7675 )
2020-06-24 10:23:55 +01:00
Christian Svensson
8bbe87f42d
Set Content-Length for Metrics requests ( #7730 )
...
HTTP requires the response to contain a Content-Length header unless chunked encoding is being used.
Prometheus metrics endpoint did not set this, causing software such as prometheus-proxy to not be able to scrape synapse for metrics.
Signed-off-by: Christian Svensson <blue@cmd.nu >
2020-06-23 18:06:01 +01:00
Patrick Cloke
24110255cd
Sync ignored table names in synapse_port_db to current database schema ( #7717 )
2020-06-23 07:33:25 -04:00
Patrick Cloke
95e41f368b
Allow local media to be marked as safe from being quarantined. ( #7718 )
2020-06-22 08:04:14 -04:00
Patrick Cloke
e060bf4462
Convert directory handler to async/await ( #7727 )
2020-06-22 07:18:00 -04:00
Erik Johnston
91e886d615
Speed up state res v2 across large state differences. ( #7725 )
2020-06-19 13:56:35 +01:00
Jesse Riddle
1b1489ff18
Fixed typo by adding a 'g' to PostgreSQL ( #7724 )
2020-06-19 07:19:21 -04:00
Richard van der Hoff
7d2824395f
add a comment
2020-06-18 10:47:06 +01:00
Brendan Abolivier
e35d44c01d
Merge pull request #7716 from matrix-org/babolivier/unread_fix
...
Fix unread counts in sync
2020-06-17 15:44:15 +01:00
Patrick Cloke
3630825612
Convert the typing handler to async/await. ( #7679 )
2020-06-17 10:37:59 -04:00
Oleg Girko
96bc110a68
Require parameterized package version to be at least 0.7.0. ( #7680 )
...
Older versions of `parameterized` package have no `parameterized_class` decorator. This decorator is used in tests.
Signed-off-by: Oleg Girko <ol@infoserver.lv >
2020-06-17 15:31:40 +01:00
Brendan Abolivier
5a5cf6460e
Fix unread counts in sync
...
* Always return an unread_count in get_unread_event_push_actions_by_room_for_user
* Don't always expect unread_count to be there so we don't take out sync entirely if something goes wrong
2020-06-17 15:10:44 +01:00
Patrick Cloke
6418b0379f
Ignore the UI Auth sessions when porting from sqlite to postgresql ( #7711 )
2020-06-17 10:01:18 -04:00
Erik Johnston
e07a8caf58
Add support for using rust-python-jaeger-reporter ( #7697 )
2020-06-17 14:13:41 +01:00
Erik Johnston
b44bdd7f7b
Support running multiple media repos. ( #7706 )
...
This requires a new config option to specify which media repo should be
responsible for running background jobs to e.g. clear out expired URL
preview caches.
2020-06-17 14:13:30 +01:00
Patrick Cloke
434716e1d3
Fetch from the r0 media path instead of the unspecced v1. ( #7714 )
2020-06-17 08:36:46 -04:00
lub
890c0c041d
Update postgres in the Docker compose example to 12-alpine. ( #7696 )
2020-06-17 08:29:08 -04:00
Brendan Abolivier
46613aaf79
Implement unread counter (MSC2625) ( #7673 )
...
Implementation of https://github.com/matrix-org/matrix-doc/pull/2625
2020-06-17 10:58:32 +01:00
Richard van der Hoff
e452973fd2
fix broken link in sample config ( #7712 )
2020-06-16 19:50:16 +01:00
Erik Johnston
f6f7511a4c
Refactor getting replication updates from database. ( #7636 )
...
The aim here is to make it easier to reason about when streams are limited and when they're not, by moving the logic into the database functions themselves. This should mean we can kill of `db_query_to_update_function` function.
2020-06-16 17:10:28 +01:00
Patrick Cloke
231252516c
Fix "argument of type 'ObservableDeferred' is not iterable" error ( #7708 )
2020-06-16 12:01:18 -04:00
hungrymonkey
5c5516f80e
Add instructions for authing with Keycloak via OpenID ( #7659 )
2020-06-16 11:28:21 -04:00
Patrick Cloke
ac51bd581a
Include a user agent in federation requests. ( #7677 )
2020-06-16 10:43:29 -04:00
Dagfinn Ilmari Mannsåker
a3f11567d9
Replace all remaining six usage with native Python 3 equivalents ( #7704 )
2020-06-16 08:51:47 -04:00
Patrick Cloke
98c4e35e3c
Convert the device message and pagination handlers to async/await. ( #7678 )
2020-06-16 08:06:17 -04:00
Richard van der Hoff
03619324fc
Create a ListenerConfig object ( #7681 )
...
This ended up being a bit more invasive than I'd hoped for (not helped by
generic_worker duplicating some of the code from homeserver), but hopefully
it's an improvement.
The idea is that, rather than storing unstructured `dict`s in the config for
the listener configurations, we instead parse it into a structured
`ListenerConfig` object.
2020-06-16 12:44:07 +01:00
Andrew Morgan
d9277e94f3
Don't lowercase medium in this PR
2020-06-16 12:00:57 +01:00
Andrew Morgan
b1c0eb3178
Docstring spacing
2020-06-16 11:39:19 +01:00
Andrew Morgan
53981c31e9
Change SynapseError comment
2020-06-16 11:33:16 +01:00
Andrew Morgan
efb5670845
Update synapse/handlers/auth.py
...
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2020-06-16 11:33:16 +01:00
Andrew Morgan
b8f4b0c27c
Use assert_param_in_dict
2020-06-16 11:33:13 +01:00
Andrew Morgan
187623517b
pop() instead of pull then del
2020-06-16 11:09:16 +01:00
Andrew Morgan
7184c16f95
Change login_id_phone_to_thirdparty to return a dict again
2020-06-16 11:03:49 +01:00
Brendan Abolivier
789606577a
Merge branch 'master' into develop
2020-06-16 10:36:29 +01:00
Brendan Abolivier
0fc5575c5b
Fix changelog wording
2020-06-16 10:31:04 +01:00
Brendan Abolivier
65eb078498
1.15.1
2020-06-16 10:28:58 +01:00
Andrew Morgan
3e6b5bba71
Wrap register_device coroutine in an ensureDeferred ( #7684 )
...
Fixes https://github.com/matrix-org/synapse/issues/7683
Broke in: #7649
We had a `yield` acting on a coroutine. To be fair this one is a bit difficult to notice as there's a function in the middle that just passes the coroutine along.
2020-06-16 10:13:59 +01:00
Patrick Cloke
cc32fa7358
Ensure the body is a string before comparing push rules. ( #7701 )
2020-06-15 16:20:34 -04:00
Hubert Chathi
2b2344652b
Ensure etag is a string for GET room_keys/version response ( #7691 )
2020-06-15 13:42:44 -04:00
Andrew Morgan
b8ee03caff
Update m.id.phone to use 'phone' instead of 'number' ( #7687 )
...
The spec [states](https://matrix.org/docs/spec/client_server/r0.6.1#phone-number ) that `m.id.phone` requires the field `country` and `phone`.
In Synapse, we've been enforcing `country` and `number`.
I am not currently sure whether this affects any client implementations.
This issue was introduced in #1994 .
2020-06-15 17:46:23 +01:00
Brendan Abolivier
356243f08a
Merge pull request #7685 from matrix-org/babolivier/3pid_r0
...
Enable 3PID add/bind/unbind endpoints on r0 routes
2020-06-15 16:46:23 +01:00
Erik Johnston
4241a10673
Fix "There was no active span when trying to log." error ( #7698 )
2020-06-15 16:42:21 +01:00
Brendan Abolivier
6efb2b0ad4
Merge branch 'develop' into babolivier/mark_unread
2020-06-15 16:37:52 +01:00
Brendan Abolivier
c2b4621630
Merge branch 'develop' into babolivier/mark_unread
2020-06-15 16:37:08 +01:00
Brendan Abolivier
6d5985e1f2
Enable 3PID add/bind/unbind endpoints on r0 routes
2020-06-15 16:14:13 +01:00
Patrick Cloke
7d2532be36
Discard RDATA from already seen positions. ( #7648 )
2020-06-15 08:44:54 -04:00
Patrick Cloke
bd6dc17221
Replace iteritems/itervalues/iterkeys with native versions. ( #7692 )
2020-06-15 07:03:36 -04:00
Brendan Abolivier
fed493c5fd
Incorporate review
2020-06-15 09:58:55 +01:00
Patrick Cloke
2d11ea385c
Fix warnings about losing log context during UI auth. ( #7688 )
2020-06-12 15:01:00 -04:00
Patrick Cloke
d0a43d431e
Fix a typo when comparing the URI & method during UI Auth. ( #7689 )
2020-06-12 14:12:04 -04:00
Brendan Abolivier
e186c660b1
Lint
2020-06-12 15:31:59 +01:00
Brendan Abolivier
e47e5a2dcd
Incorporate review bits
2020-06-12 15:13:12 +01:00
Brendan Abolivier
1e5a50302f
Pre-populate the unread_count column
2020-06-12 15:05:47 +01:00
Brendan Abolivier
9549d557ea
Don't update the schema version
2020-06-12 15:03:26 +01:00
Brendan Abolivier
cf92fbb8aa
Use attr instead of a dict
2020-06-12 15:02:15 +01:00
Andrew Morgan
699904c9d8
Changelog
2020-06-12 14:42:58 +01:00
Andrew Morgan
358e51be86
Add some tests for m.id.phone and m.id.thirdparty
2020-06-12 14:42:56 +01:00
Andrew Morgan
18071156e4
Remove placeholders/dummy classes for supporting identifiers in existing tests
2020-06-12 14:42:21 +01:00
Andrew Morgan
cb64c956f0
Comment cleanups, log on KeyError during login
2020-06-12 14:42:21 +01:00
Andrew Morgan
f240a8d182
Reconfigure m.login.password authdict checker to process identifiers
2020-06-12 14:42:21 +01:00
Andrew Morgan
7044c1f4fb
Factor out identifier -> username conversion into its own method
...
We then use this in both login and authhandler, the latter being where we process m.login.password
User Interactive Authentication responses, which can now include identifiers
2020-06-12 14:42:21 +01:00
Andrew Morgan
b674bb8500
Move utility methods from login handler to auth handler
2020-06-12 14:42:18 +01:00
Brendan Abolivier
7e80c84902
Lint
2020-06-12 11:31:11 +01:00
Brendan Abolivier
6b1fa3293d
Test that a mark_unread action updates the right counter when using a slave store
2020-06-12 11:28:26 +01:00
Brendan Abolivier
63d9a00bf1
Remove debug logging
2020-06-12 11:13:30 +01:00
Brendan Abolivier
2a07c5ded6
Test that a mark_unread action updates the right counter
2020-06-12 11:08:05 +01:00
Brendan Abolivier
3cc7f43e8d
Fix summary rotation
2020-06-12 11:07:26 +01:00
Will Hunt
a3fbc23c39
Remove "user_id" from GET /presence. ( #7606 )
2020-06-11 14:13:53 -04:00
Brendan Abolivier
cb6d4d07b1
Log for invalid values of notif
2020-06-11 18:30:31 +01:00
Brendan Abolivier
803291728c
Fix SQL
2020-06-11 18:25:25 +01:00
Brendan Abolivier
34fd1f7ab5
Fix schema update
2020-06-11 18:12:12 +01:00
Brendan Abolivier
d0f095625c
Lint
2020-06-11 18:04:43 +01:00
Brendan Abolivier
ce74a6685d
Save the count of unread messages to event_push_summary
2020-06-11 17:58:26 +01:00
Brendan Abolivier
ea8f6e611b
Actually act on mark_unread
2020-06-11 15:30:42 +01:00
Brendan Abolivier
1ad06ee6eb
Merge branch 'master' into develop
2020-06-11 13:31:22 +01:00
Brendan Abolivier
3b3f327a0d
1.15.0
2020-06-11 13:27:27 +01:00
Patrick Cloke
b9df7f70bb
Increase the default SAML session expirary time to 15 minutes. ( #7664 )
2020-06-11 07:55:45 -04:00
wondratsch
c746889bb0
fix typo in sample_config.yaml ( #7652 )
...
Just a simple typo fix.
Signed-off-by: wondratsch 28294257+wondratsch@users.noreply.github.com
2020-06-11 11:51:10 +01:00
Brendan Abolivier
9dbd006607
Appease mypy
2020-06-10 20:44:24 +01:00
Brendan Abolivier
243f0ba6ce
Lint
2020-06-10 20:35:35 +01:00
Brendan Abolivier
df3323a7cf
Use temporary prefixes as per the MSC
2020-06-10 20:32:01 +01:00
Richard van der Hoff
0df618f813
Take out a lock before modifying _CACHES ( #7663 )
...
This should fix #7610 .
2020-06-10 18:27:49 +01:00
Brendan Abolivier
aad40e38e1
Changelog
2020-06-10 17:56:33 +01:00
Brendan Abolivier
476a89707a
Fix tests
2020-06-10 17:55:03 +01:00
Brendan Abolivier
c7b99a1180
Use a more efficient way of calculating counters
2020-06-10 17:54:33 +01:00
Andrew Morgan
fcd6961441
Add option to enable encryption by default for new rooms ( #7639 )
...
Fixes https://github.com/matrix-org/synapse/issues/2431
Adds config option `encryption_enabled_by_default_for_room_type`, which determines whether encryption should be enabled with the default encryption algorithm in private or public rooms upon creation. Whether the room is private or public is decided based upon the room creation preset that is used.
Part of this PR is also pulling out all of the individual instances of `m.megolm.v1.aes-sha2` into a constant variable to eliminate typos ala https://github.com/matrix-org/synapse/pull/7637
Based on #7637
2020-06-10 17:44:34 +01:00
Brendan Abolivier
ef345c5a7b
Add a new unread_counter to sync responses
2020-06-10 16:21:16 +01:00
Patrick Cloke
191dc98f80
Clean-up the fallback login code. ( #7657 )
2020-06-10 09:50:39 -04:00
Brendan Abolivier
6f6a4bfc07
Rename dont_push into mark_unread
2020-06-10 14:24:01 +01:00
Brendan Abolivier
ec0a7b9034
Merge branch 'develop' into babolivier/mark_unread
2020-06-10 11:42:30 +01:00
Brendan Abolivier
1cd67790b9
Merge branch 'release-v1.15.0' of github.com:matrix-org/synapse into release-v1.15.0
2020-06-09 17:34:25 +01:00
Brendan Abolivier
737530a000
Fix some attributions
2020-06-09 17:34:11 +01:00
Richard van der Hoff
3e8c8547e1
Update CHANGES.md
...
fix a typo
2020-06-09 17:26:51 +01:00
Brendan Abolivier
236d2d699d
1.15.0rc1
2020-06-09 16:37:14 +01:00
Brendan Abolivier
2dc9468c27
Revert "1.15.0rc1"
...
This reverts commit 8587b0426f .
2020-06-09 16:34:37 +01:00
Brendan Abolivier
8587b0426f
1.15.0rc1
2020-06-09 16:33:36 +01:00
Erik Johnston
664409b169
Fix bug in account data replication stream. ( #7656 )
...
* Ensure account data stream IDs are unique.
The account data stream is shared between three tables, and the maximum
allocated ID was tracked in a dedicated table. Updating the max ID
happened outside the transaction that allocated the ID, leading to a
race where if the server was restarted then the same ID could be
allocated but the max ID failed to be updated, leading it to be reused.
The ID generators have support for tracking across multiple tables, so
we may as well use that instead of a dedicated table.
* Fix bug in account data replication stream.
If the same stream ID was used in both global and room account data then
the getting updates for the replication stream would fail due to
`heapq.merge(..)` trying to compare a `str` with a `None`. (This is
because you'd have two rows like `(534, '!room')` and `(534, None)` from
the room and global account data tables).
Fix is just to order by stream ID, since we don't rely on the ordering
beyond that. The bug where stream IDs can be reused should be fixed now,
so this case shouldn't happen going forward.
Fixes #7617
2020-06-09 16:28:57 +01:00
Patrick Cloke
3c45a78090
Convert the registration handler to async/await. ( #7649 )
2020-06-08 11:15:02 -04:00
Patrick Cloke
375ca0cceb
Accept device information at the login fallback endpoint. ( #7629 )
2020-06-08 10:13:24 -04:00
Patrick Cloke
737b4a936e
Convert user directory handler and related classes to async/await. ( #7640 )
2020-06-05 14:42:55 -04:00
Travis Ralston
09099313e6
Add an option to disable autojoin for guest accounts ( #6637 )
...
Fixes https://github.com/matrix-org/synapse/issues/3177
2020-06-05 18:18:15 +01:00
Richard van der Hoff
1bc00fd76d
Clarifications to the admin api documentation ( #7647 )
...
* Clarify how to authenticate
* path params are not the same thing as query params
* Fix documentation for `/_synapse/admin/v2/users/<user_id>`
2020-06-05 17:31:05 +01:00
Patrick Cloke
a0d2d81cf9
Update to the stable SSO prefix for UI Auth. ( #7630 )
2020-06-05 10:50:08 -04:00
Richard van der Hoff
eea124370b
Fix type information on assert_*_is_admin methods ( #7645 )
...
These things don't return Deferreds.
2020-06-05 14:33:49 +01:00
Richard van der Hoff
b4f8dcb4bd
Remove some unused constants. ( #7644 )
2020-06-05 14:33:35 +01:00
Patrick Cloke
f1e61ef85c
Typo fixes.
2020-06-05 08:43:21 -04:00
Dirk Klimpel
908f9e2d24
Allow new users to be registered via the admin API even if the monthly active user limit has been reached ( #7263 )
2020-06-05 13:08:49 +01:00
Dirk Klimpel
2970ce8367
Add device management to admin API ( #7481 )
...
- Admin is able to
- change displaynames
- delete devices
- list devices
- get device informations
Fixes #7330
2020-06-05 13:07:22 +01:00
Patrick Cloke
02f345d053
Attempt to fix PhoneHomeStatsTestCase.test_performance_100 being flaky. ( #7634 )
2020-06-05 07:36:47 -04:00
Andrew Morgan
139bc86f3d
Support CS API v0.6.0 ( #6585 )
2020-06-05 12:27:37 +01:00
WGH
e55ee7c32f
Add support for webp thumbnailing ( #7586 )
...
Closes #4382
Signed-off-by: Maxim Plotnikov <wgh@torlan.ru >
2020-06-05 11:54:27 +01:00
Andrew Morgan
f4e6495b5d
Performance improvements and refactor of Ratelimiter ( #7595 )
...
While working on https://github.com/matrix-org/synapse/issues/5665 I found myself digging into the `Ratelimiter` class and seeing that it was both:
* Rather undocumented, and
* causing a *lot* of config checks
This PR attempts to refactor and comment the `Ratelimiter` class, as well as encourage config file accesses to only be done at instantiation.
Best to be reviewed commit-by-commit.
2020-06-05 10:47:20 +01:00
Andrew Morgan
c389bfb6ea
Fix encryption algorithm typos in tests/comments ( #7637 )
...
@uhoreg has confirmed these were both typos. They are only in comments and tests though, rather than anything critical.
Introduced in:
* https://github.com/matrix-org/synapse/pull/7157
* https://github.com/matrix-org/synapse/pull/5726
2020-06-04 20:03:40 +01:00
Patrick Cloke
f8b9ead3ee
Advertise the token login type when OpenID Connect is enabled. ( #7631 )
2020-06-04 06:49:51 -04:00
Richard van der Hoff
11de843626
Cleanups to the OpenID Connect integration ( #7628 )
...
docs, default configs, comments. Nothing very significant.
2020-06-03 21:13:17 +01:00
Andrew Morgan
e91abfd291
async/await get_user_id_by_threepid ( #7620 )
...
Based on #7619
async's `get_user_id_by_threepid` and its call stack.
2020-06-03 17:15:57 +01:00
Richard van der Hoff
86d814cdde
Check the changelog number in check-newsfragment ( #7623 )
2020-06-03 17:01:43 +01:00
Andrew Morgan
0188daf32c
Replace instances of reactor pumping with get_success. ( #7619 )
...
Calls `self.get_success` on all deferred methods instead of abusing `self.pump()`. This has the benefit of working with coroutines, as well as checking that method execution completed successfully.
There are also a few small cleanups that I made in the process.
2020-06-03 16:39:30 +01:00
Brendan Abolivier
c9507be989
Check if the localpart is reserved for guests earlier in the registration flow ( #7625 )
...
This is so the user is warned about the username not being valid as soon as possible, rather than only once they've finished UIA.
2020-06-03 16:55:02 +02:00
Erik Johnston
11dc2b4698
Fix exceptions when fetching events from a down host. ( #7622 )
...
We already caught some exceptions, but not all.
2020-06-03 14:12:13 +01:00
Richard van der Hoff
38d4ebbac7
synctl restart should start synapse if it wasn't running (#7624 )
2020-06-03 13:16:15 +01:00
Richard van der Hoff
2a8ed93bd4
Switch back to upstream dh-virtualenv ( #7621 )
...
Upstream have merged our changes
(https://github.com/spotify/dh-virtualenv/pull/300 ), so let's switch back to it
instead of using our fork.
2020-06-03 12:21:58 +01:00
Richard van der Hoff
3820c24836
Merge branch 'master' into develop
2020-06-03 11:23:27 +01:00
Richard van der Hoff
38c1fdb14e
Fix typo in PR link
2020-06-03 11:22:27 +01:00
Richard van der Hoff
1bbc9e2df6
Clean up exception handling in SAML2ResponseResource ( #7614 )
...
* Expose `return_html_error`, and allow it to take a Jinja2 template instead of a raw string
* Clean up exception handling in SAML2ResponseResource
* use the existing code in `return_html_error` instead of re-implementing it
(giving it a jinja2 template rather than inventing a new form of template)
* do the exception-catching in the REST layer rather than in the handler
layer, to make sure we catch all exceptions.
2020-06-03 10:41:12 +01:00
Richard van der Hoff
816589b09a
update grafana dashboard
2020-06-02 12:44:36 +01:00
Andrew Morgan
3e557447cb
Mention #synapse:matrix.org in README troubleshooting ( #7603 )
...
Just in case people head straight to the troubleshooting section and find themselves at a dead end.
2020-06-01 19:45:39 +01:00
Andrew Morgan
25e2d193e3
Advertise Python 3.8 support in setup.py ( #7602 )
...
Synapse supports Python 3.8. We've been using it in CI for a while now.
2020-06-01 19:45:01 +01:00
Olof Johansson
fe434cd3c9
Fix a bug in automatic user creation with m.login.jwt. ( #7585 )
2020-06-01 12:55:07 -04:00
Brendan Abolivier
33c39ab93c
Process cross-signing keys when resyncing device lists ( #7594 )
...
It looks like `user_device_resync` was ignoring cross-signing keys from the results received from the remote server. This patch fixes this, by processing these keys using the same process `_handle_signing_key_updates` does (and effectively factor that part out of that function).
2020-06-01 17:47:30 +02:00
Dirk Klimpel
901b1fa561
Email notifications for new users when creating via the Admin API. ( #7267 )
2020-06-01 15:34:33 +01:00
Dagfinn Ilmari Mannsåker
df8a3cef6b
Improve performance of _get_state_groups_from_groups_txn ( #7567 )
...
The query keeps showing up in my slow query log.
This changes the plan under the top-level Sort node from
```
WindowAgg (cost=280335.88..292963.15 rows=561212 width=80) (actual time=138.651..160.562 rows=27112 loops=1)
-> Sort (cost=280335.88..281738.91 rows=561212 width=84) (actual time=138.597..140.622 rows=27112 loops=1)
Sort Key: state_groups_state.type, state_groups_state.state_key, state_groups_state.state_group
Sort Method: quicksort Memory: 4581kB
-> Nested Loop (cost=2.83..226745.22 rows=561212 width=84) (actual time=21.548..47.657 rows=27112 loops=1)
-> HashAggregate (cost=2.27..3.28 rows=101 width=8) (actual time=21.526..21.535 rows=20 loops=1)
Group Key: state.state_group
-> CTE Scan on state (cost=0.00..2.02 rows=101 width=8) (actual time=21.280..21.493 rows=20 loops=1)
-> Index Scan using state_groups_state_type_idx on state_groups_state (cost=0.56..2189.40 rows=5557 width=84) (actual time=0.005..0.991 rows=1356 loops=20)
Index Cond: (state_group = state.state_group)
```
to
```
Nested Loop (cost=2.83..226745.22 rows=561212 width=84) (actual time=24.194..52.834 rows=27112 loops=1)
-> HashAggregate (cost=2.27..3.28 rows=101 width=8) (actual time=24.130..24.138 rows=20 loops=1)
Group Key: state.state_group
-> CTE Scan on state (cost=0.00..2.02 rows=101 width=8) (actual time=23.887..24.113 rows=20 loops=1)
-> Index Scan using state_groups_state_type_idx on state_groups_state (cost=0.56..2189.40 rows=5557 width=84) (actual time=0.016..1.159 rows=1356 loops=20)
Index Cond: (state_group = state.state_group)
```
This cuts the execution time from ~190ms to ~130ms, i.e. a reduction
of ~30%.
The full plans are visualised at https://explain.depesz.com/s/WpbT and
https://explain.depesz.com/s/KlEk
Signed-off-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org >
2020-06-01 15:23:43 +01:00
Patrick Cloke
6af9cdca24
Convert groups local and server to async/await. ( #7600 )
2020-06-01 07:28:43 -04:00
Brendan Abolivier
c1bdd4fac7
Don't fail all of an iteration of the device list retry loop on error ( #7609 )
...
Without this patch, if an error happens which isn't caught by `user_device_resync`, then `_maybe_retry_device_resync` would fail, without retrying the next users in the iteration. This patch fixes this so that it now only logs an error in this case.
2020-06-01 12:55:14 +02:00
Dagfinn Ilmari Mannsåker
2dc430d36e
Use upsert when inserting read receipts ( #7607 )
...
Fixes #7469
Signed-off-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org >
2020-06-01 10:53:06 +01:00
hashashini
91a7c5ff6d
Update OpenBSD installation instructions ( #7587 )
...
Synapse was added to the ports tree in Nov, 2019 by Renaud Allard (https://marc.info/?l=openbsd-ports&m=157417848805329 ).
With the release of OpenBSD 6.7 on May 22, 2020 a pre-compiled binary is available as well.
2020-05-30 17:08:07 +01:00
Erik Johnston
cb495f526d
Fix 'FederationGroupsRoomsServlet' API when group has room server is not in. ( #7599 )
2020-05-29 17:49:47 +01:00
Erik Johnston
f5353eff21
Make inflight background metrics more efficient. ( #7597 )
...
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2020-05-29 13:25:32 +01:00
David Rio Deiros
47db2c3673
Add entry to set dependency against psql service ( #7591 )
2020-05-28 16:02:41 +01:00
Brendan Abolivier
5cb470b495
Merge branch 'master' into develop
2020-05-28 12:50:26 +02:00
Brendan Abolivier
76261fc59d
Update debian changelog
2020-05-28 12:39:09 +02:00
Brendan Abolivier
61469308df
1.14.0
2020-05-28 12:36:00 +02:00
Erik Johnston
8c5f88fa4d
Merge pull request #7584 from matrix-org/erikj/save_and_send_fed_token_in_bg
...
Speed up processing of federation stream RDATA rows.
2020-05-27 20:06:29 +01:00
Erik Johnston
ef3934ec8f
Ensure we persist and ack the same token
2020-05-27 19:45:42 +01:00
Erik Johnston
3d7f1b53d9
Remove spurious change
2020-05-27 19:41:44 +01:00
Erik Johnston
a72d5f39db
Add test for Linearizer.is_queued(..)
2020-05-27 19:41:06 +01:00
Erik Johnston
a6a40a1519
Newsfile
2020-05-27 19:35:03 +01:00
Erik Johnston
35c308731d
Speed up processing of federation stream RDATA rows.
...
Instead of storing and sending an ACK for every single row we send
synchronously, we instead do it asynchronously while batching up
updates.
2020-05-27 19:34:07 +01:00
Christopher Cooper
c4a820b32a
allow emails to be passed through SAML ( #7385 )
...
Signed-off-by: Christopher Cooper <cooperc@ocf.berkeley.edu >
2020-05-27 17:40:08 +01:00
Brendan Abolivier
5af572ada0
Merge tag 'v1.14.0rc2' into develop
...
Synapse 1.14.0rc2 (2020-05-27)
==============================
Bugfixes
--------
- Fix cache config to not apply cache factor to event cache. Regression in v1.14.0rc1. ([\#7578](https://github.com/matrix-org/synapse/issues/7578 ))
- Fix bug where `ReplicationStreamer` was not always started when replication was enabled. Bug introduced in v1.14.0rc1. ([\#7579](https://github.com/matrix-org/synapse/issues/7579 ))
- Fix specifying individual cache factors for caches with special characters in their name. Regression in v1.14.0rc1. ([\#7580](https://github.com/matrix-org/synapse/issues/7580 ))
Improved Documentation
----------------------
- Fix the OIDC `client_auth_method` value in the sample config. ([\#7581](https://github.com/matrix-org/synapse/issues/7581 ))
2020-05-27 17:35:29 +02:00
Brendan Abolivier
4e3a617635
Improve changelog wording
2020-05-27 17:27:33 +02:00
Andrew Morgan
0a6e837aaa
Fix incorrect placeholder syntax in database prepartion code ( #7575 )
...
We were using `logger` syntax which isn't supported by `Exception`s.
2020-05-27 16:26:59 +01:00
Brendan Abolivier
b4109499b4
1.14.0rc2
2020-05-27 17:22:28 +02:00
Jason Robinson
4be968d05d
Fix sample config docs error ( #7581 )
...
'client_auth_method' commented out value was erronously 'client_auth_basic',
when code and docstring says it should be 'client_secret_basic'.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2020-05-27 13:52:18 +01:00
Erik Johnston
d7d8a2e7ee
Fix up comments
2020-05-27 13:34:46 +01:00
Erik Johnston
4ba55559ac
Fix specifying cache factors via env vars with * in name. ( #7580 )
...
This mostly applise to `*stateGroupCache*` and co.
Broke in #6391 .
2020-05-27 13:17:01 +01:00
Erik Johnston
eefc6b3a0d
Don't apply cache factor to event cache. ( #7578 )
...
This is already correctly done when we instansiate the cache, but wasn't
when it got reloaded (which always happens at least once on startup).
2020-05-27 12:04:37 +01:00
Erik Johnston
9bac5d62b3
Ensure ReplicationStreamer is always started when replication enabled. ( #7579 )
...
Fixes #7566 .
2020-05-27 11:44:19 +01:00
Brendan Abolivier
98483890ee
Merge branch 'develop' of github.com:matrix-org/synapse into develop
2020-05-26 20:30:41 +02:00
Patrick Cloke
ef884f6d04
Convert identity handler to async/await. ( #7561 )
2020-05-26 13:46:22 -04:00
Brendan Abolivier
b3b2038b6a
Remove the changes to the debian changelog
...
Since this is not a full release yet
2020-05-26 17:22:46 +02:00
Brendan Abolivier
7193c100bf
Merge branch 'release-v1.14.0' of github.com:matrix-org/synapse into release-v1.14.0
2020-05-26 17:20:53 +02:00
Brendan Abolivier
87e417c5cb
Not full release yet, this is rc1
2020-05-26 17:20:43 +02:00
Erik Johnston
651bb76ee3
Merge event persistence move changelog entries
2020-05-26 16:12:50 +01:00
Brendan Abolivier
9097e135fb
More changelog fix
2020-05-26 17:10:54 +02:00
Brendan Abolivier
f1689a7b7f
Changelog fixes
2020-05-26 16:58:14 +02:00
Brendan Abolivier
3b19c17247
1.14.0
2020-05-26 16:45:37 +02:00
Richard van der Hoff
edd9a7214c
Replace device_27_unique_idx bg update with a fg one ( #7562 )
...
The bg update never managed to complete, because it kept being interrupted by
transactions which want to take a lock.
Just doing it in the foreground isn't that bad, and is a good deal simpler.
2020-05-26 11:43:17 +01:00
Richard van der Hoff
04729b86f8
Fix incorrect exception handling in KeyUploadServlet.on_POST ( #7563 )
...
Introduced in #7556
2020-05-26 11:42:22 +01:00
Richard van der Hoff
00db90f409
Fix recording of federation stream token ( #7564 )
...
A couple of changes of significance:
* remove the `_last_ack < federation_position` condition, so that
updates will still be correctly processed after restart
* Correctly wire up send_federation_ack to the right class.
2020-05-26 11:41:38 +01:00
Richard van der Hoff
d14c4d6b6d
Simplify reap_monthly_active_users ( #7558 )
...
we can use `make_in_list_sql_clause` rather than doing our own half-baked
equivalent, which has the benefit of working just fine with empty lists.
(This has quite a lot of tests, so I think it's pretty safe)
2020-05-23 01:20:10 +01:00
Richard van der Hoff
f4269694ce
Optimise some references to hs.config ( #7546 )
...
These are surprisingly expensive, and we only really need to do them at startup.
2020-05-22 21:47:07 +01:00
Erik Johnston
2901f54359
Fix missing CORS headers on OPTION responses ( #7560 )
...
Broke in #7534 .
2020-05-22 17:42:39 +01:00
Erik Johnston
e5c67d04db
Add option to move event persistence off master ( #7517 )
2020-05-22 16:11:35 +01:00
Patrick Cloke
4429764c9f
Return 200 OK for all OPTIONS requests ( #7534 )
2020-05-22 09:30:07 -04:00
Erik Johnston
1531b214fc
Add ability to wait for replication streams ( #7542 )
...
The idea here is that if an instance persists an event via the replication HTTP API it can return before we receive that event over replication, which can lead to races where code assumes that persisting an event immediately updates various caches (e.g. current state of the room).
Most of Synapse doesn't hit such races, so we don't do the waiting automagically, instead we do so where necessary to avoid unnecessary delays. We may decide to change our minds here if it turns out there are a lot of subtle races going on.
People probably want to look at this commit by commit.
2020-05-22 14:21:54 +01:00
Erik Johnston
06a02bc1ce
Convert sending mail to async/await. ( #7557 )
...
Mainly because sometimes the email push code raises exceptions where the
stack traces have gotten lost, which is hopefully fixed by this.
2020-05-22 13:41:11 +01:00
Patrick Cloke
66f2ebc22f
Use a non-empty RelayState for user interactive auth with SAML. ( #7552 )
2020-05-22 07:17:30 -04:00
Erik Johnston
710d958c64
On upgrade room only send canonical alias once. ( #7547 )
...
Instead of doing a complicated dance of deleting and moving aliases one
by one, which sends a canonical alias update into the old room for each
one, lets do it all in one go.
This also changes the function to move *all* local alias events to the new
room, however that happens later on anyway.
2020-05-22 11:41:41 +01:00
Erik Johnston
547e4dd83e
Fix exception reporting due to HTTP request errors. ( #7556 )
...
These are business as usual errors, rather than stuff we want to log at
error.
2020-05-22 11:39:20 +01:00
Ivan Shapovalov
ac481a738e
synapse.metrics: implement detailed memory usage reporting on PyPy ( #7536 )
...
PyPy's gc.get_stats() returns an object containing detailed allocator statistics
which could be beneficial to collect as metrics.
Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name >
2020-05-22 11:08:41 +01:00
Richard van der Hoff
8c75da916c
Refresh apt cache when building dh_virtualenv docker image ( #7555 )
...
When we tried to build debs for 1.13.0, the build failed because docker used a
base docker image which had a stale apt cache.
Fixes : #7540
2020-05-22 10:17:47 +01:00
Richard van der Hoff
a0f99f81b3
Fix stacktrace mangling in patch_inline_callbacks ( #7554 )
...
`Failure()` is more cunning than `Failure(e)`.
2020-05-22 10:17:36 +01:00
Richard van der Hoff
d84bdfe599
mypy for synapse.http.site ( #7553 )
2020-05-22 10:12:17 +01:00
Richard van der Hoff
66a564c859
Fix some DETECTED VIOLATIONS in the config file ( #7550 )
...
consistency ftw
2020-05-22 10:11:50 +01:00
Brendan Abolivier
d1ae1015ec
Retry to sync out of sync device lists ( #7453 )
...
When a call to `user_device_resync` fails, we don't currently mark the remote user's device list as out of sync, nor do we retry to sync it.
https://github.com/matrix-org/synapse/pull/6776 introduced some code infrastructure to mark device lists as stale/out of sync.
This commit uses that code infrastructure to mark device lists as out of sync if processing an incoming device list update makes the device handler realise that the device list is out of sync, but we can't resync right now.
It also adds a looping call to retry all failed resync every 30s. This shouldn't cause too much spam in the logs as this commit also removes the "Failed to handle device list update for..." warning logs when catching `NotRetryingDestination`.
Fixes #7418
2020-05-21 17:41:12 +02:00
Richard van der Hoff
0bbbd10513
Stub out GET presence requests in the frontend proxy ( #7545 )
...
We don't really make any promises about returning accurate presence data when
presence is disabled, so we may as well just return a static response, rather
than making the master handle a request.
2020-05-21 14:36:46 +01:00
David Vo
d74cdc1a42
Ensure worker config exists in systemd service ( #7528 )
2020-05-21 13:47:23 +01:00
Richard van der Hoff
075375bbc9
add a comment
2020-05-21 13:25:41 +01:00
Erik Johnston
f6f92845f8
Fix bug in persist events when dealing with non member types. ( #7548 )
...
`_is_server_still_joined` will throw if it is given state updates with non-user ID state keys with local user leaves. This is actually rarely a problem since local leaves almost always get persisted by themselves.
(I discovered this on a branch that was otherwise broken, so I haven't seen this in the wild)
2020-05-21 13:20:10 +01:00
Richard van der Hoff
5db2a59a86
Update CONTRIBUTING.md ( #7541 )
2020-05-20 18:47:19 +01:00
Patrick Cloke
b2b8699070
Remove Ubuntu Cosmic and Disco which are both EOL. ( #7539 )
2020-05-20 10:08:46 -04:00
Patrick Cloke
9dc6f3075a
Hash passwords earlier in the password reset process ( #7538 )
...
This now matches the logic of the registration process as modified in
56db0b1365 / #7523 .
2020-05-20 09:48:03 -04:00
Richard van der Hoff
4fa74c7606
Minor clarifications to the TURN docs ( #7533 )
2020-05-20 11:04:34 +01:00
Patrick Cloke
02919bf4d8
Merge branch 'master' into develop
2020-05-19 09:56:15 -04:00
Patrick Cloke
13a82768ac
Merge tag 'v1.13.0'
...
Synapse 1.13.0 (2020-05-19)
===========================
This release brings some potential changes necessary for certain
configurations of Synapse:
* If your Synapse is configured to use SSO and have a custom
`sso_redirect_confirm_template_dir` configuration option set, you will need
to duplicate the new `sso_auth_confirm.html`, `sso_auth_success.html` and
`sso_account_deactivated.html` templates into that directory.
* Synapse plugins using the `complete_sso_login` method of
`synapse.module_api.ModuleApi` should instead switch to the async/await
version, `complete_sso_login_async`, which includes additional checks. The
former version is now deprecated.
* A bug was introduced in Synapse 1.4.0 which could cause the room directory
to be incomplete or empty if Synapse was upgraded directly from v1.2.1 or
earlier, to versions between v1.4.0 and v1.12.x.
Please review [UPGRADE.rst](https://github.com/matrix-org/synapse/blob/master/UPGRADE.rst )
for more details on these changes and for general upgrade guidance.
Notice of change to the default `git` branch for Synapse
--------------------------------------------------------
With the release of Synapse 1.13.0, the default `git` branch for Synapse has
changed to `develop`, which is the development tip. This is more consistent with
common practice and modern `git` usage.
The `master` branch, which tracks the latest release, is still available. It is
recommended that developers and distributors who have scripts which run builds
using the default branch of Synapse should therefore consider pinning their
scripts to `master`.
Features
--------
- Extend the `web_client_location` option to accept an absolute URL to use as a redirect. Adds a warning when running the web client on the same hostname as homeserver. Contributed by Martin Milata. ([\#7006](https://github.com/matrix-org/synapse/issues/7006 ))
- Set `Referrer-Policy` header to `no-referrer` on media downloads. ([\#7009](https://github.com/matrix-org/synapse/issues/7009 ))
- Add support for running replication over Redis when using workers. ([\#7040](https://github.com/matrix-org/synapse/issues/7040 ), [\#7325](https://github.com/matrix-org/synapse/issues/7325 ), [\#7352](https://github.com/matrix-org/synapse/issues/7352 ), [\#7401](https://github.com/matrix-org/synapse/issues/7401 ), [\#7427](https://github.com/matrix-org/synapse/issues/7427 ), [\#7439](https://github.com/matrix-org/synapse/issues/7439 ), [\#7446](https://github.com/matrix-org/synapse/issues/7446 ), [\#7450](https://github.com/matrix-org/synapse/issues/7450 ), [\#7454](https://github.com/matrix-org/synapse/issues/7454 ))
- Admin API `POST /_synapse/admin/v1/join/<roomIdOrAlias>` to join users to a room like `auto_join_rooms` for creation of users. ([\#7051](https://github.com/matrix-org/synapse/issues/7051 ))
- Add options to prevent users from changing their profile or associated 3PIDs. ([\#7096](https://github.com/matrix-org/synapse/issues/7096 ))
- Support SSO in the user interactive authentication workflow. ([\#7102](https://github.com/matrix-org/synapse/issues/7102 ), [\#7186](https://github.com/matrix-org/synapse/issues/7186 ), [\#7279](https://github.com/matrix-org/synapse/issues/7279 ), [\#7343](https://github.com/matrix-org/synapse/issues/7343 ))
- Allow server admins to define and enforce a password policy ([MSC2000](https://github.com/matrix-org/matrix-doc/issues/2000 )). ([\#7118](https://github.com/matrix-org/synapse/issues/7118 ))
- Improve the support for SSO authentication on the login fallback page. ([\#7152](https://github.com/matrix-org/synapse/issues/7152 ), [\#7235](https://github.com/matrix-org/synapse/issues/7235 ))
- Always whitelist the login fallback in the SSO configuration if `public_baseurl` is set. ([\#7153](https://github.com/matrix-org/synapse/issues/7153 ))
- Admin users are no longer required to be in a room to create an alias for it. ([\#7191](https://github.com/matrix-org/synapse/issues/7191 ))
- Require admin privileges to enable room encryption by default. This does not affect existing rooms. ([\#7230](https://github.com/matrix-org/synapse/issues/7230 ))
- Add a config option for specifying the value of the Accept-Language HTTP header when generating URL previews. ([\#7265](https://github.com/matrix-org/synapse/issues/7265 ))
- Allow `/requestToken` endpoints to hide the existence (or lack thereof) of 3PID associations on the homeserver. ([\#7315](https://github.com/matrix-org/synapse/issues/7315 ))
- Add a configuration setting to tweak the threshold for dummy events. ([\#7422](https://github.com/matrix-org/synapse/issues/7422 ))
Bugfixes
--------
- Don't attempt to use an invalid sqlite config if no database configuration is provided. Contributed by @nekatak. ([\#6573](https://github.com/matrix-org/synapse/issues/6573 ))
- Fix single-sign on with CAS systems: pass the same service URL when requesting the CAS ticket and when calling the `proxyValidate` URL. Contributed by @Naugrimm. ([\#6634](https://github.com/matrix-org/synapse/issues/6634 ))
- Fix missing field `default` when fetching user-defined push rules. ([\#6639](https://github.com/matrix-org/synapse/issues/6639 ))
- Improve error responses when accessing remote public room lists. ([\#6899](https://github.com/matrix-org/synapse/issues/6899 ), [\#7368](https://github.com/matrix-org/synapse/issues/7368 ))
- Transfer alias mappings on room upgrade. ([\#6946](https://github.com/matrix-org/synapse/issues/6946 ))
- Ensure that a user interactive authentication session is tied to a single request. ([\#7068](https://github.com/matrix-org/synapse/issues/7068 ), [\#7455](https://github.com/matrix-org/synapse/issues/7455 ))
- Fix a bug in the federation API which could cause occasional "Failed to get PDU" errors. ([\#7089](https://github.com/matrix-org/synapse/issues/7089 ))
- Return the proper error (`M_BAD_ALIAS`) when a non-existant canonical alias is provided. ([\#7109](https://github.com/matrix-org/synapse/issues/7109 ))
- Fix a bug which meant that groups updates were not correctly replicated between workers. ([\#7117](https://github.com/matrix-org/synapse/issues/7117 ))
- Fix starting workers when federation sending not split out. ([\#7133](https://github.com/matrix-org/synapse/issues/7133 ))
- Ensure `is_verified` is a boolean in responses to `GET /_matrix/client/r0/room_keys/keys`. Also warn the user if they forgot the `version` query param. ([\#7150](https://github.com/matrix-org/synapse/issues/7150 ))
- Fix error page being shown when a custom SAML handler attempted to redirect when processing an auth response. ([\#7151](https://github.com/matrix-org/synapse/issues/7151 ))
- Avoid importing `sqlite3` when using the postgres backend. Contributed by David Vo. ([\#7155](https://github.com/matrix-org/synapse/issues/7155 ))
- Fix excessive CPU usage by `prune_old_outbound_device_pokes` job. ([\#7159](https://github.com/matrix-org/synapse/issues/7159 ))
- Fix a bug which could cause outbound federation traffic to stop working if a client uploaded an incorrect e2e device signature. ([\#7177](https://github.com/matrix-org/synapse/issues/7177 ))
- Fix a bug which could cause incorrect 'cyclic dependency' error. ([\#7178](https://github.com/matrix-org/synapse/issues/7178 ))
- Fix a bug that could cause a user to be invited to a server notices (aka System Alerts) room without any notice being sent. ([\#7199](https://github.com/matrix-org/synapse/issues/7199 ))
- Fix some worker-mode replication handling not being correctly recorded in CPU usage stats. ([\#7203](https://github.com/matrix-org/synapse/issues/7203 ))
- Do not allow a deactivated user to login via SSO. ([\#7240](https://github.com/matrix-org/synapse/issues/7240 ), [\#7259](https://github.com/matrix-org/synapse/issues/7259 ))
- Fix --help command-line argument. ([\#7249](https://github.com/matrix-org/synapse/issues/7249 ))
- Fix room publish permissions not being checked on room creation. ([\#7260](https://github.com/matrix-org/synapse/issues/7260 ))
- Reject unknown session IDs during user interactive authentication instead of silently creating a new session. ([\#7268](https://github.com/matrix-org/synapse/issues/7268 ))
- Fix a SQL query introduced in Synapse 1.12.0 which could cause large amounts of logging to the postgres slow-query log. ([\#7274](https://github.com/matrix-org/synapse/issues/7274 ))
- Persist user interactive authentication sessions across workers and Synapse restarts. ([\#7302](https://github.com/matrix-org/synapse/issues/7302 ))
- Fixed backwards compatibility logic of the first value of `trusted_third_party_id_servers` being used for `account_threepid_delegates.email`, which occurs when the former, deprecated option is set and the latter is not. ([\#7316](https://github.com/matrix-org/synapse/issues/7316 ))
- Fix a bug where event updates might not be sent over replication to worker processes after the stream falls behind. ([\#7337](https://github.com/matrix-org/synapse/issues/7337 ), [\#7358](https://github.com/matrix-org/synapse/issues/7358 ))
- Fix bad error handling that would cause Synapse to crash if it's provided with a YAML configuration file that's either empty or doesn't parse into a key-value map. ([\#7341](https://github.com/matrix-org/synapse/issues/7341 ))
- Fix incorrect metrics reporting for `renew_attestations` background task. ([\#7344](https://github.com/matrix-org/synapse/issues/7344 ))
- Prevent non-federating rooms from appearing in responses to federated `POST /publicRoom` requests when a filter was included. ([\#7367](https://github.com/matrix-org/synapse/issues/7367 ))
- Fix a bug which would cause the room durectory to be incorrectly populated if Synapse was upgraded directly from v1.2.1 or earlier to v1.4.0 or later. Note that this fix does not apply retrospectively; see the [upgrade notes](UPGRADE.rst#upgrading-to-v1130) for more information. ([\#7387](https://github.com/matrix-org/synapse/issues/7387 ))
- Fix bug in `EventContext.deserialize`. ([\#7393](https://github.com/matrix-org/synapse/issues/7393 ))
- Fix a long-standing bug which could cause messages not to be sent over federation, when state events with state keys matching user IDs (such as custom user statuses) were received. ([\#7376](https://github.com/matrix-org/synapse/issues/7376 ))
- Restore compatibility with non-compliant clients during the user interactive authentication process, fixing a problem introduced in v1.13.0rc1. ([\#7483](https://github.com/matrix-org/synapse/issues/7483 ))
- Hash passwords as early as possible during registration. ([\#7523](https://github.com/matrix-org/synapse/issues/7523 ))
Improved Documentation
----------------------
- Update Debian installation instructions to recommend installing the `virtualenv` package instead of `python3-virtualenv`. ([\#6892](https://github.com/matrix-org/synapse/issues/6892 ))
- Improve the documentation for database configuration. ([\#6988](https://github.com/matrix-org/synapse/issues/6988 ))
- Improve the documentation of application service configuration files. ([\#7091](https://github.com/matrix-org/synapse/issues/7091 ))
- Update pre-built package name for FreeBSD. ([\#7107](https://github.com/matrix-org/synapse/issues/7107 ))
- Update postgres docs with login troubleshooting information. ([\#7119](https://github.com/matrix-org/synapse/issues/7119 ))
- Clean up INSTALL.md a bit. ([\#7141](https://github.com/matrix-org/synapse/issues/7141 ))
- Add documentation for running a local CAS server for testing. ([\#7147](https://github.com/matrix-org/synapse/issues/7147 ))
- Improve README.md by being explicit about public IP recommendation for TURN relaying. ([\#7167](https://github.com/matrix-org/synapse/issues/7167 ))
- Fix a small typo in the `metrics_flags` config option. ([\#7171](https://github.com/matrix-org/synapse/issues/7171 ))
- Update the contributed documentation on managing synapse workers with systemd, and bring it into the core distribution. ([\#7234](https://github.com/matrix-org/synapse/issues/7234 ))
- Add documentation to the `password_providers` config option. Add known password provider implementations to docs. ([\#7238](https://github.com/matrix-org/synapse/issues/7238 ), [\#7248](https://github.com/matrix-org/synapse/issues/7248 ))
- Modify suggested nginx reverse proxy configuration to match Synapse's default file upload size. Contributed by @ProCycleDev. ([\#7251](https://github.com/matrix-org/synapse/issues/7251 ))
- Documentation of media_storage_providers options updated to avoid misunderstandings. Contributed by Tristan Lins. ([\#7272](https://github.com/matrix-org/synapse/issues/7272 ))
- Add documentation on monitoring workers with Prometheus. ([\#7357](https://github.com/matrix-org/synapse/issues/7357 ))
- Clarify endpoint usage in the users admin api documentation. ([\#7361](https://github.com/matrix-org/synapse/issues/7361 ))
Deprecations and Removals
-------------------------
- Remove nonfunctional `captcha_bypass_secret` option from `homeserver.yaml`. ([\#7137](https://github.com/matrix-org/synapse/issues/7137 ))
Internal Changes
----------------
- Add benchmarks for LruCache. ([\#6446](https://github.com/matrix-org/synapse/issues/6446 ))
- Return total number of users and profile attributes in admin users endpoint. Contributed by Awesome Technologies Innovationslabor GmbH. ([\#6881](https://github.com/matrix-org/synapse/issues/6881 ))
- Change device list streams to have one row per ID. ([\#7010](https://github.com/matrix-org/synapse/issues/7010 ))
- Remove concept of a non-limited stream. ([\#7011](https://github.com/matrix-org/synapse/issues/7011 ))
- Move catchup of replication streams logic to worker. ([\#7024](https://github.com/matrix-org/synapse/issues/7024 ), [\#7195](https://github.com/matrix-org/synapse/issues/7195 ), [\#7226](https://github.com/matrix-org/synapse/issues/7226 ), [\#7239](https://github.com/matrix-org/synapse/issues/7239 ), [\#7286](https://github.com/matrix-org/synapse/issues/7286 ), [\#7290](https://github.com/matrix-org/synapse/issues/7290 ), [\#7318](https://github.com/matrix-org/synapse/issues/7318 ), [\#7326](https://github.com/matrix-org/synapse/issues/7326 ), [\#7378](https://github.com/matrix-org/synapse/issues/7378 ), [\#7421](https://github.com/matrix-org/synapse/issues/7421 ))
- Convert some of synapse.rest.media to async/await. ([\#7110](https://github.com/matrix-org/synapse/issues/7110 ), [\#7184](https://github.com/matrix-org/synapse/issues/7184 ), [\#7241](https://github.com/matrix-org/synapse/issues/7241 ))
- De-duplicate / remove unused REST code for login and auth. ([\#7115](https://github.com/matrix-org/synapse/issues/7115 ))
- Convert `*StreamRow` classes to inner classes. ([\#7116](https://github.com/matrix-org/synapse/issues/7116 ))
- Clean up some LoggingContext code. ([\#7120](https://github.com/matrix-org/synapse/issues/7120 ), [\#7181](https://github.com/matrix-org/synapse/issues/7181 ), [\#7183](https://github.com/matrix-org/synapse/issues/7183 ), [\#7408](https://github.com/matrix-org/synapse/issues/7408 ), [\#7426](https://github.com/matrix-org/synapse/issues/7426 ))
- Add explicit `instance_id` for USER_SYNC commands and remove implicit `conn_id` usage. ([\#7128](https://github.com/matrix-org/synapse/issues/7128 ))
- Refactored the CAS authentication logic to a separate class. ([\#7136](https://github.com/matrix-org/synapse/issues/7136 ))
- Run replication streamers on workers. ([\#7146](https://github.com/matrix-org/synapse/issues/7146 ))
- Add tests for outbound device pokes. ([\#7157](https://github.com/matrix-org/synapse/issues/7157 ))
- Fix device list update stream ids going backward. ([\#7158](https://github.com/matrix-org/synapse/issues/7158 ))
- Use `stream.current_token()` and remove `stream_positions()`. ([\#7172](https://github.com/matrix-org/synapse/issues/7172 ))
- Move client command handling out of TCP protocol. ([\#7185](https://github.com/matrix-org/synapse/issues/7185 ))
- Move server command handling out of TCP protocol. ([\#7187](https://github.com/matrix-org/synapse/issues/7187 ))
- Fix consistency of HTTP status codes reported in log lines. ([\#7188](https://github.com/matrix-org/synapse/issues/7188 ))
- Only run one background database update at a time. ([\#7190](https://github.com/matrix-org/synapse/issues/7190 ))
- Remove sent outbound device list pokes from the database. ([\#7192](https://github.com/matrix-org/synapse/issues/7192 ))
- Add a background database update job to clear out duplicate `device_lists_outbound_pokes`. ([\#7193](https://github.com/matrix-org/synapse/issues/7193 ))
- Remove some extraneous debugging log lines. ([\#7207](https://github.com/matrix-org/synapse/issues/7207 ))
- Add explicit Python build tooling as dependencies for the snapcraft build. ([\#7213](https://github.com/matrix-org/synapse/issues/7213 ))
- Add typing information to federation server code. ([\#7219](https://github.com/matrix-org/synapse/issues/7219 ))
- Extend room admin api (`GET /_synapse/admin/v1/rooms`) with additional attributes. ([\#7225](https://github.com/matrix-org/synapse/issues/7225 ))
- Unblacklist '/upgrade creates a new room' sytest for workers. ([\#7228](https://github.com/matrix-org/synapse/issues/7228 ))
- Remove redundant checks on `daemonize` from synctl. ([\#7233](https://github.com/matrix-org/synapse/issues/7233 ))
- Upgrade jQuery to v3.4.1 on fallback login/registration pages. ([\#7236](https://github.com/matrix-org/synapse/issues/7236 ))
- Change log line that told user to implement onLogin/onRegister fallback js functions to a warning, instead of an info, so it's more visible. ([\#7237](https://github.com/matrix-org/synapse/issues/7237 ))
- Correct the parameters of a test fixture. Contributed by Isaiah Singletary. ([\#7243](https://github.com/matrix-org/synapse/issues/7243 ))
- Convert auth handler to async/await. ([\#7261](https://github.com/matrix-org/synapse/issues/7261 ))
- Add some unit tests for replication. ([\#7278](https://github.com/matrix-org/synapse/issues/7278 ))
- Improve typing annotations in `synapse.replication.tcp.streams.Stream`. ([\#7291](https://github.com/matrix-org/synapse/issues/7291 ))
- Reduce log verbosity of url cache cleanup tasks. ([\#7295](https://github.com/matrix-org/synapse/issues/7295 ))
- Fix sample SAML Service Provider configuration. Contributed by @frcl. ([\#7300](https://github.com/matrix-org/synapse/issues/7300 ))
- Fix StreamChangeCache to work with multiple entities changing on the same stream id. ([\#7303](https://github.com/matrix-org/synapse/issues/7303 ))
- Fix an incorrect import in IdentityHandler. ([\#7319](https://github.com/matrix-org/synapse/issues/7319 ))
- Reduce logging verbosity for successful federation requests. ([\#7321](https://github.com/matrix-org/synapse/issues/7321 ))
- Convert some federation handler code to async/await. ([\#7338](https://github.com/matrix-org/synapse/issues/7338 ))
- Fix collation for postgres for unit tests. ([\#7359](https://github.com/matrix-org/synapse/issues/7359 ))
- Convert RegistrationWorkerStore.is_server_admin and dependent code to async/await. ([\#7363](https://github.com/matrix-org/synapse/issues/7363 ))
- Add an `instance_name` to `RDATA` and `POSITION` replication commands. ([\#7364](https://github.com/matrix-org/synapse/issues/7364 ))
- Thread through instance name to replication client. ([\#7369](https://github.com/matrix-org/synapse/issues/7369 ))
- Convert synapse.server_notices to async/await. ([\#7394](https://github.com/matrix-org/synapse/issues/7394 ))
- Convert synapse.notifier to async/await. ([\#7395](https://github.com/matrix-org/synapse/issues/7395 ))
- Fix issues with the Python package manifest. ([\#7404](https://github.com/matrix-org/synapse/issues/7404 ))
- Prevent methods in `synapse.handlers.auth` from polling the homeserver config every request. ([\#7420](https://github.com/matrix-org/synapse/issues/7420 ))
- Speed up fetching device lists changes when handling `/sync` requests. ([\#7423](https://github.com/matrix-org/synapse/issues/7423 ))
- Run group attestation renewal in series rather than parallel for performance. ([\#7442](https://github.com/matrix-org/synapse/issues/7442 ))
- Fix linting errors in new version of Flake8. ([\#7470](https://github.com/matrix-org/synapse/issues/7470 ))
- Update the version of dh-virtualenv we use to build debs, and add focal to the list of target distributions. ([\#7526](https://github.com/matrix-org/synapse/issues/7526 ))
2020-05-19 09:55:39 -04:00
Patrick Cloke
45c8b1c618
Update changelog based on feedback.
2020-05-19 09:31:59 -04:00
Patrick Cloke
66fd16261c
Move warnings in the changelog and re-iterate changes to branches.
2020-05-19 09:28:02 -04:00
Patrick Cloke
ac3264bf1e
1.13.0
2020-05-19 09:19:09 -04:00
Richard van der Hoff
1fc8914f76
update dh-virtualenv ( #7526 )
2020-05-19 13:48:41 +01:00
Romain Bouyé
a57863d2b4
synctl warns when no process is stopped and avoids start ( #6598 )
...
* If an error occurs when stopping a process synctl now logs a warning.
* During a restart, synctl will avoid attempting to start Synapse if an error
occurs during stopping Synapse.
2020-05-19 08:47:45 -04:00
Paul Tötterman
ab3e19d814
Improve API doc readability ( #7527 )
2020-05-19 11:20:23 +01:00
Aaron Raimist
250f3eb991
Omit displayname or avatar_url if they aren't set instead of returning null ( #7497 )
...
Per https://github.com/matrix-org/matrix-doc/issues/1436#issuecomment-410089470 they should be omitted instead of returning null or "". They aren't marked as required in the spec.
Fixes https://github.com/matrix-org/synapse/issues/7333
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2020-05-19 10:31:25 +01:00
Patrick Cloke
ee421e5244
Merge tag 'v1.13.0rc3' into develop
...
Synapse 1.13.0rc3 (2020-05-18)
Bugfixes:
- Hash passwords as early as possible during registration. #7523
2020-05-18 11:10:04 -04:00
Patrick Cloke
3c8a57f080
1.13.0rc3
2020-05-18 10:58:51 -04:00
Patrick Cloke
56db0b1365
Hash passwords earlier in the registration process ( #7523 )
2020-05-18 09:46:18 -04:00
Erik Johnston
51055c8c44
Allow ReplicationRestResource to be added to workers ( #7515 )
...
This allows workers to talk to each other over HTTP replication.
2020-05-18 12:24:48 +01:00
Richard van der Hoff
4d1afb1dfe
Merge pull request #7519 from matrix-org/rav/kill_py2_code
...
Kill off some old python 2 code
2020-05-18 10:45:30 +01:00
Richard van der Hoff
164f50f5f2
fix mypy for tests/replication ( #7518 )
2020-05-18 10:43:05 +01:00
Patrick Cloke
c29915bd05
Add type hints to room member handlers ( #7513 )
2020-05-15 15:05:25 -04:00
Richard van der Hoff
ab57353de3
changelog
2020-05-15 19:37:41 +01:00
Richard van der Hoff
d4676910c9
remove miscellaneous PY2 code
2020-05-15 19:37:41 +01:00
Richard van der Hoff
e6027562e2
remove builtins.buffer code from storage code
...
this is no longer needed on python 3
2020-05-15 19:37:41 +01:00
Richard van der Hoff
91f51c611c
remove redundant __func__
...
this is a no-op under python 3
2020-05-15 19:37:41 +01:00
Richard van der Hoff
65902e08c3
remove to_ascii
...
this is a no-op on python 3.
2020-05-15 19:12:03 +01:00
Richard van der Hoff
08fa96f030
Remove exception_to_unicode
...
this is a no-op on python 3.
2020-05-15 19:07:24 +01:00
Richard van der Hoff
6c1f7c722f
Fix limit logic for AccountDataStream ( #7384 )
...
Make sure that the AccountDataStream presents complete updates, in the right
order.
This is much the same fix as #7337 and #7358 , but applied to a different stream.
2020-05-15 19:03:25 +01:00
Andrew Morgan
34a43f0084
Fix a couple of small typos
2020-05-15 18:54:32 +01:00
Patrick Cloke
a3cf36f76e
Support UI Authentication for OpenID Connect accounts ( #7457 )
2020-05-15 12:26:02 -04:00
Erik Johnston
03aff4c75e
Add a worker store for search insertion. ( #7516 )
...
This is required as both event persistence and the background update needs access to this function. It should be perfectly safe for two workers to write to that table at the same time.
2020-05-15 17:22:47 +01:00
Andrew Morgan
16090a077f
Prevent 0-member/null room_version rooms from appearing in group room queries ( #7465 )
2020-05-15 17:17:42 +01:00
Erik Johnston
1f36ff69e8
Move event stream handling out of slave store. ( #7491 )
...
This allows us to have the logic on both master and workers, which is necessary to move event persistence off master.
We also combine the instantiation of ID generators from DataStore and slave stores to the base worker stores. This allows us to select which process writes events independently of the master/worker splits.
2020-05-15 16:43:59 +01:00
Patrick Cloke
5355421295
Add type hints to event_auth code. ( #7505 )
2020-05-15 11:19:43 -04:00
Andrew Morgan
86614e251f
Fix a small typo in the arguments of simple_update in update_remote_profile_cache ( #7511 )
2020-05-15 16:17:12 +01:00
Richard van der Hoff
24d9151a08
Formatting for reverse-proxy docs ( #7514 )
...
also a small clarification to nginx
2020-05-15 15:13:39 +01:00
Jeff Peeler
572b444dab
Add Caddy 2 example ( #7463 )
...
The specific headers that are passed using this new configuration format
are Host and X-Forwarded-For, which should be all that's required.
Note that for production another matcher should be added in the first
section to properly handle the base_url lookup:
reverse_proxy /.well-known/matrix/* http://localhost:8008
Signed-off-by: Jeff Peeler <jpeeler@gmail.com >
2020-05-15 14:36:01 +01:00
Patrick Cloke
e9f3de0bab
Update the room member handler to use async/await. ( #7507 )
2020-05-15 09:32:13 -04:00
Patrick Cloke
08bc80ef09
Implement room version 6 (MSC2240). ( #7506 )
2020-05-15 09:30:10 -04:00
Andrew Morgan
02d97fc3ba
Ignore incoming presence updates when presence is disabled ( #7508 )
2020-05-15 11:44:00 +01:00
Patrick Cloke
56b66db78a
Strictly enforce canonicaljson requirements in a new room version ( #7381 )
2020-05-14 13:24:01 -04:00
Richard van der Hoff
ec0b72bc4e
Merge branch 'master' into develop
2020-05-14 18:12:00 +01:00
Richard van der Hoff
a564ec4d4b
remove spurious changelog files
...
These PRs have gone straight to `master` and aren't really relevant to the
release, so it doesn't make sense to have changelog entries for them.
2020-05-14 18:11:20 +01:00
Richard van der Hoff
66d03639dc
Notes on using git ( #7496 )
...
* general updates to CONTRIBUTING.md
* notes on updating your PR
* Notes on squash-merging or otherwise
* document git branching model
2020-05-14 18:03:10 +01:00
Patrick Cloke
fef3ff5cc4
Enforce MSC2209: auth rules for notifications in power level event ( #7502 )
...
In a new room version, the "notifications" key of power level events are
subject to restricted auth rules.
2020-05-14 12:38:17 -04:00
Andrew Morgan
5611644519
Workaround for failure to wrap reason in Failure ( #7473 )
2020-05-14 17:07:24 +01:00
Richard van der Hoff
eafd103fc7
Fix b'GET' in prometheus metrics ( #7503 )
2020-05-14 17:01:34 +01:00
Andrew Morgan
225c165087
Allow expired accounts to logout ( #7443 )
2020-05-14 16:32:49 +01:00
Erik Johnston
4734a7bbe4
Move EventStream handling into default ReplicationDataHandler ( #7493 )
...
This is so that the logic can happen on both master and workers when we move event persistence out.
2020-05-14 14:01:39 +01:00
Erik Johnston
1de36407d1
Add instance_map config and route replication calls ( #7495 )
2020-05-14 14:00:58 +01:00
Richard van der Hoff
dede23ff1e
Merge tag 'v1.13.0rc2' into develop
...
Synapse 1.13.0rc2 (2020-05-14)
==============================
Bugfixes
--------
- Fix a long-standing bug which could cause messages not to be sent over federation, when state events with state keys matching user IDs (such as custom user statuses) were received. ([\#7376](https://github.com/matrix-org/synapse/issues/7376 ))
- Restore compatibility with non-compliant clients during the user interactive authentication process, fixing a problem introduced in v1.13.0rc1. ([\#7483](https://github.com/matrix-org/synapse/issues/7483 ))
Internal Changes
----------------
- Fix linting errors in new version of Flake8. ([\#7470](https://github.com/matrix-org/synapse/issues/7470 ))
2020-05-14 11:46:38 +01:00
Richard van der Hoff
75fbc1a0c6
1.13.0rc2
2020-05-14 11:10:11 +01:00
Richard van der Hoff
623abbeb8d
1.13.0rc2
2020-05-14 11:01:24 +01:00
Richard van der Hoff
a0e063387d
Stop get_joined_users corruption from custom statuses ( #7376 )
...
Fix a bug where the `get_joined_users` cache could be corrupted by custom
status events (or other state events with a state_key matching the user ID).
The bug was introduced by #2229 , but has largely gone unnoticed since then.
Fixes #7099 , #7373 .
2020-05-14 10:07:54 +01:00
Patrick Cloke
5d64fefd6c
Do not validate that the client dict is stable during UI Auth. ( #7483 )
...
This backs out some of the validation for the client dictionary and logs if
this changes during a user interactive authentication session instead.
2020-05-13 14:26:44 -04:00
Erik Johnston
1124111a12
Allow censoring of events to happen on workers. ( #7492 )
...
This is safe as we can now write to cache invalidation stream on workers, and is required for when we move event persistence off master.
2020-05-13 17:15:40 +01:00
Paul Tötterman
46cb2550bb
Fix copypasted comment ( #7477 )
...
Signed-off-by: Paul Tötterman <paul.totterman@iki.fi >
2020-05-13 16:55:43 +01:00
Erik Johnston
18c1e52d82
Clean up replication unit tests. ( #7490 )
2020-05-13 16:01:47 +01:00
Erik Johnston
00ba9c48bf
Spelling
2020-05-13 13:38:51 +01:00
Erik Johnston
782e4e64df
Shuffle persist event data store functions. ( #7440 )
...
The aim here is to get to a stage where we have a `PersistEventStore` that holds all the write methods used during event persistence, so that we can take that class out of the `DataStore` mixin and instansiate it separately. This will allow us to instansiate it on processes other than master, while also ensuring it is only available on processes that are configured to write to events stream.
This is a bit of an architectural change, where we end up with multiple classes per data store (rather than one per data store we have now). We end up having:
1. Storage classes that provide high level APIs that can talk to multiple data stores.
2. Data store modules that consist of classes that must point at the same database instance.
3. Classes in a data store that can be instantiated on processes depending on config.
2020-05-13 13:38:22 +01:00
Patrick Cloke
edd3b0747c
Fix new flake8 errors ( #7489 )
...
This is a cherry-pick of 1a1da60ad2 (#7470 )
to the release-v1.13.0 branch.
2020-05-13 08:24:50 -04:00
Erik Johnston
7ee24c5674
Have all instances correctly respond to REPLICATE command. ( #7475 )
...
Before all streams were only written to from master, so only master needed to respond to `REPLICATE` commands.
Before all instances wrote to the cache invalidation stream, but didn't respond to `REPLICATE`. This was a bug, which could lead to missed rows from cache invalidation stream if an instance is restarted, however all the caches would be empty in that case so it wasn't a problem.
2020-05-13 10:27:02 +01:00
Erik Johnston
8ca79613e6
Fix Redis reconnection logic ( #7482 )
...
Proactively send out `POSITION` commands (as if we had just received a `REPLICATE`) when we connect to Redis. This is important as other instances won't notice we've connected to issue a `REPLICATE` command (unlike for direct TCP connections). This is only currently an issue if master process reconnects without restarting (if it restarts then it won't have written anything and so other instances probably won't have missed anything).
2020-05-13 09:57:15 +01:00
Patrick Cloke
51fb0fc2e5
Update documentation about SSO mapping providers ( #7458 )
2020-05-12 10:51:07 -04:00
Erik Johnston
1a1da60ad2
Fix new flake8 errors ( #7470 )
2020-05-12 11:20:48 +01:00
Patrick Cloke
8c8858e124
Convert federation handler to async/await. ( #7459 )
2020-05-11 15:12:46 -04:00
Patrick Cloke
be309d99cf
Convert search code to async/await. ( #7460 )
2020-05-11 15:12:39 -04:00
Amber Brown
7cb8b4bc67
Allow configuration of Synapse's cache without using synctl or environment variables ( #6391 )
2020-05-11 18:45:23 +01:00
Andrew Morgan
a8580c5f19
Remove unused store method get_hosts_in_room ( #7448 )
2020-05-11 16:55:57 +01:00
Andrew Morgan
5cf758cdd6
Merge branch 'release-v1.13.0' into develop
...
* release-v1.13.0:
Don't UPGRADE database rows
RST indenting
Put rollback instructions in upgrade notes
Fix changelog typo
Oh yeah, RST
Absolute URL it is then
Fix upgrade notes link
Provide summary of upgrade issues in changelog. Fix )
Move next version notes from changelog to upgrade notes
Changelog fixes
1.13.0rc1
Documentation on setting up redis (#7446 )
Rework UI Auth session validation for registration (#7455 )
Fix errors from malformed log line (#7454 )
Drop support for redis.dbid (#7450 )
2020-05-11 16:46:33 +01:00
Andrew Morgan
fa4af2c3af
Don't UPGRADE database rows
2020-05-11 16:08:37 +01:00
Andrew Morgan
e0caeedab3
RST indenting
2020-05-11 16:05:23 +01:00
Andrew Morgan
8cced49764
Put rollback instructions in upgrade notes
2020-05-11 16:04:00 +01:00
Andrew Morgan
647a995b96
Fix changelog typo
2020-05-11 15:40:36 +01:00
Andrew Morgan
c3416c888a
Oh yeah, RST
2020-05-11 15:37:51 +01:00
Andrew Morgan
b41d7b3969
Absolute URL it is then
2020-05-11 15:36:32 +01:00
Andrew Morgan
3916c655f8
Fix upgrade notes link
2020-05-11 15:34:59 +01:00
Andrew Morgan
1f73d28b6c
Provide summary of upgrade issues in changelog. Fix )
2020-05-11 15:33:53 +01:00
Andrew Morgan
71c9307509
Move next version notes from changelog to upgrade notes
2020-05-11 15:10:08 +01:00
Andrew Morgan
200ad02624
Changelog fixes
2020-05-11 14:56:29 +01:00
Andrew Morgan
20ffaa7209
1.13.0rc1
2020-05-11 14:54:38 +01:00
Neil Johnson
85155654c5
Documentation on setting up redis ( #7446 )
2020-05-11 13:21:15 +01:00
Patrick Cloke
0ad6d28b0d
Rework UI Auth session validation for registration ( #7455 )
...
Be less strict about validation of UI authentication sessions during
registration to match client expecations.
2020-05-08 16:08:58 -04:00
Andrew Morgan
67feea8044
Extend spam checker to allow for multiple modules ( #7435 )
2020-05-08 19:25:48 +01:00
Quentin Gliech
616af44137
Implement OpenID Connect-based login ( #7256 )
2020-05-08 08:30:40 -04:00
Manuel Stahl
a4a5ec4096
Add room details admin endpoint ( #7317 )
2020-05-07 15:33:07 -04:00
Richard van der Hoff
aa5aa6f96a
Fix errors from malformed log line ( #7454 )
2020-05-07 19:51:38 +01:00
Richard van der Hoff
da9b2db3af
Drop support for redis.dbid ( #7450 )
...
Since we only use pubsub, the dbid is irrelevant.
2020-05-07 16:46:15 +01:00
Brendan Abolivier
5bb26b7c4f
Merge branch 'release-v1.13.0' into develop
2020-05-07 17:31:19 +02:00
Patrick Cloke
9e0384dd3f
Fixes typo (bellow -> below) ( #7449 )
2020-05-07 09:31:06 -04:00
Patrick Cloke
22246919e3
Add more type hints to SAML handler. ( #7445 )
2020-05-07 09:30:45 -04:00
Erik Johnston
d7983b63a6
Support any process writing to cache invalidation stream. ( #7436 )
2020-05-07 13:51:08 +01:00
Brendan Abolivier
2929ce29d6
Merge pull request #7398 from Starbix/alpine-3.11
...
Update docker runtime image to Alpine v3.11
2020-05-07 11:56:56 +02:00
Brendan Abolivier
d9b8d27494
Add a configuration setting for the dummy event threshold ( #7422 )
...
Add dummy_events_threshold which allows configuring the number of forward extremities a room needs for Synapse to send forward extremities in it.
2020-05-07 10:35:23 +01:00
Patrick Cloke
d7c2df2fa3
Improve per-block CPU and DB usage metrics ( #7426 )
2020-05-06 16:43:39 -04:00
Andrew Morgan
4162c39dcf
Port group attestation renewal slow down from matrix-org-hotfixes ( #7442 )
2020-05-06 20:21:38 +01:00
Richard van der Hoff
e053c86a96
Make redis go faster with hiredis ( #7439 )
...
For the record, the reason we need this is as follows:
each RDATA command comes down the redis pipe as a subscription message. txredisapi as written needs at least three reactor ticks to read each subscription message from the tcp buffer. Hence, once the process gets loaded, it starts getting behind, and eventually redis knifes the connection. it then takes ages for the master to work its way through the backlog, before it reconnects again, during which any commands from any workers are dropped.
2020-05-06 17:36:46 +01:00
Richard van der Hoff
62ee862119
Merge branch 'release-v1.13.0' into develop
2020-05-06 15:56:03 +01:00
Andrew Morgan
aee9130a83
Stop Auth methods from polling the config on every req. ( #7420 )
2020-05-06 15:54:58 +01:00
Richard van der Hoff
fa0b2bd28d
Merge pull request #7428 from matrix-org/rav/cross_signing_keys_cache
...
Make get_e2e_cross_signing_key delegate to get_e2e_cross_signing_keys_bulk
2020-05-06 12:00:01 +01:00
Richard van der Hoff
16b67c404d
Make get_e2e_cross_signing_key delegate to get_e2e_cross_signing_keys_bulk
...
... mostly because the latter has a cache.
2020-05-06 11:59:19 +01:00
Richard van der Hoff
db5f9031b7
Fix batching for fetching cross-signing keys
...
There's no point carefully dividing a list into batches, and then completely
ignoring the batches.
2020-05-06 11:59:19 +01:00
Richard van der Hoff
2e0c46ca07
Merge branch 'release-v1.13.0' into develop
2020-05-06 11:58:31 +01:00
Richard van der Hoff
79007a42b2
Merge pull request #7429 from matrix-org/rav/upsert_for_device_list
...
use an upsert to update device_lists_outbound_last_success
2020-05-06 11:53:18 +01:00
Richard van der Hoff
30a19daa02
Merge branch 'develop' into rav/upsert_for_device_list
2020-05-06 11:43:11 +01:00
Richard van der Hoff
e48361545d
use an upsert to update device_lists_outbound_last_success
2020-05-06 11:41:23 +01:00
Richard van der Hoff
0f6ebf393d
Better type annotations for simple_upsert_txn
...
most of these params don't really need to be lists.
2020-05-06 11:41:23 +01:00
Erik Johnston
b26f3e582c
Merge pull request #7423 from matrix-org/erikj/faster_device_lists_fetch
...
Speed up fetching device lists changes in sync.
2020-05-06 11:14:13 +01:00
Richard van der Hoff
c255b0ffdc
Merge pull request #7427 from matrix-org/rav/fix_dropped_messages
...
Fix lost events on replication reconnection
2020-05-06 10:54:25 +01:00
Richard van der Hoff
a8c17da245
Merge branch 'release-v1.13.0' into rav/fix_dropped_messages
2020-05-05 23:01:12 +01:00
Richard van der Hoff
1242267316
Merge branch 'release-v1.13.0' into rav/fix_dropped_messages
2020-05-05 22:38:44 +01:00
Richard van der Hoff
7bf788ac73
changelog
2020-05-05 22:38:16 +01:00
Richard van der Hoff
7f7eedbebb
Wait for a POSITION on the right connection before accepting RDATA
...
... otherwise we can believe we're up to date when we're not.
2020-05-05 22:38:16 +01:00
Brendan Abolivier
5b8023dc7f
Move logs about discarded RDATA to debug ( #7421 )
2020-05-05 21:07:33 +02:00
Richard van der Hoff
d78265af0c
Wait to subscribe before sending REPLICATE
2020-05-05 19:31:37 +01:00
Richard van der Hoff
13dd458b8d
Merge branch 'release-v1.13.0' into erikj/faster_device_lists_fetch
2020-05-05 18:14:00 +01:00
Richard van der Hoff
714560e325
Update changelog.d/7423.misc
2020-05-05 18:03:59 +01:00
Erik Johnston
79fe3e068b
Newsfile
2020-05-05 17:40:29 +01:00
Erik Johnston
f9073893af
Speed up fetching device lists changes in sync.
...
Currently we copy `users_who_share_room` needlessly about three times,
which is expensive when the set is large (which it can easily be).
2020-05-05 17:40:29 +01:00
Richard van der Hoff
16b1a34e80
Fix typing annotations in synapse/federation ( #7382 )
...
We're pretty close to having mypy working for `synapse.federation`, so let's
finish the job.
2020-05-05 14:27:13 +01:00
Patrick Cloke
fe69fb6263
Add backwards compatibility codepath to LoggingContext. ( #7408 )
2020-05-05 09:21:34 -04:00
Erik Johnston
7941a70fa8
Fix bug in EventContext.deserialize. ( #7393 )
...
This caused `prev_state_ids` to be incorrect if the state event was not
replacing an existing state entry.
2020-05-05 14:17:27 +01:00
Richard van der Hoff
d5aa7d93ed
Fix catchup-on-reconnect for the Federation Stream ( #7374 )
...
looks like we managed to break this during the refactorathon.
2020-05-05 14:15:57 +01:00
Richard van der Hoff
207b1737ee
Update reverse_proxy.md
...
a couple of cleanups
2020-05-05 11:29:29 +01:00
Erik Johnston
8123b2f909
Add MultiWriterIdGenerator. ( #7281 )
...
This will be used to coordinate stream IDs across multiple writers.
Functions as the equivalent of both `StreamIdGenerator` and
`SlavedIdTracker`.
2020-05-04 17:17:45 +01:00
Brendan Abolivier
15aa09bbe6
Merge branch 'release-v1.13.0' into develop
2020-05-04 16:33:56 +02:00
Brendan Abolivier
9858d5c362
Fix ordering in MANIFEST.in
2020-05-04 16:33:30 +02:00
Brendan Abolivier
ad088716bc
Merge pull request #7404 from matrix-org/babolivier/fix_manifest
...
Fix MANIFEST.in
2020-05-04 16:24:15 +02:00
Brendan Abolivier
068da604c2
Fix MANIFEST.in
...
An update of check-manifest shone some light on some issues with MANIFEST.in, specifically that we didn't ignore/prune the contrib directory, and that we were using prune instead of exclude for files. This fixes both issues.
Fixes #7403
2020-05-04 15:18:06 +02:00
Erik Johnston
350421e058
Fix redis password support. ( #7401 )
...
We forgot to set the password on the subscriber connection, as well as
not calling super methods for overridden connectionMade/connectionLost
functions.
2020-05-04 14:04:09 +01:00
Patrick Cloke
eab59d758d
Convert the room handler to async/await. ( #7396 )
2020-05-04 07:43:52 -04:00
Cédric Laubacher
a251e0f4ba
Update runtime docker image to Alpine v3.11
2020-05-03 16:07:24 +02:00
Patrick Cloke
032e5a2aca
Convert synapse.server_notices to async/await. ( #7394 )
2020-05-01 15:28:59 -04:00
Patrick Cloke
b0cbc57375
Convert the synapse.notifier module to async/await. ( #7395 )
2020-05-01 15:14:49 -04:00
Richard van der Hoff
97ef1471c6
Wait for current_state_events_membership before populate_stats_process_rooms ( #7387 )
...
populate_stats_process_rooms was added in #5971 / v1.4.0; current_state_events_membership was added in #5706 / v1.3.0.
Fixes #7380 .
2020-05-01 18:05:58 +01:00
Erik Johnston
0e719f2398
Thread through instance name to replication client. ( #7369 )
...
For in memory streams when fetching updates on workers we need to query the source of the stream, which currently is hard coded to be master. This PR threads through the source instance we received via `POSITION` through to the update function in each stream, which can then be passed to the replication client for in memory streams.
2020-05-01 17:19:56 +01:00
Brendan Abolivier
cb6fd280af
Add a section about support to the top of the README ( #7392 )
...
Continuation of #7379
Adds a section in the README telling people to go to #synapse:matrix.org instead of using github issues. I'm not entirely sure about placing it above the install section but then people are likely to first seek support when installing (if something goes boom), and it's probably better to have it as high as possible anyway so people actually see it.
2020-05-01 17:27:22 +02:00
Erik Johnston
3085cde577
Use stream.current_token() and remove stream_positions() ( #7172 )
...
We move the processing of typing and federation replication traffic into their handlers so that `Stream.current_token()` points to a valid token. This allows us to remove `get_streams_to_replicate()` and `stream_positions()`.
2020-05-01 15:21:35 +01:00
Andrew Morgan
6b22921b19
async/await is_server_admin ( #7363 )
2020-05-01 15:15:36 +01:00
Andrew Morgan
2e8955f4a6
Further improvements to requesting the public rooms list on a homeserver which has it set to private ( #7368 )
2020-05-01 15:15:08 +01:00
Brendan Abolivier
a6b32bad77
Make it clearer that #synapse:matrix.org is our support channel ( #7379 )
...
This PR moves the "support is in #synapse:matrix.org" in the bug report template outside of the comment as some people seem to ignore what's in the comments, and phrase it a bit more like the support request template. It also adds a default issue template that says the same thing. It's also adding a notice about the security disclosure to both the default template and the bug report one.
It also adds a badge to the top of the README with an alt text saying about the same message if the badge doesn't load (e.g. if matrix.org is slow).
Fixes #6826
2020-05-01 13:42:35 +02:00
Richard van der Hoff
b2dba06079
Workaround for assertion errors from db_query_to_update_function ( #7378 )
...
Hopefully this is no worse than what we have on master...
2020-05-01 09:25:16 +01:00
Patrick Cloke
627b0f5f27
Persist user interactive authentication sessions ( #7302 )
...
By persisting the user interactive authentication sessions to the database, this fixes
situations where a user hits different works throughout their auth session and also
allows sessions to persist through restarts of Synapse.
2020-04-30 13:47:49 -04:00
Andrew Morgan
9d8ecc9e6c
Apply federation check for /publicRooms with filter list ( #7367 )
2020-04-30 11:38:07 +01:00
Erik Johnston
37f6823f5b
Add instance name to RDATA/POSITION commands ( #7364 )
...
This is primarily for allowing us to send those commands from workers, but for now simply allows us to ignore echoed RDATA/POSITION commands that we sent (we get echoes of sent commands when using redis). Currently we log a WARNING on the master process every time we receive an echoed RDATA.
2020-04-29 16:23:08 +01:00
Erik Johnston
3eab76ad43
Don't relay REMOTE_SERVER_UP cmds to same conn. ( #7352 )
...
For direct TCP connections we need the master to relay REMOTE_SERVER_UP
commands to the other connections so that all instances get notified
about it. The old implementation just relayed to all connections,
assuming that sending back to the original sender of the command was
safe. This is not true for redis, where commands sent get echoed back to
the sender, which was causing master to effectively infinite loop
sending and then re-receiving REMOTE_SERVER_UP commands that it sent.
The fix is to ensure that we only relay to *other* connections and not
to the connection we received the notification from.
Fixes #7334 .
2020-04-29 14:10:59 +01:00
Richard van der Hoff
c2e1a2110f
Fix limit logic for EventsStream ( #7358 )
...
* Factor out functions for injecting events into database
I want to add some more flexibility to the tools for injecting events into the
database, and I don't want to clutter up HomeserverTestCase with them, so let's
factor them out to a new file.
* Rework TestReplicationDataHandler
This wasn't very easy to work with: the mock wrapping was largely superfluous,
and it's useful to be able to inspect the received rows, and clear out the
received list.
* Fix AssertionErrors being thrown by EventsStream
Part of the problem was that there was an off-by-one error in the assertion,
but also the limit logic was too simple. Fix it all up and add some tests.
2020-04-29 12:30:36 +01:00
Andrew Morgan
eeef9633af
Fix fallback value for account_threepid_delegates.email ( #7316 )
2020-04-29 11:30:06 +01:00
Andrew Morgan
c58ae367d8
Clean up admin api docs ( #7361 )
2020-04-28 20:06:03 +01:00
Manuel Stahl
04dd7d182d
Return total number of users and profile attributes in admin users endpoint ( #6881 )
...
Signed-off-by: Manuel Stahl <manuel.stahl@awesome-technologies.de >
2020-04-28 18:19:36 +01:00
Erik Johnston
fce663889b
Add some replication tests ( #7278 )
...
Specifically some tests for the typing stream, which means we test streams that fetch missing updates via HTTP (rather than via the DB).
We also shuffle things around a bit so that we create two separate `HomeServer` objects, rather than trying to insert a slaved store into places.
Note: `test_typing.py` is heavily inspired by `test_receipts.py`
2020-04-28 17:42:03 +01:00
Andrew Morgan
ce207aa0ff
Fix typo 'datbases' in ConfigError
2020-04-28 16:53:10 +01:00
Richard van der Hoff
fb8ff79efd
Fix collation for postgres for unit tests ( #7359 )
...
When running the UTs against a postgres deatbase, we need to set the collation
correctly.
2020-04-28 14:21:48 +01:00
Erik Johnston
38919b521e
Run replication streamers on workers ( #7146 )
...
Currently we never write to streams from workers, but that will change soon
2020-04-28 13:34:12 +01:00
Richard van der Hoff
07337fe30b
Fix incorrect metrics reporting for renew_attestations ( #7344 )
...
We need to wait for the renewals to finish, so that the metrics are correctly
reported.
2020-04-27 22:20:10 +01:00
Brendan Abolivier
036fab5d8a
Document monitoring workers ( #7357 )
...
It doesn't seem to be documented anywhere and means that you suddenly start losing metrics without any obvious reason when you go from monolith to workers (e.g. #7312 ).
2020-04-27 21:36:47 +02:00
lub
aa2492907f
Add some explanation to application_services.md ( #7091 )
...
Signed-off-by: Simon Körner <git@lubiland.de >
2020-04-27 15:03:09 +01:00
Brendan Abolivier
cc9eceb00d
Don't crash when one of the configuration files is empty ( #7341 )
...
If the admin adds a `.yaml` file that's either empty or doesn't parse into a dict to a config directory (e.g. `conf.d` for debs installs), stuff like https://github.com/matrix-org/synapse/issues/7322 would happen. This PR checks that the file is correctly parsed into a dict, or ignores it with a warning if it parses into any other type (including `None` for empty files).
Fixes https://github.com/matrix-org/synapse/issues/7322
2020-04-27 15:01:03 +02:00
Patrick Cloke
7bfe0902ce
Add documentation to the sample config about the templates for SSO. ( #7343 )
2020-04-24 15:03:49 -04:00
Patrick Cloke
33bceb7f70
Convert some of the federation handler methods to async/await. ( #7338 )
2020-04-24 14:36:38 -04:00
Richard van der Hoff
69a1ac00b2
Merge pull request #7337 from matrix-org/rav/fix_update_limit_assertion
...
Fix assertions being thrown by the EventsStream update function
2020-04-24 14:00:29 +01:00
Richard van der Hoff
3655eafe85
changelog
2020-04-24 13:59:21 +01:00
Richard van der Hoff
ce428a1abe
Fix EventsStream raising assertions when it falls behind
...
Figuring out how to correctly limit updates from this stream without dropping
entries is far more complicated than just counting the number of rows being
returned. We need to consider each query separately and, if any one query hits
the limit, truncate the results from the others.
I think this also fixes some potentially long-standing bugs where events or
state changes could get missed if we hit the limit on either query.
2020-04-24 13:59:21 +01:00
Patrick Cloke
68384d96fd
Merge branch 'master' into develop
2020-04-23 12:04:50 -04:00
Patrick Cloke
204664d1ad
Merge tag 'v1.12.4'
...
Synapse v1.12.4
Features:
* Always send users their own device updates. (#7160 )
* Add support for handling GET requests for account_data on a worker. (#7311 )
Bugfixes:
* Fix a bug that prevented cross-signing with users on worker-mode synapses. (#7255 )
* Do not treat display names as globs in push rules. (#7271 )
* Fix a bug with cross-signing devices belonging to remote users who did not share a
room with any user on the local homeserver. (#7289 )
2020-04-23 12:03:33 -04:00
Patrick Cloke
ce9b62e13f
1.12.4
2020-04-23 10:59:10 -04:00
Richard van der Hoff
9cbdfb3a2f
Make it clear that the limit for an update_function is a target
2020-04-23 15:45:12 +01:00
Richard van der Hoff
23b28266ac
Remove 'limit' param from get_repl_stream_updates API
...
there doesn't seem to be much point in passing this limit all around, since
both sides agree it's meant to be 100.
2020-04-23 15:44:35 +01:00
Brendan Abolivier
2e3b9a0fcb
Revert "Revert "Merge pull request #7315 from matrix-org/babolivier/request_token""
...
This reverts commit 1adf6a5587 .
2020-04-23 11:23:53 +02:00
Brendan Abolivier
fb825759e3
Merge branch 'master' into develop
2020-04-23 11:23:33 +02:00
Brendan Abolivier
1adf6a5587
Revert "Merge pull request #7315 from matrix-org/babolivier/request_token"
...
This reverts commit 6f4319368b , reversing
changes made to 0d775fcc2d .
2020-04-23 11:23:10 +02:00
Brendan Abolivier
6f4319368b
Merge pull request #7315 from matrix-org/babolivier/request_token
...
Config option to inhibit 3PID errors on /requestToken
2020-04-23 10:38:57 +02:00
Richard van der Hoff
71a1abb8a1
Stop the master relaying USER_SYNC for other workers ( #7318 )
...
Long story short: if we're handling presence on the current worker, we shouldn't be sending USER_SYNC commands over replication.
In an attempt to figure out what is going on here, I ended up refactoring some bits of the presencehandler code, so the first 4 commits here are non-functional refactors to move this code slightly closer to sanity. (There's still plenty to do here :/). Suggest reviewing individual commits.
Fixes (I hope) #7257 .
2020-04-22 22:39:04 +01:00
Brendan Abolivier
69ad7cc13b
Config option to inhibit 3PID errors on /requestToken
...
Adds a request_token_inhibit_errors configuration flag (disabled by
default) which, if enabled, change the behaviour of all /requestToken
endpoints so that they return a 200 and a fake sid if the 3PID was/was
not found associated with an account (depending on the endpoint),
instead of an error.
Co-Authored-By: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2020-04-22 23:38:42 +02:00
Erik Johnston
841c581c40
Fix replication metrics when using redis ( #7325 )
2020-04-22 16:26:19 +01:00
Richard van der Hoff
f16beaa969
Merge tag 'v1.12.4rc1' into develop
...
Synapse 1.12.4rc1 (2020-04-22)
==============================
Features
--------
- Always send users their own device updates. ([\#7160](https://github.com/matrix-org/synapse/issues/7160 ))
- Add support for handling GET requests for `account_data` on a worker. ([\#7311](https://github.com/matrix-org/synapse/issues/7311 ))
Bugfixes
--------
- Fix a bug that prevented cross-signing with users on worker-mode synapses. ([\#7255](https://github.com/matrix-org/synapse/issues/7255 ))
- Do not treat display names as globs in push rules. ([\#7271](https://github.com/matrix-org/synapse/issues/7271 ))
- Fix a bug with cross-signing devices belonging to remote users who did not share a room with any user on the local homeserver. ([\#7289](https://github.com/matrix-org/synapse/issues/7289 ))
2020-04-22 14:54:08 +01:00
Richard van der Hoff
ba0aac5e44
formatting for the changelog
2020-04-22 14:50:51 +01:00
Richard van der Hoff
82d8b1dd1f
Another go at fixing one-word commands ( #7326 )
...
I messed this up last time I tried (#7239 / e13c6c7 ).
2020-04-22 14:34:31 +01:00
Richard van der Hoff
dc8003f921
1.12.4rc1
2020-04-22 14:29:39 +01:00
Richard van der Hoff
83af1079d6
1.12.4rc1
2020-04-22 14:28:23 +01:00
Richard van der Hoff
7c7618c7e3
fix changelog name
2020-04-22 14:01:11 +01:00
Richard van der Hoff
13683a3a22
Extend StreamChangeCache to support multiple entities per stream ID ( #7303 )
...
First some background: StreamChangeCache is used to keep track of what "entities" have
changed since a given stream ID. So for example, we might use it to keep track of when the last
to-device message for a given user was received [1], and hence whether we need to pull any to-device messages from the database on a sync [2].
Now, it turns out that StreamChangeCache didn't support more than one thing being changed at
a given stream_id (this was part of the problem with #7206 ). However, it's entirely valid to send
to-device messages to more than one user at a time.
As it turns out, this did in fact work, because *some* methods of StreamChangeCache coped
ok with having multiple things changing on the same stream ID, and it seems we never actually
use the methods which don't work on the stream change caches where we allow multiple
changes at the same stream ID. But that feels horribly fragile, hence: let's update
StreamChangeCache to properly support this, and add some typing and some more tests while
we're at it.
[1]: https://github.com/matrix-org/synapse/blob/release-v1.12.3/synapse/storage/data_stores/main/deviceinbox.py#L301
[2]: https://github.com/matrix-org/synapse/blob/release-v1.12.3/synapse/storage/data_stores/main/deviceinbox.py#L47-L51
2020-04-22 13:45:40 +01:00
Dirk Klimpel
6b6685db9f
Extend room admin api with additional attributes ( #7225 )
2020-04-22 13:38:41 +01:00
Richard van der Hoff
2aa5bf13c8
Merge branch 'release-v1.12.4' into develop
2020-04-22 13:09:23 +01:00
Erik Johnston
51f7eaf908
Add ability to run replication protocol over redis. ( #7040 )
...
This is configured via the `redis` config options.
2020-04-22 13:07:41 +01:00
Patrick Cloke
51f358e2fe
Do not treat display names as globs for push rules. ( #7271 )
2020-04-22 13:07:12 +01:00
Michael Kaye
5308239d5d
Reduce logging verbosity of URL cache cleanup. ( #7295 )
2020-04-22 07:45:16 -04:00
Andrew Morgan
f89ad3b6df
Query missing cross-signing keys on local sig upload ( #7289 )
2020-04-22 12:29:36 +01:00
Andrew Morgan
ff5604e7f1
import urllib.parse when using urllib.parse.quote ( #7319 )
2020-04-22 12:18:51 +01:00
Michael Kaye
336989a57f
Reduce federation logging on success ( #7321 )
...
Splitting based on the response code means we can avoid double logging here and identical information from line 164 while still logging at info if we don't get a good response and need to retry.
2020-04-22 11:18:18 +01:00
Richard van der Hoff
556566f0b8
Fix changelog file
...
I updated the PR and forgot to update the changelog.
2020-04-21 13:20:16 +01:00
Richard van der Hoff
974c0d726a
Support GET account_data requests on a worker ( #7311 )
2020-04-21 10:46:30 +01:00
Richard van der Hoff
461f01ad43
Merge branch 'release-v1.12.4' into develop
2020-04-20 17:55:39 +01:00
Richard van der Hoff
d41c8f6d4d
Revert "Query missing cross-signing keys on local sig upload"
...
This was incorrectly merged to the release branch before it was ready.
This reverts commit 72fe2affb6 .
2020-04-20 17:54:35 +01:00
Richard van der Hoff
a46ff43319
Merge branch 'release-v1.12.4' into develop
2020-04-20 17:42:27 +01:00
David Baker
40f79f58bf
Always send the user updates to their own device list ( #7160 )
2020-04-20 17:20:38 +01:00
Lars Franke
13917232d5
Fix indention in generated config file ( #7300 )
...
Also adjust sample_config.yaml
Signed-off-by: Lars Franke <frcl@mailbox.org >
2020-04-20 16:51:27 +01:00
Patrick Cloke
f5ea8b48bd
Reject unknown UI auth sessions (instead of silently generating a new one) ( #7268 )
2020-04-20 08:54:42 -04:00
Richard van der Hoff
0f8f02bc39
On catchup, process each row with its own stream id ( #7286 )
...
Other parts of the code (such as the StreamChangeCache) assume that there will
not be multiple changes with the same stream id.
This code was introduced in #7024 , and I hope this fixes #7206 .
2020-04-20 11:43:29 +01:00
Patrick Cloke
054c231e58
Use a template for the SSO success page to allow for customization. ( #7279 )
2020-04-17 13:34:55 -04:00
James
701788a227
Added explicit Python build tools to snap requirements ( #7213 )
...
Signed-off-by: James Hebden <james@ec0.io >
2020-04-17 17:28:00 +01:00
Andrew Morgan
72fe2affb6
Query missing cross-signing keys on local sig upload
...
Add changelog
Save retrieved keys to the db
lint
Fix and de-brittle remote result dict processing
Use query_user_devices instead, assume only master, self_signing key types
Make changelog more useful
Remove very specific exception handling
Wrap get_verify_key_from_cross_signing_key in a try/except
Note that _get_e2e_cross_signing_verify_key can raise a SynapseError
lint
Add comment explaining why this is useful
Only fetch master and self_signing key types
Fix log statements, docstrings
Remove extraneous items from remote query try/except
lint
Factor key retrieval out into a separate function
Send device updates, modeled after SigningKeyEduUpdater._handle_signing_key_updates
Update method docstring
2020-04-17 15:47:49 +01:00
Richard van der Hoff
67ff7b8ba0
Improve type checking in replication.tcp.Stream ( #7291 )
...
The general idea here is to get rid of the type: ignore annotations on all of the current_token and update_function assignments, which would have caught #7290 .
After a bit of experimentation, it seems like the least-awful way to do this is to pass the offending functions in as parameters to the Stream constructor. Unfortunately that means that the concrete implementations no longer have the same constructor signature as Stream itself, which means that it gets hard to correctly annotate STREAMS_MAP.
I've also introduced a couple of new types, to take out some duplication.
2020-04-17 14:49:55 +01:00
nataraj-hates-MS-for-stealing-github
0d775fcc2d
Improve example TURN configuration in documentation ( #7284 )
2020-04-17 08:04:23 -04:00
Tristan Lins
c07fca9e2f
Clarify the comments for media_storage_providers options ( #7272 )
2020-04-17 07:09:33 -04:00
Patrick Cloke
01294e6b3a
Do not treat display names as globs for push rules. ( #7271 )
2020-04-16 10:52:55 -04:00
Richard van der Hoff
d7d42387f5
Fix 'generator object is not subscriptable' error ( #7290 )
...
Some of the query functions return generators rather than lists, so we can't
index into the result. Happily we already have a copy of the results.
(think this was introduced in #7024 )
2020-04-16 14:37:06 +01:00
Patrick Cloke
eed7c5b89e
Convert auth handler to async/await ( #7261 )
2020-04-15 12:40:18 -04:00
Patrick Cloke
17a2433b0d
Add notes to the changelog about an additional SSO template. ( #7259 )
2020-04-15 10:36:33 -04:00
Andrew Morgan
a48138784e
Allow specifying the value of Accept-Language header for URL previews ( #7265 )
2020-04-15 13:35:29 +01:00
Richard van der Hoff
6fb63d6426
Add some warnings and notes about slow upgrade ( #7275 )
...
Fixes #7144 .
2020-04-15 12:40:43 +01:00
Richard van der Hoff
f2049a8d21
Fix a potentially-huge sql query ( #7274 )
...
We could end up looking up tens of thousands of events, which could cause large
amounts of data to be logged to the postgres log.
2020-04-15 10:16:35 +01:00
Zay11Zay
f1097e7720
Fix the parameters of a test fixture ( #7243 )
2020-04-14 15:37:28 -04:00
Andrew Morgan
ac6a84818f
Only register devices edu handler on the master process ( #7255 )
2020-04-14 11:36:24 +01:00
Andrew Morgan
fef82f4e22
Only register devices edu handler on the master process ( #7255 )
2020-04-14 10:09:58 +01:00
Ryan Hovland
4a0dadafbe
Add setting to nginx configuration to allow larger file uploads ( #7251 )
2020-04-13 17:23:36 +01:00
PeerD
f41b742161
Check on room creation if the user is allowed to publish the room to the room directory. ( #7260 )
2020-04-13 07:42:32 -04:00
Matthew Hodgson
118b58f0c9
typos
2020-04-11 20:55:18 +01:00
Andrew Morgan
ac978ab3da
Default PL100 to enable encryption in a room ( #7230 )
2020-04-09 18:45:38 +01:00
Patrick Cloke
b85d7652ff
Do not allow a deactivated user to login via SSO. ( #7240 )
2020-04-09 13:28:13 -04:00
Andrew Morgan
967f99b9f8
Unblacklist /upgrade creates a new room ( #7228 )
...
This commit was originally merged in #7228 but reverted in #7254 as the
associated sytest was not ready yet. Now that it is, we can merge this
again.
2020-04-09 13:53:35 +01:00
Andrew Morgan
a026bdaab7
Add matrix-synapse-shared-secret-auth as an example password provider ( #7248 )
2020-04-09 12:49:05 +01:00
Andrew Morgan
e3cd28d8a4
Revert "Unblacklist /upgrade creates a new room ( #7228 )" ( #7254 )
...
This reverts commit 59f0ca8b87 .
2020-04-09 12:47:16 +01:00
Andrew Morgan
59f0ca8b87
Unblacklist /upgrade creates a new room ( #7228 )
2020-04-09 12:44:48 +01:00
Richard van der Hoff
5a709630bf
Fix --help commandline argument ( #7249 )
...
I don't really remember why this was so complicated; I think it dates
back to the time when we had to instantiate the Config classes before
we could call `add_arguments` - ie before #5597 . In any case, I don't
think there's a good reason for it any more, and the impact of it
being complicated is that `--help` doesn't work correctly.
2020-04-09 12:44:37 +01:00
Andrew Morgan
7f7f9968b3
Make it clearer to the user that they haven't overridden onLogin/Register ( #7237 )
2020-04-09 12:38:38 +01:00
Andrew Morgan
55d46da59a
Upgrade jQuery to 3.x on fallback login/registration screens ( #7236 )
2020-04-09 12:23:30 +01:00
Richard van der Hoff
24722de7c8
Fix bad merge of CHANGES.md
2020-04-08 17:41:46 +01:00
Richard van der Hoff
23f8d285eb
Remove redundant checks on daemonize from synctl ( #7233 )
...
We pass --daemonize on the commandline, which (since at least #4853 ) overrides
whatever the config file, so there is no need for it to be set in the config
file.
2020-04-08 11:59:47 +01:00
Richard van der Hoff
cae4121484
Make systemd-with-workers doc official ( #7234 )
...
Simplify and update this documentation, and make it part of the core dist.
2020-04-08 11:59:26 +01:00
Brendan Abolivier
c11d24d48c
Fix changelog for #7235
2020-04-08 11:59:51 +02:00
Andrew Morgan
29b7e22b93
Add documentation to password_providers config option ( #7238 )
2020-04-08 00:46:50 +01:00
Richard van der Hoff
f31e65a749
bg update to clear out duplicate outbound_device_list_pokes ( #7193 )
...
We seem to have some duplicates, which could do with being cleared out.
2020-04-07 23:06:39 +01:00
Richard van der Hoff
aedeedc206
Merge pull request #7239 from matrix-org/rav/replication_cleanup
...
Miscellaneous cleanups to replication code
2020-04-07 22:00:55 +01:00
Patrick Cloke
1722b8a527
Convert delete_url_cache_media to async/await. ( #7241 )
2020-04-07 21:56:34 +01:00
Patrick Cloke
d78cb31588
Add typing information to federation_server. ( #7219 )
2020-04-07 15:03:23 -04:00
Richard van der Hoff
bd2ea3432b
changelog
2020-04-07 17:44:51 +01:00
Richard van der Hoff
e13c6c7a96
Handle one-word replication commands correctly
...
`REPLICATE` is now a valid command, and it's nice if you can issue it from the
console without remembering to call it `REPLICATE ` with a trailing space.
2020-04-07 17:43:46 +01:00
Richard van der Hoff
c3e4b4edb2
Fix warnings about not calling superclass constructor
...
Separate `SimpleCommand` from `Command`, so that things which don't want to use
the `data` property don't have to, and thus fix the warnings PyCharm was giving
me about not calling `__init__` in the base class.
2020-04-07 17:40:22 +01:00
Richard van der Hoff
6a519a0ca0
Remove vestigal references to SYNC replication command
...
We've ripped pretty much all of this out: let's remove the remains.
2020-04-07 17:40:07 +01:00
Brendan Abolivier
ec5ac8e2b1
Fix typo in the login fallback javascript ( #7235 )
...
* Fix typo in the login fallback javascript
* Changelog
2020-04-07 18:31:50 +02:00
Richard van der Hoff
2e105c156b
Remove sent outbound device list pokes from the database ( #7192 )
...
They just get in the way.
2020-04-07 15:19:19 +01:00
Erik Johnston
ce72355d7f
Fix race in replication ( #7226 )
...
Fixes a race between handling `POSITION` and `RDATA` commands. We do this by simply linearizing handling of them.
2020-04-07 11:01:04 +01:00
Erik Johnston
82498ee901
Move server command handling out of TCP protocol ( #7187 )
...
This completes the merging of server and client command processing.
2020-04-07 10:51:07 +01:00
Patrick Cloke
71953139d1
Add information about .well-known to Debian installation. ( #7227 )
2020-04-06 17:02:44 -04:00
Andrew Morgan
4b0f00ad0c
Remove stream before/after debug log lines ( #7207 )
2020-04-06 12:40:34 +01:00
Andrew Morgan
b21000a44f
Improve error responses when a remote server doesn't allow you to access its public rooms list ( #6899 )
2020-04-06 12:35:30 +01:00
Erik Johnston
5016b162fc
Move client command handling out of TCP protocol ( #7185 )
...
The aim here is to move the command handling out of the TCP protocol classes and to also merge the client and server command handling (so that we can reuse them for redis protocol). This PR simply moves the client paths to the new `ReplicationCommandHandler`, a future PR will move the server paths too.
2020-04-06 09:58:42 +01:00
Brendan Abolivier
d73bf18d13
Server notices: Dissociate room creation/lookup from invite ( #7199 )
...
Fixes #6815
Before figuring out whether we should alert a user on MAU, we call get_notice_room_for_user to get some info on the existing server notices room for this user. This function, if the room doesn't exist, creates it and invites the user in it. This means that, if we decide later that no server notice is needed, the user gets invited in a room with no message in it. This happens at every restart of the server, since the room ID returned by get_notice_room_for_user is cached.
This PR fixes that by moving the inviting bit to a dedicated function, that's only called when the server actually needs to send a notice to the user. A potential issue with this approach is that the room that's created by get_notice_room_for_user doesn't match how that same function looks for an existing room (i.e. it creates a room that doesn't have an invite or a join for the current user in it, so it could lead to a new room being created each time a user syncs), but I'm not sure this is a problem given it's cached until the server restarts, so that function won't run very often.
It also renames get_notice_room_for_user into get_or_create_notice_room_for_user to make what it does clearer.
2020-04-04 17:27:45 +02:00
Patrick Cloke
694d8bed0e
Support CAS in UI Auth flows. ( #7186 )
2020-04-03 15:35:05 -04:00
Martin Milata
b0db928c63
Extend web_client_location to handle absolute URLs ( #7006 )
...
Log warning when filesystem path is used.
Signed-off-by: Martin Milata <martin@martinmilata.cz >
2020-04-03 11:57:34 -04:00
Amber Brown
334bfdbc90
Add some benchmarks for LruCache ( #6446 )
2020-04-03 16:31:52 +01:00
Andrew Morgan
07b88c546d
Convert http.HTTPStatus objects to their int equivalent ( #7188 )
2020-04-03 14:26:07 +01:00
Richard van der Hoff
0f05fd1530
Reduce the number of calls to resource.getrusage ( #7183 )
...
Let's just call `getrusage` once on each logcontext change, rather than twice.
2020-04-03 13:21:30 +01:00
Richard van der Hoff
fd4c975b5b
Merge pull request #7190 from matrix-org/rav/one_bg_update_at_a_time
...
Only run one background update at a time
2020-04-03 13:17:30 +01:00
Richard van der Hoff
bae32740da
Remove some run_in_background calls in replication code ( #7203 )
...
By running this stuff with `run_in_background`, it won't be correctly reported
against the relevant CPU usage stats.
Fixes #7202
2020-04-03 12:29:30 +01:00
Richard van der Hoff
6dd6a3557c
Merge branch 'master' into develop
2020-04-03 11:29:43 +01:00
Richard van der Hoff
0cbb4808ed
Revert "Revert "Merge pull request #7153 from matrix-org/babolivier/sso_whitelist_login_fallback""
...
This reverts commit 0122ef1037 .
2020-04-03 11:28:49 +01:00
Richard van der Hoff
14a8e71297
Revert "Revert "Improve the UX of the login fallback when using SSO ( #7152 )""
...
This reverts commit 8d4cbdeaa9 .
2020-04-03 11:28:43 +01:00
Richard van der Hoff
883ac4b1bb
Merge tag 'v1.12.3'
...
Synapse 1.12.3 (2020-04-03)
===========================
- Remove the the pin to Pillow 7.0 which was introduced in Synapse 1.12.2, and
correctly fix the issue with building the Debian packages. ([\#7212](https://github.com/matrix-org/synapse/issues/7212 ))
2020-04-03 11:25:56 +01:00
Richard van der Hoff
cb40b0cb80
Merge tag 'v1.12.2'
...
Synapse 1.12.2 (2020-04-02)
===========================
This release fixes [an
issue](https://github.com/matrix-org/synapse/issues/7208 ) with building the
debian packages.
No other significant changes since 1.12.1.
2020-04-03 11:25:42 +01:00
Richard van der Hoff
0122ef1037
Revert "Merge pull request #7153 from matrix-org/babolivier/sso_whitelist_login_fallback"
...
This was incorrectly merged to master.
This reverts commit 319c41f573 , reversing
changes made to 229eb81498 .
2020-04-03 11:17:39 +01:00
Richard van der Hoff
8d4cbdeaa9
Revert "Improve the UX of the login fallback when using SSO ( #7152 )"
...
This was incorrectly merged to `master` instead of develop.
This reverts commit 90246344e3 .
2020-04-03 11:16:41 +01:00
Richard van der Hoff
553c8a9b6b
tweak changelog
2020-04-03 11:00:57 +01:00
Richard van der Hoff
29ce90358c
1.12.3
2020-04-03 10:57:07 +01:00
Richard van der Hoff
fcc2de7a0c
Update docstring per review comments
2020-04-03 10:51:32 +01:00
Richard van der Hoff
daa1ac89a0
Fix device list update stream ids going backward ( #7158 )
...
Occasionally we could get a federation device list update transaction which
looked like:
```
[
{'edu_type': 'm.device_list_update', 'content': {'user_id': '@user:test', 'device_id': 'D2', 'prev_id': [], 'stream_id': 12, 'deleted': True}},
{'edu_type': 'm.device_list_update', 'content': {'user_id': '@user:test', 'device_id': 'D1', 'prev_id': [12], 'stream_id': 11, 'deleted': True}},
{'edu_type': 'm.device_list_update', 'content': {'user_id': '@user:test', 'device_id': 'D3', 'prev_id': [11], 'stream_id': 13, 'deleted': True}}
]
```
Having `stream_ids` which are lower than `prev_ids` looks odd. It might work
(I'm not actually sure), but in any case it doesn't seem like a reasonable
thing to expect other implementations to support.
2020-04-03 10:40:22 +01:00
Richard van der Hoff
6d7cec7a57
Fix the debian build in a better way. ( #7212 )
2020-04-03 10:23:36 +01:00
Andrew Morgan
f7d6e849b3
Fix changelog wording
2020-04-02 19:08:06 +01:00
Andrew Morgan
08edefe694
1.12.2
2020-04-02 19:02:45 +01:00
Andrew Morgan
ec56620ff6
Pin Pillow>=4.3.0,<7.1.0 to fix dep issue
2020-04-02 18:58:08 +01:00
Andrew Morgan
b730480abb
1.12.1
2020-04-02 18:57:31 +01:00
Andrew Morgan
61bb834364
Merge branch 'master' into develop
...
* master:
1.12.1
Note where bugs were introduced
1.12.1rc1
Newsfile
Rewrite changelog
Add changelog
Only import sqlite3 when type checking
Fix another instance
Only setdefault for signatures if device has key_json
Fix starting workers when federation sending not split out.
Attempt to clarify Python version requirements (#7161 )
Improve the UX of the login fallback when using SSO (#7152 )
Update the wording of the config comment
Lint
Changelog
Regenerate sample config
Whitelist the login fallback by default for SSO
2020-04-02 16:24:38 +01:00
Andrew Morgan
84a901cf0c
Merge tag 'v1.12.1'
...
Synapse 1.12.1 (2020-04-02)
===========================
No significant changes since 1.12.1rc1.
Synapse 1.12.1rc1 (2020-03-31)
==============================
Bugfixes
--------
- Fix starting workers when federation sending not split out. ([\#7133](https://github.com/matrix-org/synapse/issues/7133 )). Introduced in v1.12.0.
- Avoid importing `sqlite3` when using the postgres backend. Contributed by David Vo. ([\#7155](https://github.com/matrix-org/synapse/issues/7155 )). Introduced in v1.12.0rc1.
- Fix a bug which could cause outbound federation traffic to stop working if a client uploaded an incorrect e2e device signature. ([\#7177](https://github.com/matrix-org/synapse/issues/7177 )). Introduced in v1.11.0.
* tag 'v1.12.1':
1.12.1
Note where bugs were introduced
1.12.1rc1
Newsfile
Rewrite changelog
Add changelog
Only import sqlite3 when type checking
Fix another instance
Only setdefault for signatures if device has key_json
Fix starting workers when federation sending not split out.
2020-04-02 16:20:54 +01:00
Richard van der Hoff
af47264b78
review comment
2020-04-02 12:04:55 +01:00
Andrew Morgan
529462b5c0
1.12.1
2020-04-02 11:32:16 +01:00
Patrick Cloke
b9930d24a0
Support SAML in the user interactive authentication workflow. ( #7102 )
2020-04-01 08:48:00 -04:00
Patrick Cloke
468dcc767b
Allow admins to create aliases when they are not in the room ( #7191 )
2020-04-01 08:27:05 -04:00
siroccal
250f87d0de
Update postgres.md ( #7119 )
2020-04-01 12:44:51 +01:00
Erik Johnston
dfa0782254
Remove connections per replication stream metric. ( #7195 )
...
This broke in a recent PR (#7024 ) and is no longer useful due to all
replication clients implicitly subscribing to all streams, so let's
just remove it.
2020-04-01 10:40:46 +01:00
Richard van der Hoff
b413ab8aa6
changelog
2020-03-31 17:44:36 +01:00
Richard van der Hoff
7b608cf468
Only run one background update at a time
2020-03-31 17:43:58 +01:00
Richard van der Hoff
b4c2234232
Make do_next_background_update return a bool
...
returning a None or an int that we don't use is confusing.
2020-03-31 17:43:58 +01:00
Richard van der Hoff
51f4d52cb4
Set a logging context while running the bg updates
...
This mostly just reduces the amount of "running from sentinel context" spam
during unittest setup.
2020-03-31 17:43:58 +01:00
Richard van der Hoff
26d17b9bdc
Make has_completed_background_updates async
...
(Almost) everywhere that uses it is happy with an awaitable.
2020-03-31 17:43:58 +01:00
Richard van der Hoff
cfe8c8ab8e
Remove unused start_background_update
...
This was only used in a unit test, so let's just inline it in the test.
2020-03-31 17:24:06 +01:00
Jostein Kjønigsen
2e826cd80c
Improve TURN documentation. ( #7167 )
2020-03-31 15:50:48 +01:00
Richard van der Hoff
60adcbed91
Fix "'NoneType' has no attribute start|stop" logcontext errors ( #7181 )
...
Fixes #7179 .
2020-03-31 15:18:41 +01:00
Karlinde
fe1580bfd9
Fill in the 'default' field for user-defined push rules ( #6639 )
...
Signed-off-by: Karl Linderhed <git@karlinde.se >
2020-03-31 15:08:56 +01:00
Andrew Morgan
b994e86e35
Only setdefault for signatures if device has key_json ( #7177 )
2020-03-31 14:51:22 +01:00
Patrick Cloke
0a7b0882c1
Fix use of async/await in media code ( #7184 )
2020-03-31 09:33:02 -04:00
Richard van der Hoff
62a7289133
Fix a bug which could cause incorrect 'cyclic dependency' error. ( #7178 )
...
If there was an exception setting up one of the attributes of the Homeserver
god object, then future attempts to fetch that attribute would raise a
confusing "Cyclic dependency" error. Let's make sure that we clear the
`building` flag so that we just get the original exception.
Ref: #7169
2020-03-31 13:09:16 +01:00
Andrew Morgan
677d0edbac
Note where bugs were introduced
2020-03-31 11:58:48 +01:00
Andrew Morgan
3fb9fc40f5
1.12.1rc1
2020-03-31 11:49:43 +01:00
Erik Johnston
5d99bde788
Newsfile
2020-03-31 11:30:34 +01:00
Andrew Morgan
2cf115f0ea
Rewrite changelog
2020-03-31 11:30:16 +01:00
Andrew Morgan
2cb38ca871
Add changelog
2020-03-31 11:30:05 +01:00
David Vo
5bd2b27525
Only import sqlite3 when type checking
...
Fixes : #7127
Signed-off-by: David Vo <david@vovo.id.au >
2020-03-31 11:27:17 +01:00
Andrew Morgan
b5d0b038f4
Fix another instance
2020-03-31 11:26:37 +01:00
Andrew Morgan
b5ecafd157
Only setdefault for signatures if device has key_json
2020-03-31 11:26:29 +01:00
Erik Johnston
db098ec994
Fix starting workers when federation sending not split out.
2020-03-31 11:25:21 +01:00
Richard van der Hoff
7966a1cde9
Rewrite prune_old_outbound_device_pokes for efficiency ( #7159 )
...
make sure we clear out all but one update for the user
2020-03-30 19:06:52 +01:00
Andrew Morgan
7042840b32
Transfer alias mappings when joining an upgraded room ( #6946 )
2020-03-30 17:53:25 +01:00
Andrew Morgan
d9f29f8dae
Fix a small typo in the metrics_flags config option. ( #7171 )
2020-03-30 17:38:21 +01:00
Erik Johnston
4f21c33be3
Remove usage of "conn_id" for presence. ( #7128 )
...
* Remove `conn_id` usage for UserSyncCommand.
Each tcp replication connection is assigned a "conn_id", which is used
to give an ID to a remotely connected worker. In a redis world, there
will no longer be a one to one mapping between connection and instance,
so instead we need to replace such usages with an ID generated by the
remote instances and included in the replicaiton commands.
This really only effects UserSyncCommand.
* Add CLEAR_USER_SYNCS command that is sent on shutdown.
This should help with the case where a synchrotron gets restarted
gracefully, rather than rely on 5 minute timeout.
2020-03-30 16:37:24 +01:00
David Baker
07569f25d1
Merge pull request #7160 from matrix-org/dbkr/always_send_own_device_list_updates
...
Always send the user updates to their own device list
2020-03-30 14:34:28 +01:00
Andrew Morgan
104844c1e1
Add explanatory comment
2020-03-30 14:00:11 +01:00
Richard van der Hoff
6486c96b65
Merge pull request #7157 from matrix-org/rev.outbound_device_pokes_tests
...
Add tests for outbound device pokes
2020-03-30 13:59:07 +01:00
Richard van der Hoff
e577c5d607
Attempt to clarify Python version requirements ( #7161 )
...
In particular, we depend on `typing.TYPE_CHECKING`, which is only present in
3.5.2.
It turns out that Ubuntu Xenial, despite having a package called `python 3
(3.5.1-3)`, actually has python 3.5.2, so I think this is fine.
2020-03-30 13:55:01 +01:00
Patrick Cloke
c5f89fba55
Add developer documentation for running a local CAS server ( #7147 )
2020-03-30 07:28:42 -04:00
David Baker
7406477525
black
2020-03-30 10:18:33 +01:00
David Baker
9fc588e6dc
Just add own user ID to the list we track device changes for
2020-03-30 10:11:26 +01:00
Richard van der Hoff
b7da598a61
Always whitelist the login fallback for SSO ( #7153 )
...
That fallback sets the redirect URL to itself (so it can process the login
token then return gracefully to the client). This would make it pointless to
ask the user for confirmation, since the URL the confirmation page would be
showing wouldn't be the client's.
2020-03-27 20:24:52 +00:00
Brendan Abolivier
84f7eaed16
Improve the UX of the login fallback when using SSO ( #7152 )
...
* Don't show the login forms if we're currently logging in with a
password or a token.
* Submit directly the SSO login form, showing only a spinner to the
user, in order to eliminate from the clunkiness of SSO through this
fallback.
2020-03-27 20:19:54 +00:00
Dirk Klimpel
fb69690761
Admin API to join users to a room. ( #7051 )
2020-03-27 19:16:43 +00:00
Dirk Klimpel
8327eb9280
Add options to prevent users from changing their profile. ( #7096 )
2020-03-27 19:15:23 +00:00
txt-file
ae219fb411
update debian installation instructions to recommend installing virtualenv instead of python3-virtualenv ( #6892 )
...
* change debian package from python3-virtualenv to virtualenv
The virtualenv package is needed for the virtualenv command. The
virtualenv package depends on python3-virtualenv (at least since
debian jessie) so there is no need to specify python3-virtualenv
additionally.
Signed-off-by: Vieno Hakkerinen <vieno@hakkerinen.eu >
* Add changelog
Co-authored-by: Andrew Morgan <andrew@amorgan.xyz >
2020-03-27 15:02:00 +00:00
Brendan Abolivier
90246344e3
Improve the UX of the login fallback when using SSO ( #7152 )
...
* Don't show the login forms if we're currently logging in with a
password or a token.
* Submit directly the SSO login form, showing only a spinner to the
user, in order to eliminate from the clunkiness of SSO through this
fallback.
2020-03-27 15:44:13 +01:00
Brendan Abolivier
319c41f573
Merge pull request #7153 from matrix-org/babolivier/sso_whitelist_login_fallback
...
Always whitelist the login fallback for SSO
2020-03-27 15:34:41 +01:00
Brendan Abolivier
63aea691a7
Update the wording of the config comment
2020-03-27 15:09:12 +01:00
Andrew Morgan
12aa5a7fa7
Ensure is_verified on /_matrix/client/r0/room_keys/keys is a boolean ( #7150 )
2020-03-27 13:30:22 +00:00
David Vo
fbf0782c63
Only import sqlite3 when type checking ( #7155 )
...
Fixes : #7127
Signed-off-by: David Vo <david@vovo.id.au >
2020-03-27 13:20:00 +00:00
David Baker
16ee97988a
Fix undefined variable & remove debug logging
2020-03-27 12:39:54 +00:00
David Baker
a07e03ce90
black
2020-03-27 12:35:32 +00:00
David Baker
d9965fb8d6
changelog
2020-03-27 12:30:59 +00:00
David Baker
09cc058a4c
Always send the user updates to their own device list
...
This will allow clients to notify users about new devices even if
the user isn't in any rooms (yet).
2020-03-27 12:26:47 +00:00
Richard van der Hoff
665630fcaa
Add tests for outbound device pokes
2020-03-27 12:01:37 +00:00
Jason Robinson
7496d3d2f6
Merge pull request #7151 from matrix-org/jaywink/saml-redirect-fix
...
Allow RedirectResponse in SAML response handler
2020-03-26 22:10:31 +02:00
Patrick Cloke
fa4f12102d
Refactor the CAS code (move the logic out of the REST layer to a handler) ( #7136 )
2020-03-26 15:05:26 -04:00
Jason Robinson
55ca6cf88c
Update changelog.d/7151.bugfix
...
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2020-03-26 20:35:50 +02:00
Brendan Abolivier
bdf3cdaec8
Lint
2020-03-26 19:06:44 +01:00
Brendan Abolivier
48b37f61ce
Changelog
2020-03-26 19:02:59 +01:00
Brendan Abolivier
7083147961
Regenerate sample config
2020-03-26 19:01:54 +01:00
Brendan Abolivier
c2ab0b3066
Whitelist the login fallback by default for SSO
2020-03-26 18:58:58 +01:00
Nektarios Katakis
825fb5d0a5
Don't default to an invalid sqlite config if no database configuration is provided ( #6573 )
2020-03-26 17:13:14 +00:00
Jason Robinson
060e7dce09
Allow RedirectResponse in SAML response handler
...
Allow custom SAML handlers to redirect after processing an auth response.
Fixes #7149
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2020-03-26 19:02:35 +02:00
Dirk Klimpel
e8e2ddb60a
Allow server admins to define and enforce a password policy (MSC2000). ( #7118 )
2020-03-26 16:51:13 +00:00
Patrick Cloke
1c1242acba
Validate that the session is not modified during UI-Auth ( #7068 )
2020-03-26 07:39:34 -04:00
Aaron Raimist
6ca5e56fd1
Remove unused captcha_bypass_secret option ( #7137 )
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2020-03-25 17:49:34 +00:00
Erik Johnston
4cff617df1
Move catchup of replication streams to worker. ( #7024 )
...
This changes the replication protocol so that the server does not send down `RDATA` for rows that happened before the client connected. Instead, the server will send a `POSITION` and clients then query the database (or master out of band) to get up to date.
2020-03-25 14:54:01 +00:00
Andrew Morgan
7bab642707
Various cleanups to INSTALL.md ( #7141 )
2020-03-25 13:56:40 +00:00
Erik Johnston
b1cfaf08af
Merge pull request #7133 from matrix-org/erikj/fix_worker_startup
...
Fix starting workers when federation sending not split out.
2020-03-25 09:42:39 +00:00
Richard van der Hoff
28d9d6e8a9
Remove spurious "name" parameter to default_config
...
this is never set to anything other than "test", and is a source of unnecessary
boilerplate.
2020-03-24 18:33:49 +00:00
Richard van der Hoff
39230d2171
Clean up some LoggingContext stuff ( #7120 )
...
* Pull Sentinel out of LoggingContext
... and drop a few unnecessary references to it
* Factor out LoggingContext.current_context
move `current_context` and `set_context` out to top-level functions.
Mostly this means that I can more easily trace what's actually referring to
LoggingContext, but I think it's generally neater.
* move copy-to-parent into `stop`
this really just makes `start` and `stop` more symetric. It also means that it
behaves correctly if you manually `set_log_context` rather than using the
context manager.
* Replace `LoggingContext.alive` with `finished`
Turn `alive` into `finished` and make it a bit better defined.
2020-03-24 14:45:33 +00:00
Naugrimm
1fcf9c6f95
Fix CAS redirect url ( #6634 )
...
Build the same service URL when requesting the CAS ticket and when calling the proxyValidate URL.
2020-03-24 11:59:04 +00:00
Erik Johnston
d6828c129f
Newsfile
2020-03-24 10:36:44 +00:00
Erik Johnston
c816072d47
Fix starting workers when federation sending not split out.
2020-03-24 10:35:00 +00:00
Patrick Cloke
190ab593b7
Use the proper error code when a canonical alias that does not exist is used. ( #7109 )
2020-03-23 15:21:54 -04:00
Kartikaya Gupta (kats)
e341518f92
Update pre-built package name for FreeBSD ( #7107 ). ( #7107 )
...
Signed-off-by: Kartikaya Gupta <kats@trevize.staktrace.com >
2020-03-23 15:31:02 +00:00
Richard van der Hoff
a564b92d37
Convert *StreamRow classes to inner classes ( #7116 )
...
This just helps keep the rows closer to their streams, so that it's easier to
see what the format of each stream is.
2020-03-23 13:59:11 +00:00
Richard van der Hoff
5126cb1253
Merge branch 'master' into develop
2020-03-23 13:54:29 +00:00
Richard van der Hoff
229eb81498
Merge tag 'v1.12.0'
...
Synapse 1.12.0 (2020-03-23)
===========================
No significant changes since 1.12.0rc1.
Debian packages and Docker images are rebuilt using the latest versions of
dependency libraries, including Twisted 20.3.0. **Please see security advisory
below**.
Security advisory
-----------------
Synapse may be vulnerable to request-smuggling attacks when it is used with a
reverse-proxy. The vulnerabilties are fixed in Twisted 20.3.0, and are
described in
[CVE-2020-10108](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10108 )
and
[CVE-2020-10109](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10109 ).
For a good introduction to this class of request-smuggling attacks, see
https://portswigger.net/research/http-desync-attacks-request-smuggling-reborn .
We are not aware of these vulnerabilities being exploited in the wild, and
do not believe that they are exploitable with current versions of any reverse
proxies. Nevertheless, we recommend that all Synapse administrators ensure that
they have the latest versions of the Twisted library to ensure that their
installation remains secure.
* Administrators using the [`matrix.org` Docker
image](https://hub.docker.com/r/matrixdotorg/synapse/ ) or the [Debian/Ubuntu
packages from
`matrix.org`](https://github.com/matrix-org/synapse/blob/master/INSTALL.md#matrixorg-packages )
should ensure that they have version 1.12.0 installed: these images include
Twisted 20.3.0.
* Administrators who have [installed Synapse from
source](https://github.com/matrix-org/synapse/blob/master/INSTALL.md#installing-from-source )
should upgrade Twisted within their virtualenv by running:
```sh
<path_to_virtualenv>/bin/pip install 'Twisted>=20.3.0'
```
* Administrators who have installed Synapse from distribution packages should
consult the information from their distributions.
The `matrix.org` Synapse instance was not vulnerable to these vulnerabilities.
Advance notice of change to the default `git` branch for Synapse
----------------------------------------------------------------
Currently, the default `git` branch for Synapse is `master`, which tracks the
latest release.
After the release of Synapse 1.13.0, we intend to change this default to
`develop`, which is the development tip. This is more consistent with common
practice and modern `git` usage.
Although we try to keep `develop` in a stable state, there may be occasions
where regressions creep in. Developers and distributors who have scripts which
run builds using the default branch of `Synapse` should therefore consider
pinning their scripts to `master`.
Synapse 1.12.0rc1 (2020-03-19)
==============================
Features
--------
- Changes related to room alias management ([MSC2432](https://github.com/matrix-org/matrix-doc/pull/2432 )):
- Publishing/removing a room from the room directory now requires the user to have a power level capable of modifying the canonical alias, instead of the room aliases. ([\#6965](https://github.com/matrix-org/synapse/issues/6965 ))
- Validate the `alt_aliases` property of canonical alias events. ([\#6971](https://github.com/matrix-org/synapse/issues/6971 ))
- Users with a power level sufficient to modify the canonical alias of a room can now delete room aliases. ([\#6986](https://github.com/matrix-org/synapse/issues/6986 ))
- Implement updated authorization rules and redaction rules for aliases events, from [MSC2261](https://github.com/matrix-org/matrix-doc/pull/2261 ) and [MSC2432](https://github.com/matrix-org/matrix-doc/pull/2432 ). ([\#7037](https://github.com/matrix-org/synapse/issues/7037 ))
- Stop sending m.room.aliases events during room creation and upgrade. ([\#6941](https://github.com/matrix-org/synapse/issues/6941 ))
- Synapse no longer uses room alias events to calculate room names for push notifications. ([\#6966](https://github.com/matrix-org/synapse/issues/6966 ))
- The room list endpoint no longer returns a list of aliases. ([\#6970](https://github.com/matrix-org/synapse/issues/6970 ))
- Remove special handling of aliases events from [MSC2260](https://github.com/matrix-org/matrix-doc/pull/2260 ) added in v1.10.0rc1. ([\#7034](https://github.com/matrix-org/synapse/issues/7034 ))
- Expose the `synctl`, `hash_password` and `generate_config` commands in the snapcraft package. Contributed by @devec0. ([\#6315](https://github.com/matrix-org/synapse/issues/6315 ))
- Check that server_name is correctly set before running database updates. ([\#6982](https://github.com/matrix-org/synapse/issues/6982 ))
- Break down monthly active users by `appservice_id` and emit via Prometheus. ([\#7030](https://github.com/matrix-org/synapse/issues/7030 ))
- Render a configurable and comprehensible error page if something goes wrong during the SAML2 authentication process. ([\#7058](https://github.com/matrix-org/synapse/issues/7058 ), [\#7067](https://github.com/matrix-org/synapse/issues/7067 ))
- Add an optional parameter to control whether other sessions are logged out when a user's password is modified. ([\#7085](https://github.com/matrix-org/synapse/issues/7085 ))
- Add prometheus metrics for the number of active pushers. ([\#7103](https://github.com/matrix-org/synapse/issues/7103 ), [\#7106](https://github.com/matrix-org/synapse/issues/7106 ))
- Improve performance when making HTTPS requests to sygnal, sydent, etc, by sharing the SSL context object between connections. ([\#7094](https://github.com/matrix-org/synapse/issues/7094 ))
Bugfixes
--------
- When a user's profile is updated via the admin API, also generate a displayname/avatar update for that user in each room. ([\#6572](https://github.com/matrix-org/synapse/issues/6572 ))
- Fix a couple of bugs in email configuration handling. ([\#6962](https://github.com/matrix-org/synapse/issues/6962 ))
- Fix an issue affecting worker-based deployments where replication would stop working, necessitating a full restart, after joining a large room. ([\#6967](https://github.com/matrix-org/synapse/issues/6967 ))
- Fix `duplicate key` error which was logged when rejoining a room over federation. ([\#6968](https://github.com/matrix-org/synapse/issues/6968 ))
- Prevent user from setting 'deactivated' to anything other than a bool on the v2 PUT /users Admin API. ([\#6990](https://github.com/matrix-org/synapse/issues/6990 ))
- Fix py35-old CI by using native tox package. ([\#7018](https://github.com/matrix-org/synapse/issues/7018 ))
- Fix a bug causing `org.matrix.dummy_event` to be included in responses from `/sync`. ([\#7035](https://github.com/matrix-org/synapse/issues/7035 ))
- Fix a bug that renders UTF-8 text files incorrectly when loaded from media. Contributed by @TheStranjer. ([\#7044](https://github.com/matrix-org/synapse/issues/7044 ))
- Fix a bug that would cause Synapse to respond with an error about event visibility if a client tried to request the state of a room at a given token. ([\#7066](https://github.com/matrix-org/synapse/issues/7066 ))
- Repair a data-corruption issue which was introduced in Synapse 1.10, and fixed in Synapse 1.11, and which could cause `/sync` to return with 404 errors about missing events and unknown rooms. ([\#7070](https://github.com/matrix-org/synapse/issues/7070 ))
- Fix a bug causing account validity renewal emails to be sent even if the feature is turned off in some cases. ([\#7074](https://github.com/matrix-org/synapse/issues/7074 ))
Improved Documentation
----------------------
- Updated CentOS8 install instructions. Contributed by Richard Kellner. ([\#6925](https://github.com/matrix-org/synapse/issues/6925 ))
- Fix `POSTGRES_INITDB_ARGS` in the `contrib/docker/docker-compose.yml` example docker-compose configuration. ([\#6984](https://github.com/matrix-org/synapse/issues/6984 ))
- Change date in [INSTALL.md](./INSTALL.md#tls-certificates) for last date of getting TLS certificates to November 2019. ([\#7015](https://github.com/matrix-org/synapse/issues/7015 ))
- Document that the fallback auth endpoints must be routed to the same worker node as the register endpoints. ([\#7048](https://github.com/matrix-org/synapse/issues/7048 ))
Deprecations and Removals
-------------------------
- Remove the unused query_auth federation endpoint per [MSC2451](https://github.com/matrix-org/matrix-doc/pull/2451 ). ([\#7026](https://github.com/matrix-org/synapse/issues/7026 ))
Internal Changes
----------------
- Add type hints to `logging/context.py`. ([\#6309](https://github.com/matrix-org/synapse/issues/6309 ))
- Add some clarifications to `README.md` in the database schema directory. ([\#6615](https://github.com/matrix-org/synapse/issues/6615 ))
- Refactoring work in preparation for changing the event redaction algorithm. ([\#6874](https://github.com/matrix-org/synapse/issues/6874 ), [\#6875](https://github.com/matrix-org/synapse/issues/6875 ), [\#6983](https://github.com/matrix-org/synapse/issues/6983 ), [\#7003](https://github.com/matrix-org/synapse/issues/7003 ))
- Improve performance of v2 state resolution for large rooms. ([\#6952](https://github.com/matrix-org/synapse/issues/6952 ), [\#7095](https://github.com/matrix-org/synapse/issues/7095 ))
- Reduce time spent doing GC, by freezing objects on startup. ([\#6953](https://github.com/matrix-org/synapse/issues/6953 ))
- Minor perfermance fixes to `get_auth_chain_ids`. ([\#6954](https://github.com/matrix-org/synapse/issues/6954 ))
- Don't record remote cross-signing keys in the `devices` table. ([\#6956](https://github.com/matrix-org/synapse/issues/6956 ))
- Use flake8-comprehensions to enforce good hygiene of list/set/dict comprehensions. ([\#6957](https://github.com/matrix-org/synapse/issues/6957 ))
- Merge worker apps together. ([\#6964](https://github.com/matrix-org/synapse/issues/6964 ), [\#7002](https://github.com/matrix-org/synapse/issues/7002 ), [\#7055](https://github.com/matrix-org/synapse/issues/7055 ), [\#7104](https://github.com/matrix-org/synapse/issues/7104 ))
- Remove redundant `store_room` call from `FederationHandler._process_received_pdu`. ([\#6979](https://github.com/matrix-org/synapse/issues/6979 ))
- Update warning for incorrect database collation/ctype to include link to documentation. ([\#6985](https://github.com/matrix-org/synapse/issues/6985 ))
- Add some type annotations to the database storage classes. ([\#6987](https://github.com/matrix-org/synapse/issues/6987 ))
- Port `synapse.handlers.presence` to async/await. ([\#6991](https://github.com/matrix-org/synapse/issues/6991 ), [\#7019](https://github.com/matrix-org/synapse/issues/7019 ))
- Add some type annotations to the federation base & client classes. ([\#6995](https://github.com/matrix-org/synapse/issues/6995 ))
- Port `synapse.rest.keys` to async/await. ([\#7020](https://github.com/matrix-org/synapse/issues/7020 ))
- Add a type check to `is_verified` when processing room keys. ([\#7045](https://github.com/matrix-org/synapse/issues/7045 ))
- Add type annotations and comments to the auth handler. ([\#7063](https://github.com/matrix-org/synapse/issues/7063 ))
2020-03-23 13:54:17 +00:00
Richard van der Hoff
88bb6c27e1
matrix.org was fine
2020-03-23 13:38:30 +00:00
Neil Johnson
066804f591
Update CHANGES.md
2020-03-23 13:36:16 +00:00
Richard van der Hoff
56b5f1d0ee
changelog typos
2020-03-23 13:23:21 +00:00
Richard van der Hoff
a438950a00
1.12.0 changelog
2020-03-23 13:00:40 +00:00
Richard van der Hoff
2fa55c0cc6
1.12.0
2020-03-23 12:13:09 +00:00
Richard van der Hoff
b3cee0ce67
Fix processing of groups stream, and use symbolic names for streams ( #7117 )
...
`groups` != `receipts`
Introduced in #6964
2020-03-23 11:39:36 +00:00
Dionysis Grigoropoulos
96071eea8f
Set Referrer-Policy to no-referrer for media ( #7009 )
2020-03-23 09:48:28 +00:00
Patrick Cloke
477c4f5b1c
Clean-up some auth/login REST code ( #7115 )
2020-03-20 16:22:47 -04:00
Richard van der Hoff
c165c1233b
Improve database configuration docs ( #6988 )
...
Attempts to clarify the sample config for databases, and add some stuff about
tcp keepalives to `postgres.md`.
2020-03-20 15:24:22 +00:00
Erik Johnston
fdb1344716
Remove concept of a non-limited stream. ( #7011 )
2020-03-20 14:40:47 +00:00
Patrick Cloke
caec7d4fa0
Convert some of the media REST code to async/await ( #7110 )
2020-03-20 07:20:02 -04:00
Patrick Cloke
c2db6599c8
Fix a bug in the federation API which could cause occasional "Failed to get PDU" errors ( #7089 ).
2020-03-19 08:22:56 -04:00
Erik Johnston
a319cb1dd1
Change device list streams to have one row per ID ( #7010 )
...
* Add 'device_lists_outbound_pokes' as extra table.
This makes sure we check all the relevant tables to get the current max
stream ID.
Currently not doing so isn't problematic as the max stream ID in
`device_lists_outbound_pokes` is the same as in `device_lists_stream`,
however that will change.
* Change device lists stream to have one row per id.
This will make it possible to process the streams more incrementally,
avoiding having to process large chunks at once.
* Change device list replication to match new semantics.
Instead of sending down batches of user ID/host tuples, send down a row
per entity (user ID or host).
* Newsfile
* Remove handling of multiple rows per ID
* Fix worker handling
* Comments from review
2020-03-19 11:36:53 +00:00
Richard van der Hoff
c8c926f9c9
more changelog
2020-03-19 11:26:51 +00:00
Richard van der Hoff
163f23785a
changelog fixes
2020-03-19 11:25:32 +00:00
Richard van der Hoff
5aa6dff99e
fix typo
2020-03-19 11:15:48 +00:00
Richard van der Hoff
e43e78b985
1.12.0rc1
2020-03-19 11:07:16 +00:00
Richard van der Hoff
782b811789
update grafana dashboard
2020-03-19 10:45:40 +00:00
Richard van der Hoff
e913823a22
Fix concurrent modification errors in pusher metrics ( #7106 )
...
add a lock to try to make this metric actually work
2020-03-19 10:28:49 +00:00
Richard van der Hoff
8c75667ad7
Add prometheus metrics for the number of active pushers ( #7103 )
2020-03-19 10:00:24 +00:00
Richard van der Hoff
443162e577
Move pusherpool startup into _base.setup ( #7104 )
...
This should be safe to do on all workers/masters because it is guarded by
a config option which will ensure it is only actually done on the worker
assigned as a pusher.
2020-03-19 09:48:45 +00:00
Erik Johnston
4a17a647a9
Improve get auth chain difference algorithm. ( #7095 )
...
It was originally implemented by pulling the full auth chain of all
state sets out of the database and doing set comparison. However, that
can take a lot work if the state and auth chains are large.
Instead, lets try and fetch the auth chains at the same time and
calculate the difference on the fly, allowing us to bail early if all
the auth chains converge. Assuming that the auth chains do converge more
often than not, this should improve performance. Hopefully.
2020-03-18 16:46:41 +00:00
Patrick Cloke
88b41986db
Add an option to the set password API to choose whether to logout other devices. ( #7085 )
2020-03-18 07:50:00 -04:00
Erik Johnston
6e6476ef07
Comments from review
2020-03-18 10:13:55 +00:00
Richard von Kellner
6d110ddea4
Update INSTALL.md updated CentOS8 install instructions ( #6925 )
2020-03-17 21:48:23 +00:00
Richard van der Hoff
c37db0211e
Share SSL contexts for non-federation requests ( #7094 )
...
Extends #5794 etc to the SimpleHttpClient so that it also applies to non-federation requests.
Fixes #7092 .
2020-03-17 21:32:25 +00:00
Richard van der Hoff
4ce50519cd
Update postgres.md
...
fix broken link
2020-03-17 18:08:43 +00:00
The Stranjer
5e477c1deb
Set charset to utf-8 when adding headers for certain text content types ( #7044 )
...
Fixes #7043
2020-03-17 13:29:09 +00:00
Patrick Cloke
7581d30e9f
Remove unused federation endpoint (query_auth) ( #7026 )
2020-03-17 08:04:49 -04:00
Patrick Cloke
60724c46b7
Remove special casing of m.room.aliases events ( #7034 )
2020-03-17 07:37:04 -04:00
Richard van der Hoff
6a35046363
Revert "Add options to disable setting profile info for prevent changes. ( #7053 )"
...
This reverts commit 54dd28621b , reversing
changes made to 6640460d05 .
2020-03-17 11:25:01 +00:00
Brendan Abolivier
7df04ca0e6
Populate the room version from state events ( #7070 )
...
Fixes #7065
This is basically the same as https://github.com/matrix-org/synapse/pull/6847 except it tries to populate events from `state_events` rather than `current_state_events`, since the latter might have been cleared from the state of some rooms too early, leaving them with a `NULL` room version.
2020-03-16 22:31:47 +00:00
Brendan Abolivier
beb19cf61a
Fix buggy condition in account validity handler ( #7074 )
2020-03-16 12:16:30 +00:00
Brendan Abolivier
d8d91983bc
Merge pull request #7067 from matrix-org/babolivier/saml_error_moar
...
Move the default SAML2 error HTML to a dedicated file
2020-03-13 19:53:19 +00:00
Brendan Abolivier
ebfcbbff9c
Use innerText instead of innerHTML
2020-03-13 19:09:22 +00:00
Patrick Cloke
77d0a4507b
Add type annotations and comments to auth handler ( #7063 )
2020-03-12 11:36:27 -04:00
Brendan Abolivier
0de9f9486a
Lint
2020-03-11 20:39:18 +00:00
Brendan Abolivier
f9e98176bf
Put the file in the templates directory
2020-03-11 20:31:42 +00:00
Brendan Abolivier
bd5e555b0d
Merge pull request #7066 from matrix-org/babolivier/dummy_events_state
...
Skip the correct visibility checks when checking the visibility of the state at a given event
2020-03-11 20:07:58 +00:00
Brendan Abolivier
900bca9707
Update wording and config
2020-03-11 19:40:30 +00:00
Brendan Abolivier
e55a240681
Changelog
2020-03-11 19:37:04 +00:00
Brendan Abolivier
b8cfe79ffc
Move the default SAML2 error HTML to a dedicated file
...
Also add some JS to it to process any error we might have in the URI
(see #6893 ).
2020-03-11 19:33:16 +00:00
Brendan Abolivier
8120a238a4
Refactor a bit
2020-03-11 18:49:41 +00:00
Brendan Abolivier
37a9873f63
Also don't fail on aliases events in this case
2020-03-11 18:43:41 +00:00
Brendan Abolivier
e38c44b418
Lint
2020-03-11 18:06:07 +00:00
Brendan Abolivier
1cde4cf3f1
Changelog
2020-03-11 18:03:56 +00:00
Brendan Abolivier
2dce68c651
Also don't filter out events sent by ignored users when checking state visibility
2020-03-11 17:53:22 +00:00
Brendan Abolivier
9c0775e86a
Fix condition
2020-03-11 17:53:18 +00:00
Brendan Abolivier
69ce55c510
Don't filter out dummy events when we're checking the visibility of state
2020-03-11 17:52:54 +00:00
Brendan Abolivier
54dd28621b
Add options to disable setting profile info for prevent changes. ( #7053 )
2020-03-10 22:23:01 +00:00
Dirk Klimpel
751d51dd12
Update sample_config.yaml
2020-03-10 21:41:25 +01:00
Dirk Klimpel
42ac4ca477
Update synapse/config/registration.py
...
Co-Authored-By: Brendan Abolivier <github@brendanabolivier.com >
2020-03-10 21:26:55 +01:00
Brendan Abolivier
6640460d05
Merge pull request #7058 from matrix-org/babolivier/saml_error_html
...
SAML2: render a comprehensible error page if something goes wrong
2020-03-10 18:42:15 +00:00
Brendan Abolivier
8f826f98ac
Rephrase default message
2020-03-10 17:22:45 +00:00
Brendan Abolivier
dc6fb56c5f
Hopefully mypy is happy now
2020-03-10 14:40:28 +00:00
Brendan Abolivier
fe593ef990
Attempt at appeasing the gods of mypy
2020-03-10 14:19:06 +00:00
Brendan Abolivier
5ec2077bf9
Lint
2020-03-10 14:04:20 +00:00
Brendan Abolivier
156f271867
Changelog
2020-03-10 14:01:24 +00:00
Brendan Abolivier
51c094c4ac
Update sample config
2020-03-10 14:00:29 +00:00
Brendan Abolivier
6b0efe73e2
SAML2: render a comprehensible error page if something goes wrong
...
If an error happened while processing a SAML AuthN response, or a client
ends up doing a `GET` request to `/authn_response`, then render a
customisable error page rather than a confusing error.
2020-03-10 13:59:22 +00:00
dklimpel
39f6595b4a
lint, fix tests
2020-03-09 22:13:20 +01:00
dklimpel
885134529f
updates after review
2020-03-09 22:09:29 +01:00
dklimpel
7e5f40e771
fix tests
2020-03-09 21:00:36 +01:00
dklimpel
50ea178c20
lint
2020-03-09 19:57:04 +01:00
dklimpel
04f4b5f6f8
add tests
2020-03-09 19:51:31 +01:00
Brendan Abolivier
14b2ebe767
Merge pull request #7055 from matrix-org/babolivier/get_time_of_last_push_action_before
...
Move get_time_of_last_push_action_before to the EventPushActionsWorkerStore
2020-03-09 14:53:50 +00:00
Brendan Abolivier
f9e3a3f4d0
Changelog
...
It's the same as in #6964 since it's the most likely cause of the bug
and that change hasn't been released yet.
2020-03-09 14:21:01 +00:00
Brendan Abolivier
aee2bae952
Fix undefined room_id in make_summary_text
...
This would break notifications about un-named rooms when processing
notifications in a batch.
2020-03-09 14:10:19 +00:00
Brendan Abolivier
87c65576e0
Move get_time_of_last_push_action_before to the EventPushActionsWorkerStore
...
Fixes #7054
I also had a look at the rest of the functions in
`EventPushActionsStore` and in the push notifications send code and it
looks to me like there shouldn't be any other method with this issue in
this part of the codebase.
2020-03-09 13:58:38 +00:00
Patrick Cloke
06eb5cae08
Remove special auth and redaction rules for aliases events in experimental room ver. ( #7037 )
2020-03-09 08:58:25 -04:00
Patrick Cloke
66315d862f
Update routing of fallback auth in the worker docs. ( #7048 )
2020-03-09 07:19:24 -04:00
Brendan Abolivier
bbf725e7da
Merge pull request #7045 from matrix-org/babolivier/room_keys_check
...
Make sure that is_verified is a boolean when processing room keys
2020-03-09 09:54:48 +00:00
dklimpel
99bbe177b6
add disable_3pid_changes
2020-03-08 21:58:12 +01:00
dklimpel
20545a2199
lint2
2020-03-08 15:28:00 +01:00
dklimpel
ce460dc31c
lint
2020-03-08 15:22:43 +01:00
dklimpel
fb078f921b
changelog
2020-03-08 15:19:07 +01:00
dklimpel
1f5f3ae8b1
Add options to disable setting profile info for prevent changes.
2020-03-08 14:49:33 +01:00
Neil Pilgrim
2bff4457d9
Add type hints to logging/context.py ( #6309 )
...
* Add type hints to logging/context.py
Signed-off-by: neiljp (Neil Pilgrim) <github@kepier.clara.net >
2020-03-07 17:57:26 +00:00
Neil Johnson
1d66dce83e
Break down monthly active users by appservice_id ( #7030 )
...
* Break down monthly active users by appservice_id and emit via prometheus.
Co-authored-by: Brendan Abolivier <babolivier@matrix.org >
2020-03-06 18:14:19 +00:00
Brendan Abolivier
54b78a0e3b
Lint
2020-03-06 15:11:13 +00:00
Brendan Abolivier
297aaf4816
Mention the session ID in the error message
2020-03-06 15:07:41 +00:00
Brendan Abolivier
45df9d35a9
Lint
2020-03-06 11:10:52 +00:00
Brendan Abolivier
a27056d539
Changelog
2020-03-06 11:06:47 +00:00
Brendan Abolivier
80e580ae92
Make sure that is_verified is a boolean when processing room keys
2020-03-06 11:05:00 +00:00
Patrick Cloke
87972f07e5
Convert remote key resource REST layer to async/await. ( #7020 )
2020-03-05 11:29:56 -05:00
Richard van der Hoff
78a15b1f9d
Store room_versions in EventBase objects ( #6875 )
...
This is a bit fiddly because it all has to be done on one fell swoop:
* Wherever we create a new event, pass in the room version (and check it matches the format version)
* When we prune an event, use the room version of the unpruned event to create the pruned version.
* When we pass an event over the replication protocol, pass the room version over alongside it, and use it when deserialising the event again.
2020-03-05 15:46:44 +00:00
Brendan Abolivier
fe678a0900
Merge pull request #7035 from matrix-org/babolivier/hide_dummy_events
...
Hide extremities dummy events from clients
2020-03-05 10:51:19 +00:00
Brendan Abolivier
83b6c69d3d
Changelog
2020-03-04 17:29:09 +00:00
Brendan Abolivier
31a2116331
Hide extremities dummy events from clients
2020-03-04 17:28:13 +00:00
Patrick Cloke
13892776ef
Allow deleting an alias if the user has sufficient power level ( #6986 )
2020-03-04 11:30:46 -05:00
Richard van der Hoff
8ef8fb2c1c
Read the room version from database when fetching events ( #6874 )
...
This is a precursor to giving EventBase objects the knowledge of which room version they belong to.
2020-03-04 13:11:04 +00:00
Brendan Abolivier
43f874055d
Merge branch 'master' into develop
2020-03-03 15:20:49 +00:00
Brendan Abolivier
6b0ef34706
Update debian changelog
2020-03-03 15:01:43 +00:00
Brendan Abolivier
fe6ab0439d
Merge branch 'babolivier/v1.11.1-changelog' into 'release-v1.11.1'
...
v1.11.1
See merge request new-vector/synapse!6
2020-03-03 14:58:37 +00:00
Brendan Abolivier
fd983fad96
v1.11.1
2020-03-03 14:58:37 +00:00
Patrick Cloke
7dcbc33a1b
Validate the alt_aliases property of canonical alias events ( #6971 )
2020-03-03 07:12:45 -05:00
Brendan Abolivier
6a8880b9c3
Merge branch 'babolivier/complete_sso_login_saml' into 'release-v1.11.1'
...
Fix wrong handler being used in SAML handler
See merge request new-vector/synapse!5
2020-03-03 11:29:07 +00:00
Brendan Abolivier
a0178df104
Fix wrong handler being used in SAML handler
2020-03-03 11:29:07 +00:00
Brendan Abolivier
6f67a8b570
Merge branch 'babolivier/sso_module_api' into 'release-v1.11.1'
...
Factor out complete_sso_login and expose it to the Module API
See merge request new-vector/synapse!4
2020-03-03 10:54:44 +00:00
Brendan Abolivier
65c73cdfec
Factor out complete_sso_login and expose it to the Module API
2020-03-03 10:54:44 +00:00
Richard van der Hoff
809e8567f6
Merge branch 'rav/sso-confirm-whitelist' into 'release-v1.11.1'
...
Add a whitelist for the SSO confirmation step.
See merge request new-vector/synapse!3
2020-03-02 17:05:09 +00:00
Richard van der Hoff
b68041df3d
Add a whitelist for the SSO confirmation step.
2020-03-02 17:05:09 +00:00
Erik Johnston
65a941d1f8
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/fixup_devices_stream
2020-03-02 16:55:55 +00:00
Erik Johnston
b29474e0aa
Always return a deferred from get_current_state_deltas. ( #7019 )
...
This currently causes presence notify code to log exceptions when there
is no state changes to process. This doesn't actually cause any problems
as we'd simply do nothing anyway.
2020-03-02 16:52:15 +00:00
Richard van der Hoff
27d099edd6
Merge remote-tracking branch 'origin/release-v1.11.1' into release-v1.11.1
2020-03-02 16:43:33 +00:00
Brendan Abolivier
2e7fad87d4
Merge branch 'anoabolivier/sso-confirm' into 'release-v1.11.1'
...
Add a confirmation step to the SSO login flow
See merge request new-vector/synapse!2
2020-03-02 16:36:32 +00:00
Brendan Abolivier
b2bd54a2e3
Add a confirmation step to the SSO login flow
2020-03-02 16:36:32 +00:00
Erik Johnston
3ab8e9c293
Fix py35-old CI by using native tox. ( #7018 )
...
I'm not really sure how this was going wrong, but this seems like the
right approach anyway.
2020-03-02 16:17:11 +00:00
Richard van der Hoff
174aaa1d62
remove spurious changelog
2020-03-02 14:53:56 +00:00
Richard van der Hoff
036c6cea07
Merge branch 'release-v1.11.1' into develop
2020-03-02 14:53:10 +00:00
Dirk Klimpel
bbeee33d63
Fixed set a user as an admin with the new API ( #6928 )
...
Fix #6910
2020-03-02 13:28:50 +00:00
Erik Johnston
e53744c737
Fix worker handling
2020-03-02 12:52:28 +00:00
Matthew Hodgson
cc7ab0d84a
rst->md
2020-03-01 21:21:36 +00:00
Uday Bansal
e4ffb14d57
Fix last date for ACMEv1 install ( #7015 )
...
Support for getting TLS certificates through ACMEv1 ended on November 2019.
Signed-off-by: Uday Bansal <43824981+udaybansal19@users.noreply.github.com >
2020-02-29 23:37:23 +00:00
Sandro
d96ac97d29
Fix mounting of homeserver.yaml when it does not exist on host ( #6913 )
...
Signed-off-by: Sandro Jäckel <sandro.jaeckel@gmail.com >
2020-02-29 23:32:26 +00:00
Patrick Cloke
12d4259000
Add some type annotations to the federation base & client classes ( #6995 )
2020-02-28 07:31:07 -05:00
Erik Johnston
f70f44abc7
Remove handling of multiple rows per ID
2020-02-28 11:45:35 +00:00
Erik Johnston
59ad93d2a4
Newsfile
2020-02-28 11:27:37 +00:00
Erik Johnston
9ce4e344a8
Change device list replication to match new semantics.
...
Instead of sending down batches of user ID/host tuples, send down a row
per entity (user ID or host).
2020-02-28 11:25:34 +00:00
Erik Johnston
f5caa1864e
Change device lists stream to have one row per id.
...
This will make it possible to process the streams more incrementally,
avoiding having to process large chunks at once.
2020-02-28 11:21:25 +00:00
Erik Johnston
c3c6c0e622
Add 'device_lists_outbound_pokes' as extra table.
...
This makes sure we check all the relevant tables to get the current max
stream ID.
Currently not doing so isn't problematic as the max stream ID in
`device_lists_outbound_pokes` is the same as in `device_lists_stream`,
however that will change.
2020-02-28 11:15:11 +00:00
Dirk Klimpel
9b06d8f8a6
Fixed set a user as an admin with the new API ( #6928 )
...
Fix #6910
2020-02-28 09:58:05 +00:00
Patrick Cloke
ab0073a6c0
Merge remote-tracking branch 'origin/release-v1.11.1' into develop
2020-02-27 13:47:44 -05:00
Erik Johnston
2201bc9795
Don't refuse to start worker if media listener configured. ( #7002 )
...
Instead lets just warn if the worker has a media listener configured but
has the media repository disabled.
Previously non media repository workers would just ignore the media
listener.
2020-02-27 16:33:21 +00:00
Richard van der Hoff
cab4a52535
set worker_app for frontend proxy test ( #7003 )
...
to stop the federationhandler trying to do master stuff
2020-02-27 13:08:43 +00:00
James
b32ac60c22
Expose common commands via snap run interface to allow easier invocation ( #6315 )
...
Signed-off-by: James Hebden <james@ec0.io >
2020-02-27 12:47:40 +00:00
Richard van der Hoff
132b673dbe
Add some type annotations in synapse.storage ( #6987 )
...
I cracked, and added some type definitions in synapse.storage.
2020-02-27 11:53:40 +00:00
Richard van der Hoff
3e99528f2b
Store room version on invite ( #6983 )
...
When we get an invite over federation, store the room version in the rooms table.
The general idea here is that, when we pull the invite out again, we'll want to know what room_version it belongs to (so that we can later redact it if need be). So we need to store it somewhere...
2020-02-26 16:58:33 +00:00
Patrick Cloke
380122866f
Cast a coroutine into a Deferred in the federation base ( #6996 )
...
Properly convert a coroutine into a Deferred in federation_base to fix an error when joining a room.
2020-02-26 11:32:13 -05:00
Erik Johnston
1f773eec91
Port PresenceHandler to async/await ( #6991 )
2020-02-26 15:33:26 +00:00
Uday Bansal
7728d87fd7
Updated warning for incorrect database collation/ctype ( #6985 )
...
Signed-off-by: Uday Bansal <43824981+udaybansal19@users.noreply.github.com >
2020-02-26 15:17:03 +00:00
Andrew Morgan
8c75b621bf
Ensure 'deactivated' parameter is a boolean on user admin API, Fix error handling of call to deactivate user ( #6990 )
2020-02-26 12:22:55 +00:00
Richard van der Hoff
c1156d3e2b
Sanity-check database before running upgrades ( #6982 )
...
Some of the database deltas rely on `config.server_name` being set correctly,
so we should check that it is before running the deltas.
Fixes #6870 .
2020-02-25 17:46:34 +00:00
Richard van der Hoff
e66f099ca9
Sanity-check database before running upgrades ( #6982 )
...
Some of the database deltas rely on `config.server_name` being set correctly,
so we should check that it is before running the deltas.
Fixes #6870 .
2020-02-25 17:46:00 +00:00
Erik Johnston
bbf8886a05
Merge worker apps into one. ( #6964 )
2020-02-25 16:56:55 +00:00
Fridtjof Mund
4aea0bd292
contrib/docker: remove quotes for POSTGRES_INITDB_ARGS ( #6984 )
...
I made a mistake in https://github.com/matrix-org/synapse/pull/6921 - the quotes break the postgres container's startup script (or docker-compose), which makes initdb fail: https://github.com/matrix-org/synapse/pull/6921#issuecomment-590657154
Signed-off-by: Fridtjof Mund <fridtjof@das-labor.org >
2020-02-25 10:48:13 +00:00
Richard van der Hoff
691659568f
Remove redundant store_room call ( #6979 )
...
`_process_received_pdu` is only called by `on_receive_pdu`, which ignores any
events for unknown rooms, so this is redundant.
2020-02-24 17:20:44 +00:00
Richard van der Hoff
a301934f46
Upsert room version when we join over federation ( #6968 )
...
This is intended as a precursor to storing room versions when we receive an
invite over federation, but has the happy side-effect of fixing #3374 at last.
In short: change the store_room with try/except to a proper upsert which
updates the right columns.
2020-02-24 15:46:41 +00:00
Richard van der Hoff
4c2ed3f20e
Fix minor issues with email config ( #6962 )
...
* Give `notif_template_html`, `notif_template_text` default values (fixes #6960 )
* Don't complain if `smtp_host` and `smtp_port` are unset, since they have sensible defaults (fixes #6961 )
* Set the example for `enable_notifs` to `True`, for consistency and because it's more useful
* Raise errors as ConfigError rather than RuntimeError for nicer formatting
2020-02-24 15:18:38 +00:00
Patrick Cloke
af6c389501
No longer use room alias events to calculate room names for push notifications. ( #6966 )
2020-02-21 12:50:48 -05:00
Dirk Klimpel
7b0e2d961c
Change displayname of user as admin in rooms ( #6876 )
2020-02-21 17:44:03 +00:00
Patrick Cloke
fcf4599488
Stop returning aliases as part of the room list. ( #6970 )
2020-02-21 12:40:23 -05:00
Patrick Cloke
7936d2a96e
Publishing/removing from the directory requires a power level greater than canonical aliases.
2020-02-21 07:18:33 -05:00
Patrick Cloke
509e381afa
Clarify list/set/dict/tuple comprehensions and enforce via flake8 ( #6957 )
...
Ensure good comprehension hygiene using flake8-comprehensions.
2020-02-21 07:15:07 -05:00
Richard van der Hoff
272eee1ae1
Merge pull request #6967 from matrix-org/rav/increase_max_events_behind
...
Increase MAX_EVENTS_BEHIND for replication clients
2020-02-21 10:17:28 +00:00
Richard van der Hoff
4f7e4fc2fb
Merge branch 'master' into develop
2020-02-21 09:37:03 +00:00
Richard van der Hoff
1fcb9a1a7a
changelog
2020-02-21 09:06:18 +00:00
Erik Johnston
0bd8cf435e
Increase MAX_EVENTS_BEHIND for replication clients
2020-02-21 09:04:33 +00:00
Richard van der Hoff
9c1b83b007
1.11.0
2020-02-21 08:56:04 +00:00
Andrew Morgan
8f6d9c4cf0
Small grammar fixes to the ACME v1 deprecation notice ( #6944 )
...
Some small fixes to the copy in #6907 .
2020-02-21 08:53:01 +00:00
Patrick Cloke
99eed85a77
Do not send alias events when creating / upgrading a room ( #6941 )
...
Stop emitting room alias update events during room creation/upgrade.
2020-02-20 16:24:04 -05:00
Hubert Chathi
a90d0dc5c2
don't insert into the device table for remote cross-signing keys ( #6956 )
2020-02-20 09:59:00 -05:00
Ruben Barkow-Kuder
4fb5f4d0ce
Add some clarifications to README.md in the database schema directory. ( #6615 )
...
Signed-off-by: Ruben Barkow-Kuder <github@r.z11.de >
2020-02-20 10:37:57 +00:00
Erik Johnston
7b7c3cedf2
Minor perf fixes to get_auth_chain_ids.
2020-02-19 15:47:11 +00:00
Erik Johnston
fc87d2ffb3
Freeze allocated objects on startup. ( #6953 )
...
This may make gc go a bit faster as the gc will know things like
caches/data stores etc. are frozen without having to check.
2020-02-19 15:09:00 +00:00
Erik Johnston
2b37eabca1
Reduce auth chains fetched during v2 state res. ( #6952 )
...
The state res v2 algorithm only cares about the difference between auth
chains, so we can pass in the known common state to the `get_auth_chain`
storage function so that it can ignore those events.
2020-02-19 15:04:47 +00:00
Richard van der Hoff
0001e8397e
update changes.md
2020-02-19 13:54:05 +00:00
Richard van der Hoff
197b08de35
1.11.0rc1
2020-02-19 13:48:32 +00:00
Erik Johnston
099c96b89b
Revert get_auth_chain_ids changes ( #6951 )
2020-02-19 11:37:35 +00:00
Richard van der Hoff
2fb7794e60
Merge pull request #6949 from matrix-org/rav/list_room_aliases_peekable
...
Make room alias lists peekable
2020-02-19 11:19:11 +00:00
Brendan Abolivier
bbe39f808c
Merge pull request #6940 from matrix-org/babolivier/federate.md
...
Clean up and update federation docs
2020-02-19 10:58:59 +00:00
Richard van der Hoff
880aaac1d8
Move MSC2432 stuff onto unstable prefix ( #6948 )
...
it's not in the spec yet, so needs to be unstable. Also add a feature flag for it. Also add a test for admin users.
2020-02-19 10:40:27 +00:00
Richard van der Hoff
abf1e5c526
Tiny optimisation for _get_handler_for_request ( #6950 )
...
we have hundreds of path_regexes (see #5118 ), so let's not convert the same
bytes to str for each of them.
2020-02-19 10:38:20 +00:00
Erik Johnston
0d0bc35792
Increase DB/CPU perf of _is_server_still_joined check. ( #6936 )
...
* Increase DB/CPU perf of `_is_server_still_joined` check.
For rooms with large amount of state a single user leaving could cause
us to go and load a lot of membership events and then pull out
membership state in a large number of batches.
* Newsfile
* Update synapse/storage/persist_events.py
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
* Fix adding if too soon
* Update docstring
* Review comments
* Woops typo
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2020-02-19 10:15:49 +00:00
Brendan Abolivier
5e4a438556
Merge pull request #6945 from matrix-org/babolivier/fix-retention-debug-log
...
Fix log in message retention purge jobs
2020-02-19 10:12:55 +00:00
Brendan Abolivier
71d65407e7
Incorporate review
2020-02-19 10:03:19 +00:00
Brendan Abolivier
fa64f836ec
Update changelog.d/6945.bugfix
...
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2020-02-19 09:54:13 +00:00
Erik Johnston
5a5abd55e8
Limit size of get_auth_chain_ids query ( #6947 )
2020-02-19 09:39:26 +00:00
Richard van der Hoff
603618c002
changelog
2020-02-19 08:53:32 +00:00
Richard van der Hoff
709e81f518
Make room alias lists peekable
...
As per
https://github.com/matrix-org/matrix-doc/pull/2432#pullrequestreview-360566830 ,
make room alias lists accessible to users outside world_readable rooms.
2020-02-19 08:53:32 +00:00
Richard van der Hoff
a0a1fd0bec
Add allow_departed_users param to check_in_room_or_world_readable
...
... and set it everywhere it's called.
while we're here, rename it for consistency with `check_user_in_room` (and to
help check that I haven't missed any instances)
2020-02-19 08:52:51 +00:00
Richard van der Hoff
b58d17e44f
Refactor the membership check methods in Auth
...
these were getting a bit unwieldy, so let's combine `check_joined_room` and
`check_user_was_in_room` into a single `check_user_in_room`.
2020-02-18 23:21:44 +00:00
Brendan Abolivier
771d70e89c
Changelog
2020-02-18 17:31:02 +00:00
Brendan Abolivier
f31a94a6dd
Fix log in message retention purge jobs
2020-02-18 17:29:57 +00:00
Brendan Abolivier
61b457e3ec
Incorporate review
2020-02-18 17:20:03 +00:00
Richard van der Hoff
adfaea8c69
Implement GET /_matrix/client/r0/rooms/{roomId}/aliases ( #6939 )
...
per matrix-org/matrix-doc#2432
2020-02-18 16:23:25 +00:00
Richard van der Hoff
3f1cd14791
Merge pull request #6872 from matrix-org/rav/dictproperty
...
Rewrite _EventInternalMetadata to back it with a dict
2020-02-18 16:21:02 +00:00
Brendan Abolivier
a0d2f9d089
Phrasing
2020-02-18 16:16:49 +00:00
Brendan Abolivier
d484126bf7
Merge pull request #6907 from matrix-org/babolivier/acme-config
...
Add mention and warning about ACME v1 deprecation to the TLS config
2020-02-18 16:11:31 +00:00
Erik Johnston
8a380d0fe2
Increase perf of get_auth_chain_ids used in state res v2. ( #6937 )
...
We do this by moving the recursive query to be fully in the DB.
2020-02-18 15:39:09 +00:00
Erik Johnston
818def8248
Fix worker docs to point /publicised_groups API correctly. ( #6938 )
2020-02-18 15:27:45 +00:00
Brendan Abolivier
9801a042f3
Make the log more noticeable
2020-02-18 15:15:43 +00:00
Brendan Abolivier
bfbe2f5b08
Print the error as an error log and raise the same exception we got
2020-02-18 15:10:41 +00:00
Brendan Abolivier
7a782c32a2
Merge pull request #6909 from matrix-org/babolivier/acme-install
...
Update INSTALL.md to recommend reverse proxying and warn about ACMEv1 deprecation
2020-02-18 15:06:06 +00:00
Brendan Abolivier
b1255077f5
Changelog
2020-02-18 14:35:51 +00:00
Brendan Abolivier
d009535639
Add mention of SRV records as an advanced topic
2020-02-18 14:07:41 +00:00
Brendan Abolivier
ba7a523854
Argh trailing spaces
2020-02-18 13:57:15 +00:00
Brendan Abolivier
e837be5b5c
Fix links in the reverse proxy doc
2020-02-18 13:53:58 +00:00
Brendan Abolivier
3c67eee6dc
Make federate.md more of a sumary of the steps to follow to set up replication
2020-02-18 13:51:03 +00:00
Patrick Cloke
fe3941f6e3
Stop sending events when creating or deleting aliases ( #6904 )
...
Stop sending events when creating or deleting associations (room aliases). Send an updated canonical alias event if one of the alt_aliases is deleted.
2020-02-18 07:29:44 -05:00
Brendan Abolivier
8ee0d74516
Split the delegating documentation out of federate.md and trim it down
2020-02-18 12:05:45 +00:00
Richard van der Hoff
3be2abd0a9
Kill off deprecated "config-on-the-fly" docker mode ( #6918 )
...
Lots of people seem to get confused by this mode, and it's been deprecated
since Synapse 1.1.0. It's time for it to go.
2020-02-18 11:41:53 +00:00
Richard van der Hoff
bc831d1d9a
#6924 has been released in 1.10.1
2020-02-17 16:34:13 +00:00
Richard van der Hoff
0a714c3abf
Merge branch 'master' into develop
2020-02-17 16:33:21 +00:00
Richard van der Hoff
7718fabb7a
Merge branch 'release-v1.10.1'
2020-02-17 16:33:04 +00:00
Richard van der Hoff
fd6d83ed96
1.10.1
2020-02-17 16:27:33 +00:00
Richard van der Hoff
d2455ec3aa
wait for current_state_events_membership before delete_old_current_state_events ( #6924 )
2020-02-17 16:19:32 +00:00
Andrew Morgan
3404ad289b
Raise the default power levels for invites, tombstones and server acls ( #6834 )
2020-02-17 13:23:37 +00:00
Richard van der Hoff
46fa66bbfd
wait for current_state_events_membership before delete_old_current_state_events ( #6924 )
2020-02-17 11:30:50 +00:00
Patrick Cloke
10027c80b0
Add type hints to the spam check module ( #6915 )
...
Add typing information to the spam checker modules.
2020-02-14 12:49:40 -05:00
Richard van der Hoff
5a78f47f6e
changelog
2020-02-14 16:42:40 +00:00
Richard van der Hoff
9551911f88
Rewrite _EventInternalMetadata to back it with a _dict
...
Mostly, this gives mypy an easier time.
2020-02-14 16:42:40 +00:00
Richard van der Hoff
43b2be9764
Replace _event_dict_property with DictProperty
...
this amounts to the same thing, but replaces `_event_dict` with `_dict`, and
removes some of the function layers generated by `property`.
2020-02-14 16:42:37 +00:00
Fridtjof Mund
32873efa87
contrib/docker: Ensure correct encoding and locale settings on DB creation ( #6921 )
...
Signed-off-by: Fridtjof Mund <fridtjof@das-labor.org >
2020-02-14 16:27:29 +00:00
Richard van der Hoff
97a42bbc3a
Add a warning about indentation to generated config ( #6920 )
...
Fixes #6916 .
2020-02-14 16:22:30 +00:00
Patrick Cloke
02e89021f5
Convert the directory handler tests to use HomeserverTestCase ( #6919 )
...
Convert directory handler tests to use HomeserverTestCase.
2020-02-14 09:05:43 -05:00
Patrick Cloke
49f877d32e
Filter the results of user directory searching via the spam checker ( #6888 )
...
Add a method to the spam checker to filter the user directory results.
2020-02-14 07:17:54 -05:00
Brendan Abolivier
ffe1fc111d
Update INSTALL.md
...
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2020-02-13 18:16:48 +00:00
Brendan Abolivier
79460ce9c9
Changelog
2020-02-13 17:24:14 +00:00
Brendan Abolivier
71cc6bab5f
Update INSTALL.md to recommend reverse proxying and warn about ACMEv1 deprecation
2020-02-13 17:22:44 +00:00
Brendan Abolivier
36af094017
Linters are hard but in they end they just want what's best for us
2020-02-13 17:03:41 +00:00
Brendan Abolivier
65bdc35a1f
Lint
2020-02-13 16:14:15 +00:00
Brendan Abolivier
df1c98c22a
Update changelog for #6905 to group it with upcoming PRs
2020-02-13 16:12:20 +00:00
Brendan Abolivier
f3f142259e
Changelog
2020-02-13 16:10:16 +00:00
Brendan Abolivier
0cb83cde70
Lint
2020-02-13 16:06:31 +00:00
Brendan Abolivier
ef9c275d96
Add a separator for the config warning
2020-02-13 15:44:14 +00:00
Brendan Abolivier
12bbcc255a
Add a comprehensive error when failing to register for an ACME account
2020-02-13 14:58:34 +00:00
Brendan Abolivier
5820ed905f
Add mention and warning about ACME v1 deprecation to the Synapse config
2020-02-13 14:20:08 +00:00
Patrick Cloke
361de49c90
Add documentation for the spam checker module ( #6906 )
...
Add documentation for the spam checker.
2020-02-13 07:40:57 -05:00
Brendan Abolivier
f48bf4febd
Merge pull request #6905 from matrix-org/babolivier/acme.md
...
Update ACME.md to mention ACME v1 deprecation
2020-02-13 12:13:18 +00:00
Aaron Raimist
dc3f998706
Remove m.lazy_load_members from unstable features since it is in CS r0.5.0 ( #6877 )
...
Fixes #5528
2020-02-13 12:02:32 +00:00
Brendan Abolivier
862669d6cc
Update docs/ACME.md
2020-02-13 11:29:08 +00:00
Brendan Abolivier
459d089af7
Mention that using Synapse to serve certificates requires restarts
2020-02-12 21:05:30 +00:00
Brendan Abolivier
e88a5dd108
Changelog
2020-02-12 20:15:41 +00:00
Brendan Abolivier
e45a7c0939
Remove duplicated info about certbot et al
2020-02-12 20:14:59 +00:00
Brendan Abolivier
f092029d2d
Update ACME.md to mention ACME v1 deprecation
2020-02-12 20:14:16 +00:00
Brendan Abolivier
6cd34da8b1
Merge pull request #6891 from matrix-org/babolivier/retention-doc-amend
...
Spell out that the last event sent to a room won't be deleted by a purge
2020-02-12 20:12:20 +00:00
Andrew Morgan
d8994942f2
Return a 404 for admin api user lookup if user not found ( #6901 )
2020-02-12 18:14:10 +00:00
Brendan Abolivier
08e050c3fd
Rephrase
2020-02-12 15:39:40 +00:00
Brendan Abolivier
47acbc519f
Merge branch 'master' into develop
2020-02-12 13:24:09 +00:00
Brendan Abolivier
d9239b5257
Merge tag 'v1.10.0'
...
Synapse 1.10.0 (2020-02-12)
===========================
**WARNING to client developers**: As of this release Synapse validates `client_secret` parameters in the Client-Server API as per the spec. See [\#6766](https://github.com/matrix-org/synapse/issues/6766 ) for details.
Updates to the Docker image
---------------------------
- Update the docker images to Alpine Linux 3.11. ([\#6897](https://github.com/matrix-org/synapse/issues/6897 ))
Synapse 1.10.0rc5 (2020-02-11)
==============================
Bugfixes
--------
- Fix the filtering introduced in 1.10.0rc3 to also apply to the state blocks returned by `/sync`. ([\#6884](https://github.com/matrix-org/synapse/issues/6884 ))
Synapse 1.10.0rc4 (2020-02-11)
==============================
This release candidate was built incorrectly and is superceded by 1.10.0rc5.
Synapse 1.10.0rc3 (2020-02-10)
==============================
Features
--------
- Filter out `m.room.aliases` from the CS API to mitigate abuse while a better solution is specced. ([\#6878](https://github.com/matrix-org/synapse/issues/6878 ))
Internal Changes
----------------
- Fix continuous integration failures with old versions of `pip`, which were introduced by a release of the `zipp` library. ([\#6880](https://github.com/matrix-org/synapse/issues/6880 ))
Synapse 1.10.0rc2 (2020-02-06)
==============================
Bugfixes
--------
- Fix an issue with cross-signing where device signatures were not sent to remote servers. ([\#6844](https://github.com/matrix-org/synapse/issues/6844 ))
- Fix to the unknown remote device detection which was introduced in 1.10.rc1. ([\#6848](https://github.com/matrix-org/synapse/issues/6848 ))
Internal Changes
----------------
- Detect unexpected sender keys on remote encrypted events and resync device lists. ([\#6850](https://github.com/matrix-org/synapse/issues/6850 ))
Synapse 1.10.0rc1 (2020-01-31)
==============================
Features
--------
- Add experimental support for updated authorization rules for aliases events, from [MSC2260](https://github.com/matrix-org/matrix-doc/pull/2260 ). ([\#6787](https://github.com/matrix-org/synapse/issues/6787 ), [\#6790](https://github.com/matrix-org/synapse/issues/6790 ), [\#6794](https://github.com/matrix-org/synapse/issues/6794 ))
Bugfixes
--------
- Warn if postgres database has a non-C locale, as that can cause issues when upgrading locales (e.g. due to upgrading OS). ([\#6734](https://github.com/matrix-org/synapse/issues/6734 ))
- Minor fixes to `PUT /_synapse/admin/v2/users` admin api. ([\#6761](https://github.com/matrix-org/synapse/issues/6761 ))
- Validate `client_secret` parameter using the regex provided by the Client-Server API, temporarily allowing `:` characters for older clients. The `:` character will be removed in a future release. ([\#6767](https://github.com/matrix-org/synapse/issues/6767 ))
- Fix persisting redaction events that have been redacted (or otherwise don't have a redacts key). ([\#6771](https://github.com/matrix-org/synapse/issues/6771 ))
- Fix outbound federation request metrics. ([\#6795](https://github.com/matrix-org/synapse/issues/6795 ))
- Fix bug where querying a remote user's device keys that weren't cached resulted in only returning a single device. ([\#6796](https://github.com/matrix-org/synapse/issues/6796 ))
- Fix race in federation sender worker that delayed sending of device updates. ([\#6799](https://github.com/matrix-org/synapse/issues/6799 ), [\#6800](https://github.com/matrix-org/synapse/issues/6800 ))
- Fix bug where Synapse didn't invalidate cache of remote users' devices when Synapse left a room. ([\#6801](https://github.com/matrix-org/synapse/issues/6801 ))
- Fix waking up other workers when remote server is detected to have come back online. ([\#6811](https://github.com/matrix-org/synapse/issues/6811 ))
Improved Documentation
----------------------
- Clarify documentation related to `user_dir` and `federation_reader` workers. ([\#6775](https://github.com/matrix-org/synapse/issues/6775 ))
Internal Changes
----------------
- Record room versions in the `rooms` table. ([\#6729](https://github.com/matrix-org/synapse/issues/6729 ), [\#6788](https://github.com/matrix-org/synapse/issues/6788 ), [\#6810](https://github.com/matrix-org/synapse/issues/6810 ))
- Propagate cache invalidates from workers to other workers. ([\#6748](https://github.com/matrix-org/synapse/issues/6748 ))
- Remove some unnecessary admin handler abstraction methods. ([\#6751](https://github.com/matrix-org/synapse/issues/6751 ))
- Add some debugging for media storage providers. ([\#6757](https://github.com/matrix-org/synapse/issues/6757 ))
- Detect unknown remote devices and mark cache as stale. ([\#6776](https://github.com/matrix-org/synapse/issues/6776 ), [\#6819](https://github.com/matrix-org/synapse/issues/6819 ))
- Attempt to resync remote users' devices when detected as stale. ([\#6786](https://github.com/matrix-org/synapse/issues/6786 ))
- Delete current state from the database when server leaves a room. ([\#6792](https://github.com/matrix-org/synapse/issues/6792 ))
- When a client asks for a remote user's device keys check if the local cache for that user has been marked as potentially stale. ([\#6797](https://github.com/matrix-org/synapse/issues/6797 ))
- Add background update to clean out left rooms from current state. ([\#6802](https://github.com/matrix-org/synapse/issues/6802 ), [\#6816](https://github.com/matrix-org/synapse/issues/6816 ))
- Refactoring work in preparation for changing the event redaction algorithm. ([\#6803](https://github.com/matrix-org/synapse/issues/6803 ), [\#6805](https://github.com/matrix-org/synapse/issues/6805 ), [\#6806](https://github.com/matrix-org/synapse/issues/6806 ), [\#6807](https://github.com/matrix-org/synapse/issues/6807 ), [\#6820](https://github.com/matrix-org/synapse/issues/6820 ))
2020-02-12 13:23:22 +00:00
Brendan Abolivier
7b8d654a61
Move the warning at the top of the release changes
2020-02-12 12:20:37 +00:00
Brendan Abolivier
fdb816713a
1.10.0
2020-02-12 12:19:19 +00:00
Richard van der Hoff
3dd2b5f5e3
bump the version of Alpine Linux used in the docker images ( #6897 )
2020-02-12 12:02:53 +00:00
Patrick Cloke
ba547ec3a9
Use BSD-compatible in-place editing for sed. ( #6887 )
2020-02-12 07:02:19 -05:00
Brendan Abolivier
a0c4769f1a
Update the changelog file
2020-02-11 17:56:42 +00:00
Brendan Abolivier
6b21986e4e
Also spell it out in the purge history API doc
2020-02-11 17:56:04 +00:00
Brendan Abolivier
705c978366
Changelog
2020-02-11 17:38:27 +00:00
Brendan Abolivier
a443d2a25d
Spell out that Synapse never purges the last event sent in a room
2020-02-11 17:37:09 +00:00
Richard van der Hoff
88d41e94f5
Merge branch 'release-v1.10.0' into develop
2020-02-11 11:12:31 +00:00
Richard van der Hoff
856b2a9555
1.10.0rc5
2020-02-11 11:06:28 +00:00
Richard van der Hoff
78d170262c
changelog wording
2020-02-11 10:53:25 +00:00
Richard van der Hoff
aa7e4291ee
Update CHANGES.md
2020-02-11 10:51:13 +00:00
Richard van der Hoff
9e45d573d4
changelog formatting
2020-02-11 10:50:55 +00:00
Richard van der Hoff
605cd089f7
Merge branch 'release-v1.10.0' into develop
2020-02-11 10:43:47 +00:00
Richard van der Hoff
3edc65dd24
1.10.0rc4
2020-02-11 10:43:16 +00:00
Patrick Cloke
a92e703ab9
Reject device display names that are too long ( #6882 )
...
* Reject device display names that are too long.
Too long is currently defined as 100 characters in length.
* Add a regression test for rejecting a too long device display name.
2020-02-10 16:35:26 -05:00
Matthew Hodgson
01209382fb
filter out m.room.aliases from /sync state blocks ( #6884 )
...
We forgot to filter out aliases from /sync state blocks as well as the timeline.
2020-02-10 18:07:35 +00:00
Patrick Cloke
3a3118f4ec
Add an additional test to the SyTest blacklist for worker mode. ( #6883 )
2020-02-10 11:47:18 -05:00
Richard van der Hoff
db0fee738d
Merge tag 'v1.10.0rc3' into develop
...
Synapse 1.10.0rc3 (2020-02-10)
==============================
Features
--------
- Filter out m.room.aliases from the CS API to mitigate abuse while a better solution is specced. ([\#6878](https://github.com/matrix-org/synapse/issues/6878 ))
Internal Changes
----------------
- Fix continuous integration failures with old versions of `pip`, which were introduced by a release of the `zipp` library. ([\#6880](https://github.com/matrix-org/synapse/issues/6880 ))
2020-02-10 10:15:32 +00:00
Richard van der Hoff
3de57e7062
1.10.0rc3
2020-02-10 09:56:42 +00:00
Matthew Hodgson
8e64c5a24c
filter out m.room.aliases from the CS API until a better solution is specced ( #6878 )
...
We're in the middle of properly mitigating spam caused by malicious aliases being added to a room. However, until this work fully lands, we temporarily filter out all m.room.aliases events from /sync and /messages on the CS API, to remove abusive aliases. This is considered acceptable as m.room.aliases events were never a reliable record of the given alias->id mapping and were purely informational, and in their current state do more harm than good.
2020-02-10 09:36:23 +00:00
Richard van der Hoff
cc0800ebfc
Merge remote-tracking branch 'origin/release-v1.10.0' into develop
2020-02-10 00:41:49 +00:00
Richard van der Hoff
fe73f0d533
Update setuptools for python 3.5 tests ( #6880 )
...
Workaround for jaraco/zipp#40
2020-02-10 00:41:20 +00:00
Erik Johnston
21db35f77e
Add support for putting fed user query API on workers ( #6873 )
2020-02-07 15:45:39 +00:00
Richard van der Hoff
e1d858984d
Remove unused get_room_stats_state method. ( #6869 )
2020-02-07 15:30:26 +00:00
Richard van der Hoff
799001f2c0
Add a make_event_from_dict method ( #6858 )
...
... and use it in places where it's trivial to do so.
This will make it easier to pass room versions into the FrozenEvent
constructors.
2020-02-07 15:30:04 +00:00
Erik Johnston
b08b0a22d5
Add typing to synapse.federation.sender ( #6871 )
2020-02-07 13:56:38 +00:00
Erik Johnston
de2d267375
Allow moving group read APIs to workers ( #6866 )
2020-02-07 11:14:19 +00:00
Dirk Klimpel
56ca93ef59
Admin api to add an email address ( #6789 )
2020-02-07 10:29:36 +00:00
Richard van der Hoff
f4884444c3
remove unused room_version_to_event_format ( #6857 )
2020-02-07 09:26:57 +00:00
Richard van der Hoff
e1b240329e
Merge pull request #6856 from matrix-org/rav/redact_changes/6
...
Pass room_version into `event_from_pdu_json`
2020-02-07 09:22:15 +00:00
Patrick Cloke
7765bf3989
Limit the number of events that can be requested when backfilling events ( #6864 )
...
Limit the maximum number of events requested when backfilling events.
2020-02-06 13:25:24 -05:00
Richard van der Hoff
928edef979
Pass room_version into event_from_pdu_json
...
It's called from all over the shop, so this one's a bit messy.
2020-02-06 16:08:27 +00:00
Richard van der Hoff
b0c8bdd49d
pass room version into FederationClient.send_join ( #6854 )
...
... which allows us to sanity-check the create event.
2020-02-06 15:50:39 +00:00
timfi
bce557175b
Allow empty federation_certificate_verification_whitelist ( #6849 )
2020-02-06 14:45:01 +00:00
PeerD
99fcc96289
Third party event rules Update ( #6781 )
2020-02-06 14:15:29 +00:00
Erik Johnston
ed630ea17c
Reduce amount of logging at INFO level. ( #6862 )
...
A lot of the things we log at INFO are now a bit superfluous, so lets
make them DEBUG logs to reduce the amount we log by default.
Co-Authored-By: Brendan Abolivier <babolivier@matrix.org >
Co-authored-by: Brendan Abolivier <github@brendanabolivier.com >
2020-02-06 13:31:05 +00:00
Richard van der Hoff
9bcd37146e
Merge pull request #6823 from matrix-org/rav/redact_changes/5
...
pass room versions around
2020-02-06 11:32:33 +00:00
Erik Johnston
2201ef8556
Merge tag 'v1.10.0rc2' into develop
...
Synapse 1.10.0rc2 (2020-02-06)
==============================
Bugfixes
--------
- Fix an issue with cross-signing where device signatures were not sent to remote servers. ([\#6844](https://github.com/matrix-org/synapse/issues/6844 ))
- Fix to the unknown remote device detection which was introduced in 1.10.rc1. ([\#6848](https://github.com/matrix-org/synapse/issues/6848 ))
Internal Changes
----------------
- Detect unexpected sender keys on remote encrypted events and resync device lists. ([\#6850](https://github.com/matrix-org/synapse/issues/6850 ))
2020-02-06 11:04:03 +00:00
Erik Johnston
f663118155
Update changelog
2020-02-06 10:52:25 +00:00
Erik Johnston
b5176166b7
Update changelog
2020-02-06 10:51:02 +00:00
Erik Johnston
4a50b674f2
Update changelog
2020-02-06 10:45:29 +00:00
Erik Johnston
6a7e90ad78
1.10.0rc2
2020-02-06 10:40:08 +00:00
Robin Vleij
f0561fcffd
Update documentation ( #6859 )
...
Update documentation to reflect the correct format of user_id (fully qualified).
2020-02-05 21:27:38 +00:00
Patrick Cloke
5e019069ab
Merge pull request #6855 from matrix-org/clokep/readme-pip-install
...
Add quotes around the pip install target to avoid my shell complaining
2020-02-05 13:29:52 -05:00
Patrick Cloke
39c2d26e0b
Add quotes around pip install target (my shell complained without them).
2020-02-05 12:53:18 -05:00
Richard van der Hoff
ff70ec0a00
Newsfile
2020-02-05 17:43:57 +00:00
Richard van der Hoff
ee0525b2b2
Simplify room_version handling in FederationClient.send_invite
2020-02-05 17:43:57 +00:00
Richard van der Hoff
f84700fba8
Pass room version object into FederationClient.get_pdu
2020-02-05 17:25:46 +00:00
Richard van der Hoff
577f460369
Merge pull request #6840 from matrix-org/rav/federation_client_async
...
Port much of `synapse.federation.federation_client` to async/await
2020-02-05 16:56:39 +00:00
Richard van der Hoff
6bbd890f05
make FederationClient._do_send_invite async
2020-02-05 15:50:31 +00:00
Richard van der Hoff
146fec0820
Apply suggestions from code review
...
Co-Authored-By: Erik Johnston <erik@matrix.org >
2020-02-05 15:47:00 +00:00
Erik Johnston
a58860e480
Check sender_key matches on inbound encrypted events. ( #6850 )
...
If they don't then the device lists are probably out of sync.
2020-02-05 14:02:39 +00:00
Hubert Chathi
60d0672426
Merge pull request #6844 from matrix-org/uhoreg/cross_signing_fix_device_fed
...
add device signatures to device key query results
2020-02-05 10:54:49 +00:00
Michael Kaye
a831d2e4e3
Reduce performance logging to DEBUG ( #6833 )
...
* Reduce tnx performance logging to DEBUG
* Changelog.d
2020-02-05 08:57:37 +00:00
Richard van der Hoff
d88e0ec080
Database updates to populate rooms.room_version ( #6847 )
...
We're going to need this so that we can figure out how to handle redactions when fetching events from the database.
2020-02-04 21:31:08 +00:00
Erik Johnston
6475382d80
Fix detecting unknown devices from remote encrypted events. ( #6848 )
...
We were looking at the wrong event type (`m.room.encryption` vs
`m.room.encrypted`).
Also fixup the duplicate `EvenTypes` entries.
Introduced in #6776 .
2020-02-04 17:25:54 +00:00
Hubert Chathi
74bf3fdbb9
Merge pull request #6844 from matrix-org/uhoreg/cross_signing_fix_device_fed
...
add device signatures to device key query results
2020-02-04 12:03:54 -05:00
Michael Kaye
c87572d6e4
Update CONTRIBUTING.md about merging PRs. ( #6846 )
2020-02-04 16:21:09 +00:00
Richard van der Hoff
5ef91b96f1
Merge remote-tracking branch 'origin/develop' into rav/federation_client_async
2020-02-04 12:07:05 +00:00
Richard van der Hoff
c7d6d5c69e
Merge pull request #6837 from matrix-org/rav/federation_async
...
Port much of `synapse.handlers.federation` to async/await.
2020-02-04 12:06:18 +00:00
Hubert Chathi
245ee14220
add changelog
2020-02-04 00:21:07 -05:00
Hubert Chathi
23d8a55c7a
add device signatures to device key query results
2020-02-04 00:13:12 -05:00
Richard van der Hoff
ea23210b2d
make FederationClient.send_invite async
2020-02-03 22:29:49 +00:00
Richard van der Hoff
4b4536dd02
newsfile
2020-02-03 22:28:45 +00:00
Richard van der Hoff
6deeefb68c
make FederationClient.get_missing_events async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
abadf44eb2
make FederationClient._do_send_leave async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
e88b90aaeb
make FederationClient.send_leave.send_request async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
638001116d
make FederationClient._do_send_join async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
3960527c2e
make FederationClient.send_join.send_request async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
ad09ee9262
make FederationClient.make_membership_event.send_request async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
1330c311b7
make FederationClient._try_destination_list async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
a46fabf17b
make FederationClient.send_leave async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
8af9f11bea
make FederationClient.send_join async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
3f11cbb404
make FederationClient.make_membership_event async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
24d814ca23
make FederationClient.get_event_auth async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
d73683c363
make FederationClient.get_room_state_ids async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
0cb0c7bcd5
make FederationClient.get_pdu async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
0536d0c9be
make FederationClient.backfill async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
5d17c31596
make FederationHandler.send_invite async
2020-02-03 22:28:11 +00:00
Richard van der Hoff
e81c093974
make FederationHandler.on_get_missing_events async
2020-02-03 19:15:08 +00:00
Erik Johnston
b9391c9575
Add typing to SyncHandler ( #6821 )
...
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2020-02-03 18:05:44 +00:00
Erik Johnston
ae5b3104f0
Fix stacktraces when using ObservableDeferred and async/await ( #6836 )
2020-02-03 17:10:54 +00:00
Richard van der Hoff
e49eb1a886
changelog
2020-02-03 16:30:21 +00:00
Richard van der Hoff
f64c96662e
make FederationHandler.user_joined_room async
2020-02-03 16:29:30 +00:00
Richard van der Hoff
52642860da
make FederationHandler._clean_room_for_join async
2020-02-03 16:29:30 +00:00
Richard van der Hoff
814cc00cb9
make FederationHandler._notify_persisted_event async
2020-02-03 16:29:30 +00:00
Richard van der Hoff
05299599b6
make FederationHandler.persist_events_and_notify async
2020-02-03 16:29:30 +00:00
Richard van der Hoff
3b7e0e002b
make FederationHandler._make_and_verify_event async
2020-02-03 16:22:30 +00:00
Richard van der Hoff
4286e429a7
make FederationHandler.do_remotely_reject_invite async
2020-02-03 16:19:18 +00:00
Richard van der Hoff
c3f296af32
make FederationHandler._check_for_soft_fail async
2020-02-03 16:16:31 +00:00
Richard van der Hoff
dbdf843012
make FederationHandler._persist_auth_tree async
2020-02-03 16:14:58 +00:00
Richard van der Hoff
ebd6a15af3
make FederationHandler.do_invite_join async
2020-02-03 16:13:13 +00:00
Richard van der Hoff
94f7b4cd54
make FederationHandler.on_event_auth async
2020-02-03 16:06:46 +00:00
Richard van der Hoff
863087d186
make FederationHandler.on_exchange_third_party_invite_request async
2020-02-03 16:02:50 +00:00
Richard van der Hoff
957129f4a7
make FederationHandler.construct_auth_difference async
2020-02-03 16:00:46 +00:00
Richard van der Hoff
0d5f2f4bb0
make FederationHandler._update_context_for_auth_events async
2020-02-03 15:55:35 +00:00
Richard van der Hoff
a25ddf26a3
make FederationHandler._update_auth_events_and_context_for_auth async
2020-02-03 15:53:54 +00:00
Richard van der Hoff
bc9b75c6f0
make FederationHandler.do_auth async
2020-02-03 15:51:24 +00:00
Richard van der Hoff
8033b257a7
make FederationHandler._prep_event async
2020-02-03 15:49:32 +00:00
Richard van der Hoff
1cdc253e0a
make FederationHandler._handle_new_event async
2020-02-03 15:48:33 +00:00
Richard van der Hoff
c556ed9e15
make FederationHandler._handle_new_events async
2020-02-03 15:43:51 +00:00
Richard van der Hoff
6e89ec5e32
make FederationHandler.on_make_leave_request async
2020-02-03 15:40:41 +00:00
Richard van der Hoff
d184cbc031
make FederationHandler.on_send_leave_request async
2020-02-03 15:39:24 +00:00
Richard van der Hoff
98681f90cb
make FederationHandler.on_make_join_request async
2020-02-03 15:38:02 +00:00
Richard van der Hoff
af8ba6b525
make FederationHandler.on_invite_request async
2020-02-03 15:33:42 +00:00
Richard van der Hoff
7571bf86f0
make FederationHandler.on_send_join_request async
2020-02-03 15:32:48 +00:00
Richard van der Hoff
b3e44f0bdf
make FederationHandler.on_query_auth async
2020-02-03 15:30:23 +00:00
Andrew Morgan
370080531e
Allow URL-encoded user IDs on user admin api paths ( #6825 )
2020-02-03 13:18:42 +00:00
Richard van der Hoff
b0d112e78b
Fix room_version in on_invite_request flow ( #6827 )
...
I messed this up a bit in #6805 , but fortunately we weren't actually doing
anything with the room_version so it didn't matter that it was a str not a RoomVersion.
2020-02-03 13:15:23 +00:00
Erik Johnston
68ef7ebbef
Update changelog
2020-01-31 15:45:08 +00:00
Erik Johnston
0f8ffa38b5
Fix link in upgrade.rst
2020-01-31 15:38:16 +00:00
Erik Johnston
ac0d45b78b
1.10.0rc1
2020-01-31 15:35:37 +00:00
Erik Johnston
83b0ea047b
Fix deleting of stale marker for device lists ( #6819 )
...
We were in fact only deleting stale marker when we got an incremental
update, rather than when we did a full resync.
2020-01-31 14:04:15 +00:00
Richard van der Hoff
7f93eb1903
pass room_version into compute_event_signature ( #6807 )
2020-01-31 13:47:43 +00:00
Richard van der Hoff
a5afdd15e5
Merge pull request #6806 from matrix-org/rav/redact_changes/3
...
Pass room_version into add_hashes_and_signatures
2020-01-31 10:57:03 +00:00
Richard van der Hoff
160522e32c
Merge pull request #6820 from matrix-org/rav/get_room_version_id
...
Make `get_room_version` return a RoomVersion object
2020-01-31 10:56:42 +00:00
Richard van der Hoff
f6fa2c0b31
newsfile
2020-01-31 10:30:29 +00:00
Richard van der Hoff
08f41a6f05
Add get_room_version method
...
So that we can start factoring out some of this boilerplatey boilerplate.
2020-01-31 10:28:15 +00:00
Richard van der Hoff
d7bf793cc1
s/get_room_version/get_room_version_id/
...
... to make way for a forthcoming get_room_version which returns a RoomVersion
object.
2020-01-31 10:06:21 +00:00
Erik Johnston
7d846e8704
Fix bug with getting missing auth event during join 500'ed ( #6810 )
2020-01-31 09:49:13 +00:00
Richard van der Hoff
540c5e168b
changelog
2020-01-30 22:15:50 +00:00
Richard van der Hoff
2a81393a4b
Pass room_version into add_hashes_and_signatures
2020-01-30 22:15:50 +00:00
Richard van der Hoff
54f3f369bd
Pass room_version into create_local_event_from_event_dict
2020-01-30 22:15:50 +00:00
Richard van der Hoff
ef6bdafb29
Store the room version in EventBuilder
2020-01-30 22:15:50 +00:00
Richard van der Hoff
46a446828d
pass room version into FederationHandler.on_invite_request ( #6805 )
2020-01-30 22:13:02 +00:00
Erik Johnston
e0992fcc5b
Log when we delete room in bg update ( #6816 )
2020-01-30 17:55:34 +00:00
Richard van der Hoff
184303b865
MSC2260: Block direct sends of m.room.aliases events ( #6794 )
...
as per MSC2260
2020-01-30 17:20:55 +00:00
Erik Johnston
57ad702af0
Backgroud update to clean out rooms from current state ( #6802 )
2020-01-30 17:17:44 +00:00
Erik Johnston
b660327056
Resync remote device list when detected as stale. ( #6786 )
2020-01-30 17:06:38 +00:00
Erik Johnston
c3d4ad8afd
Fix sending server up commands from workers ( #6811 )
...
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2020-01-30 16:42:11 +00:00
Erik Johnston
a5bab2d058
When server leaves room check for stale device lists. ( #6801 )
...
When a server leaves a room it may stop sharing a room with remote
users, and thus not get any updates to their device lists. So we need to
check for this case and delete those device lists from the cache.
We don't need to do this if we stop sharing a room because the remote
user leaves the room, because we track that case via looking at
membership changes.
2020-01-30 16:10:30 +00:00
Erik Johnston
c80a9fe13d
When a client asks for remote keys check if should resync. ( #6797 )
...
If we detect that the remote users' keys may have changed then we should
attempt to resync against the remote server rather than using the
(potentially) stale local cache.
2020-01-30 15:06:58 +00:00
Richard van der Hoff
5a246611e3
Type defintions for use in refactoring for redaction changes ( #6803 )
...
* Bump signedjson to 1.1
... so that we can use the type definitions
* Fix breakage caused by upgrade to signedjson 1.1
Thanks, @illicitonion...
2020-01-30 11:25:59 +00:00
Erik Johnston
a855b7c3a8
Remove unused DeviceRow class ( #6800 )
2020-01-29 12:06:31 +00:00
Richard van der Hoff
281551f720
Merge pull request #6790 from matrix-org/rav/msc2260.1
...
MSC2260: change the default power level for m.room.aliases events
2020-01-29 11:53:11 +00:00
Richard van der Hoff
750d4d7599
changelog
2020-01-29 11:52:52 +00:00
Richard van der Hoff
dcd85b976d
Make /directory/room/<alias> handle restrictive power levels
...
Fixes a bug where the alias would be added, but `PUT /directory/room/<alias>`
would return a 403.
2020-01-29 11:52:52 +00:00
Richard van der Hoff
b36095ae5c
Set the PL for aliases events to 0.
2020-01-29 11:52:52 +00:00
Richard van der Hoff
ee42a5513e
Factor out a copy_power_levels_contents method
...
I'm going to need another copy (hah!) of this.
2020-01-29 11:52:52 +00:00
Erik Johnston
6b9e1014cf
Fix race in federation sender that delayed device updates. ( #6799 )
...
We were sending device updates down both the federation stream and
device streams. This mean there was a race if the federation sender
worker processed the federation stream first, as when the sender checked
if there were new device updates the slaved ID generator hadn't been
updated with the new stream IDs and so returned nothing.
This situation is correctly handled by events/receipts/etc by not
sending updates down the federation stream and instead having the
federation sender worker listen on the other streams and poke the
transaction queues as appropriate.
2020-01-29 11:23:01 +00:00
Erik Johnston
611215a49c
Delete current state when server leaves a room ( #6792 )
...
Otherwise its just stale data, which may get deleted later anyway so
can't be relied on. It's also a bit of a shotgun if we're trying to get
the current state of a room we're not in.
2020-01-29 11:01:32 +00:00
Erik Johnston
2cad8baa70
Fix bug when querying remote user keys that require a resync. ( #6796 )
...
We ended up only returning a single device, rather than all of them.
2020-01-29 09:56:41 +00:00
Erik Johnston
fcfb591b31
Fix outbound federation request metrics ( #6795 )
2020-01-28 18:59:48 +00:00
Richard van der Hoff
cc109b79dd
Merge pull request #6787 from matrix-org/rav/msc2260
...
Implement updated auth rules from MSC2260
2020-01-28 15:11:22 +00:00
Richard van der Hoff
a1f307f7d1
fix bad variable ref
2020-01-28 14:55:22 +00:00
Erik Johnston
e17a110661
Detect unknown remote devices and mark cache as stale ( #6776 )
...
We just mark the fact that the cache may be stale in the database for
now.
2020-01-28 14:43:21 +00:00
Richard van der Hoff
fbe0a82c0d
update changelog
2020-01-28 14:20:10 +00:00
Richard van der Hoff
99e205fc21
changelog
2020-01-28 14:20:10 +00:00
Richard van der Hoff
49d3bca37b
Implement updated auth rules from MSC2260
2020-01-28 14:20:10 +00:00
Richard van der Hoff
a8ce7aeb43
Pass room version object into event_auth.check and check_redaction ( #6788 )
...
These are easier to work with than the strings and we normally have one around.
This fixes `FederationHander._persist_auth_tree` which was passing a
RoomVersion object into event_auth.check instead of a string.
2020-01-28 14:18:29 +00:00
Erik Johnston
02b44db922
Warn if postgres database has non-C locale. ( #6734 )
...
As using non-C locale can cause issues on upgrading OS.
2020-01-28 13:44:21 +00:00
Erik Johnston
33f904835a
Merge branch 'master' into develop
2020-01-28 13:39:39 +00:00
Erik Johnston
77d9357226
1.9.1
2020-01-28 13:09:36 +00:00
Erik Johnston
bdbeeb94ec
Fix setting mau_limit_reserved_threepids config ( #6793 )
...
Calling the invalidation function during initialisation of the data
stores introduces a circular dependency, causing Synapse to fail to
start.
2020-01-28 13:05:24 +00:00
Erik Johnston
8df862e45d
Add rooms.room_version column ( #6729 )
...
This is so that we don't have to rely on pulling it out from `current_state_events` table.
2020-01-27 14:30:57 +00:00
Erik Johnston
d5275fc55f
Propagate cache invalidates from workers to other workers. ( #6748 )
...
Currently if a worker invalidates a cache it will be streamed to master, which then didn't forward those to other workers.
2020-01-27 13:47:50 +00:00
Brendan Abolivier
f74d178b17
Merge pull request #6775 from matrix-org/jaywink/worker-docs-tweaks
...
Clarifications to the workers documentation
2020-01-27 12:30:54 +00:00
Jason Robinson
cf9d56e5cf
Formatting of changelog
...
Co-Authored-By: Brendan Abolivier <babolivier@matrix.org >
2020-01-27 14:09:59 +02:00
Jason Robinson
1fe5001369
Fix federation_reader listeners doc as per PR review
...
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2020-01-27 10:21:25 +02:00
Andrew Morgan
9f7aaf90b5
Validate client_secret parameter ( #6767 )
2020-01-24 14:28:40 +00:00
Jason Robinson
aa6ad288f1
Clarifications to the workers documentation
...
* Add note that user_dir requires disabling user dir
updates from the main synapse process.
* Add note that federation_reader should have
the federation listener resource.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2020-01-24 11:08:50 +02:00
Erik Johnston
fa4d609e20
Make 'event.redacts' never raise. ( #6771 )
...
There are quite a few places that we assume that a redaction event has a
corresponding `redacts` key, which is not always the case. So lets
cheekily make it so that event.redacts just returns None instead.
2020-01-23 15:19:03 +00:00
Brendan Abolivier
51fc3f693e
Merge branch 'master' into develop
2020-01-23 13:45:23 +00:00
Brendan Abolivier
9bae740527
Fixup changelog
2020-01-23 13:13:19 +00:00
Brendan Abolivier
1755326d8a
Fixup changelog
2020-01-23 13:11:07 +00:00
Brendan Abolivier
1dc5a791cf
Fixup changelog
2020-01-23 12:59:29 +00:00
Brendan Abolivier
ba64c3b615
Merge branch 'release-v1.9.0' of github.com:matrix-org/synapse into release-v1.9.0
2020-01-23 12:58:03 +00:00
Brendan Abolivier
f3eac2b3e9
1.9.0
2020-01-23 12:57:55 +00:00
Richard van der Hoff
6b7462a13f
a bit of debugging for media storage providers ( #6757 )
...
* a bit of debugging for media storage providers
* changelog
2020-01-23 12:11:44 +00:00
Richard van der Hoff
5bd3cb7260
Minor fixes to user admin api ( #6761 )
...
* don't insist on a password (this is valid if you have an SSO login)
* fix reference to undefined `requester`
2020-01-23 12:03:58 +00:00
Andrew Morgan
04345338e1
Merge branch 'release-v1.9.0' into develop
2020-01-23 11:38:29 +00:00
Andrew Morgan
d31f5f4d89
Update admin room docs with correct endpoints ( #6770 )
2020-01-23 11:37:26 +00:00
Andrew Morgan
ce84dd9e20
Remove unnecessary abstractions in admin handler ( #6751 )
2020-01-22 15:09:57 +00:00
Brendan Abolivier
33f7e5ce2a
Fixup warning about workers changes
2020-01-22 14:49:21 +00:00
Brendan Abolivier
91085ef49e
Add deprecation headers
2020-01-22 14:30:22 +00:00
Brendan Abolivier
ffa637050d
Fixup changelog
2020-01-22 14:19:23 +00:00
Brendan Abolivier
0d0f32bc53
1.9.0rc1
2020-01-22 14:03:46 +00:00
Andrew Morgan
90a28fb475
Admin API to list, filter and sort rooms ( #6720 )
2020-01-22 13:36:43 +00:00
Brendan Abolivier
ae6cf586b0
Merge pull request #6764 from matrix-org/babolivier/fix-thumbnail
...
Fix typo in _select_thumbnail
2020-01-22 13:21:00 +00:00
Brendan Abolivier
6ae0c8db33
Lint + changelog
2020-01-22 12:38:18 +00:00
Brendan Abolivier
d9a8728b11
Remove unused import
2020-01-22 12:30:49 +00:00
Brendan Abolivier
67aa18e8dc
Add tests for thumbnailing
2020-01-22 12:28:07 +00:00
Brendan Abolivier
ed83c3a018
Fix typo in _select_thumbnail
2020-01-22 12:27:42 +00:00
Andrew Morgan
aa9b00fb2f
Fix and add test to deprecated quarantine media admin api ( #6756 )
2020-01-22 11:05:50 +00:00
Neil Johnson
5e52d8563b
Allow monthly active user limiting support for worker mode, fixes #4639 . ( #6742 )
2020-01-22 11:05:14 +00:00
Erik Johnston
5d7a6ad223
Allow streaming cache invalidate all to workers. ( #6749 )
2020-01-22 10:37:00 +00:00
Erik Johnston
2093f83ea0
Remove unused CI docker compose files ( #6754 )
...
These now exist in the pipelines repo.
2020-01-22 10:36:48 +00:00
Ivan Vilata-i-Balaguer
837f62266b
Avoid attribute error when password_config present but empty ( #6753 )
...
The old statement returned `None` for such a `password_config` (like the one
created on first run), thus retrieval of the `pepper` key failed with
`AttributeError`.
Fixes #5315
Signed-off-by: Ivan Vilata i Balaguer <ivan@selidor.net >
2020-01-22 07:32:52 +00:00
Brendan Abolivier
07124d028d
Port synapse_port_db to async/await ( #6718 )
...
* Raise an exception if there are pending background updates
So we return with a non-0 code
* Changelog
* Port synapse_port_db to async/await
* Port update_database to async/await
* Add version string to mocked homeservers
* Remove unused imports
* Convert overseen bits to async/await
* Fixup logging contexts
* Fix imports
* Add a way to print an error without raising an exception
* Incorporate review
2020-01-21 19:04:58 +00:00
Erik Johnston
0e68760078
Add a DeltaState to track changes to be made to current state ( #6716 )
2020-01-20 18:07:20 +00:00
Erik Johnston
b0a66ab83c
Fixup synapse.rest to pass mypy ( #6732 )
2020-01-20 17:38:21 +00:00
Erik Johnston
74b74462f1
Fix /events/:event_id deprecated API. ( #6731 )
2020-01-20 17:38:09 +00:00
Erik Johnston
0f6e525be3
Fixup synapse.api to pass mypy ( #6733 )
2020-01-20 17:34:13 +00:00
Erik Johnston
ceecedc68b
Fix changing password via user admin API. ( #6730 )
2020-01-20 17:23:59 +00:00
Andrew Morgan
e9e066055f
Fix empty account_validity config block ( #6747 )
2020-01-20 16:21:59 +00:00
Andrew Morgan
351fdfede6
Update changelog.d/6747.bugfix
...
Co-Authored-By: Erik Johnston <erik@matrix.org >
2020-01-20 15:58:44 +00:00
Erik Johnston
2f23eb27b3
Revert "Newsfile"
...
This reverts commit 11c23af465 .
2020-01-20 15:12:58 +00:00
Erik Johnston
11c23af465
Newsfile
2020-01-20 15:11:38 +00:00
Andrew Morgan
026f4bdf3c
Add changelog
2020-01-20 14:12:21 +00:00
Andrew Morgan
198d52da3a
Fix empty account_validity config block
2020-01-20 14:05:29 +00:00
Brendan Abolivier
a17f64361c
Add more logging around message retention policies support ( #6717 )
...
So we can debug issues like #6683 more easily
2020-01-17 20:51:44 +00:00
Erik Johnston
5909751936
Fix up changelog
2020-01-17 15:13:27 +00:00
Richard van der Hoff
0b885d62ef
bump version to v1.9.0.dev2
2020-01-17 14:58:58 +00:00
Satsuki Yanagi
722b4f302d
Fix syntax error in run_upgrade for schema 57 ( #6728 )
...
Fix #6727
Related #6655
Co-authored-by: Erik Johnston <erikj@jki.re >
2020-01-17 14:30:35 +00:00
Brendan Abolivier
3b72bb780a
Merge pull request #6714 from matrix-org/babolivier/retention_select_event
...
Fix instantiation of message retention purge jobs
2020-01-17 14:23:51 +00:00
Richard van der Hoff
1dee1e900b
bump version to v1.9.0.dev1
2020-01-17 10:44:12 +00:00
Richard van der Hoff
59dc87c618
Merge pull request #6724 from matrix-org/rav/log_saml_attributes
...
Log saml assertions rather than the whole response
2020-01-17 10:33:24 +00:00
Richard van der Hoff
2b6a77fcde
Delegate remote_user_id mapping to the saml mapping provider ( #6723 )
...
Turns out that figuring out a remote user id for the SAML user isn't quite as obvious as it seems. Factor it out to the SamlMappingProvider so that it's easy to control.
2020-01-17 10:32:47 +00:00
Erik Johnston
a8a50f5b57
Wake up transaction queue when remote server comes back online ( #6706 )
...
This will be used to retry outbound transactions to a remote server if
we think it might have come back up.
2020-01-17 10:27:19 +00:00
Richard van der Hoff
5ce0b17e38
Clarify the account_validity and email sections of the sample configuration. ( #6685 )
...
Generally try to make this more comprehensible, and make it match the
conventions.
I've removed the documentation for all the settings which allow you to change
the names of the template files, because I can't really see why they are
useful.
2020-01-17 10:04:15 +00:00
Richard van der Hoff
95c5b9bfb3
changelog
2020-01-16 22:29:06 +00:00
Richard van der Hoff
acc7820574
Log saml assertions rather than the whole response
...
... since the whole response is huge.
We even need to break up the assertions, since kibana otherwise truncates them.
2020-01-16 22:26:34 +00:00
Richard van der Hoff
14d8f342d5
move batch_iter to a separate module
2020-01-16 22:25:32 +00:00
Brendan Abolivier
4fb3cb208a
Precise changelog
2020-01-16 20:27:07 +00:00
Brendan Abolivier
dac148341b
Fixup diff
2020-01-16 20:25:09 +00:00
Brendan Abolivier
842c2cfbf1
Remove get_room_event_after_stream_ordering entirely
2020-01-16 20:24:17 +00:00
Erik Johnston
d386f2f339
Add StateMap type alias ( #6715 )
2020-01-16 13:31:22 +00:00
Brendan Abolivier
e601f35d3b
Lint
2020-01-16 09:55:11 +00:00
Andrew Morgan
7b14c4a018
Add tips for the changelog to the pull request template ( #6663 )
2020-01-16 09:46:36 +00:00
Neil Johnson
38e0e59f42
Add org.matrix.e2e_cross_signing to unstable_features in /versions as per MSC1756 ( #6712 )
2020-01-16 09:46:14 +00:00
Erik Johnston
48c3a96886
Port synapse.replication.tcp to async/await ( #6666 )
...
* Port synapse.replication.tcp to async/await
* Newsfile
* Correctly document type of on_<FOO> functions as async
* Don't be overenthusiastic with the asyncing....
2020-01-16 09:16:12 +00:00
Brendan Abolivier
48e57a6452
Rename changelog
2020-01-15 19:40:52 +00:00
Brendan Abolivier
914e73cdd9
Changelog
2020-01-15 19:36:19 +00:00
Brendan Abolivier
066b9f52b8
Correctly order when selecting before stream ordering
2020-01-15 19:32:47 +00:00
Brendan Abolivier
8363588237
Fix typo
2020-01-15 19:13:22 +00:00
Brendan Abolivier
855af069a4
Fix instantiation of message retention purge jobs
...
When figuring out which topological token to start a purge job at, we
need to do the following:
1. Figure out a timestamp before which events will be purged
2. Select the first stream ordering after that timestamp
3. Select info about the first event after that stream ordering
4. Build a topological token from that info
In some situations (e.g. quiet rooms with a short max_lifetime), there
might not be an event after the stream ordering at step 3, therefore we
abort the purge with the error `No event found`. To mitigate that, this
patch fetches the first event _before_ the stream ordering, instead of
after.
2020-01-15 18:56:18 +00:00
Erik Johnston
19a1aac48c
Fix purge_room admin API ( #6711 )
2020-01-15 18:13:47 +00:00
Andrew Morgan
edc244eec4
Remove duplicate session check in web fallback servlet ( #6702 )
2020-01-15 18:05:18 +00:00
Richard van der Hoff
608bf7d741
Merge pull request #6688 from matrix-org/rav/module_api_extensions
...
Cleanups and additions to the module API
2020-01-15 16:43:13 +00:00
Richard van der Hoff
107f256cd8
Merge branch 'develop' into rav/module_api_extensions
2020-01-15 16:00:24 +00:00
Richard van der Hoff
8f5d7302ac
Implement RedirectException ( #6687 )
...
Allow REST endpoint implemnentations to raise a RedirectException, which will
redirect the user's browser to a given location.
2020-01-15 15:58:55 +00:00
Erik Johnston
28c98e51ff
Add local_current_membership table ( #6655 )
...
Currently we rely on `current_state_events` to figure out what rooms a
user was in and their last membership event in there. However, if the
server leaves the room then the table may be cleaned up and that
information is lost. So lets add a table that separately holds that
information.
2020-01-15 14:59:33 +00:00
Erik Johnston
b5ce7f5874
Process EDUs in parallel with PDUs. ( #6697 )
...
This means that things like to device messages don't get blocked behind
processing PDUs, which can potentially take *ages*.
2020-01-14 14:08:35 +00:00
Erik Johnston
e8b68a4e4b
Fixup synapse.replication to pass mypy checks ( #6667 )
2020-01-14 14:08:06 +00:00
Andrew Morgan
1177d3f3a3
Quarantine media by ID or user ID ( #6681 )
2020-01-13 18:10:43 +00:00
Richard van der Hoff
47f4f493f0
Document more supported endpoints for workers ( #6698 )
2020-01-13 15:32:02 +00:00
Richard van der Hoff
326c893d24
Kill off RegistrationError ( #6691 )
...
This is pretty pointless. Let's just use SynapseError.
2020-01-13 12:48:22 +00:00
Richard van der Hoff
2d07c73777
Don't assign numeric IDs for empty usernames ( #6690 )
...
Fix a bug where we would assign a numeric userid if somebody tried registering
with an empty username
2020-01-13 12:47:30 +00:00
Richard van der Hoff
3cfac9593c
Merge pull request #6689 from matrix-org/rav/saml_mapping_provider_updates
...
Updates to the SAML mapping provider API
2020-01-13 12:44:55 +00:00
Richard van der Hoff
8039685051
Allow additional_resources to implement Resource directly ( #6686 )
...
AdditionalResource really doesn't add any value, and it gets in the way for
resources which want to support child resources or the like. So, if the
resource object already implements the IResource interface, don't bother
wrapping it.
2020-01-13 12:42:44 +00:00
Richard van der Hoff
feee819973
Fix exceptions on requests for non-ascii urls ( #6682 )
...
Fixes #6402
2020-01-13 12:41:51 +00:00
Richard van der Hoff
da4e52544e
comment for run_in_background
2020-01-12 21:53:47 +00:00
Richard van der Hoff
d56e95ea8b
changelog
2020-01-12 21:42:15 +00:00
Richard van der Hoff
dc69a1cf43
Pass client redirect URL into SAML mapping providers
2020-01-12 21:40:49 +00:00
Richard van der Hoff
47e63cc67a
Pass the module_api into the SamlMappingProvider
...
... for consistency with other modules, and because we'll need it sooner or
later and it will be a pain to introduce later.
2020-01-12 21:40:49 +00:00
Richard van der Hoff
96ed33739a
changelog
2020-01-12 21:36:10 +00:00
Richard van der Hoff
01243b98e1
Handle config not being set for synapse plugin modules
...
Some modules don't need any config, so having to define a `config` property
just to keep the loader happy is a bit annoying.
2020-01-12 21:34:36 +00:00
Richard van der Hoff
473d3801b6
Cleanups and additions to the module API
...
Add some useful things, such as error types and logcontext handling, to the
API.
Make `hs` a private member to dissuade people from using it (hopefully
they aren't already).
Add a couple of new methods (`record_user_external_id` and
`generate_short_term_login_token`).
2020-01-12 21:31:44 +00:00
Richard van der Hoff
1d16f5ea0e
Merge pull request #6675 from matrix-org/rav/die_sqlite37_die_die_die
...
Refuse to start if sqlite is older than 3.11.0
2020-01-10 12:17:22 +00:00
Richard van der Hoff
937dea42e7
update install notes for CentOS
2020-01-09 18:11:04 +00:00
Richard van der Hoff
c3843fd075
changelog
2020-01-09 18:11:04 +00:00
Richard van der Hoff
bf46821180
Refuse to start if sqlite is older than 3.11.0
2020-01-09 18:11:04 +00:00
Richard van der Hoff
e48ba84e0b
Check postgres version in check_database
...
this saves doing it on each connection, and will allow us to pass extra options
in.
2020-01-09 18:05:59 +00:00
Richard van der Hoff
e97d1cf001
Modify check_database to take a connection rather than a cursor
...
We might not need the cursor at all.
2020-01-09 18:05:50 +00:00
Erik Johnston
645b1f0ea1
Merge branch 'master' of github.com:matrix-org/synapse into develop
2020-01-09 17:14:02 +00:00
Erik Johnston
c2ba994dbb
Add note about log_file no longer be accepted ( #6674 )
2020-01-09 17:13:36 +00:00
Manuel Stahl
d2906fe666
Allow admin users to create or modify users without a shared secret ( #6495 )
...
Signed-off-by: Manuel Stahl <manuel.stahl@awesome-technologies.de >
2020-01-09 13:31:00 +00:00
Erik Johnston
d773290cb1
Merge branch 'master' into develop
2020-01-09 13:25:48 +00:00
Erik Johnston
9dfcf47e9b
Fixup changelog
2020-01-09 11:40:27 +00:00
Erik Johnston
24b2c940fb
1.8.0
2020-01-09 11:39:29 +00:00
Erik Johnston
7c232bd98b
Merge pull request #6664 from matrix-org/erikj/media_admin_apis
...
Fix media repo admin APIs when using a media worker.
2020-01-08 15:50:06 +00:00
Erik Johnston
d74054afda
Shuffle the code
2020-01-08 14:57:45 +00:00
Erik Johnston
bca3455b38
Comments
2020-01-08 14:27:35 +00:00
Erik Johnston
187dc6ad02
Do not rely on streaming events, as media repo doesn't
2020-01-08 14:24:28 +00:00
Brendan Abolivier
e16521faab
Merge pull request #6665 from matrix-org/babolivier/retention_doc_typo
...
Fix typo in message retention policies doc
2020-01-08 13:57:02 +00:00
Erik Johnston
4e2a072a05
Newsfile
2020-01-08 13:28:19 +00:00
Brendan Abolivier
32ad2a3349
Changelog
2020-01-08 13:28:12 +00:00
Brendan Abolivier
3889fcd9d7
Fix typo in message retention policies doc
2020-01-08 13:27:29 +00:00
Richard van der Hoff
b064a41291
Merge remote-tracking branch 'origin/release-v1.8.0' into develop
2020-01-08 13:27:17 +00:00
Manuel Stahl
7caaa29daa
Fix GET request on /_synapse/admin/v2/users endpoint ( #6563 )
...
Fixes #6552
2020-01-08 13:26:40 +00:00
Erik Johnston
1adf27c82a
Import RoomStore in media worker to fix admin APIs
2020-01-08 13:26:20 +00:00
Erik Johnston
3cf7d6d5b6
Move media admin store functions to worker store
2020-01-08 13:26:20 +00:00
Richard van der Hoff
573fee759c
Back out ill-advised notary server hackery ( #6657 )
...
This was ill-advised. We can't modify verify_keys here, because the response
object has already been signed by the requested key.
Furthermore, it's somewhat unnecessary because existing versions of Synapse
(which get upset that the notary key isn't present in verify_keys) will fall
back to a direct fetch via `/key/v2/server`.
Also: more tests for fetching keys via perspectives: it would be nice if we actually tested when our fetcher can't talk to our notary impl.
2020-01-08 13:24:10 +00:00
Brendan Abolivier
cff1cb8685
Merge pull request #6624 from matrix-org/babolivier/retention_doc
...
Add complete documentation of the message retention policies support
2020-01-08 11:24:47 +00:00
Fabian Meyer
dd57715de2
contrib/docker-compose: fixing mount that overrides containers' /etc ( #6656 )
...
The mount in the form of ./matrix-config:/etc overwrites the contents of the container /etc folder. Since all valid ca certificates are stored in /etc, the synapse.push.httppusher, for example, cannot validate the certificate from matrix.org.
2020-01-08 07:25:05 +00:00
Matthew Hodgson
91718b3f23
typo
2020-01-07 15:46:04 +00:00
Erik Johnston
be29ed7ad8
Correctly proxy remote group HTTP errors. ( #6654 )
...
e.g. if remote returns a 404 then that shouldn't be treated as an error
but should be proxied through.
2020-01-07 15:36:41 +00:00
Brendan Abolivier
2b6b7f482a
Merge pull request #6621 from matrix-org/babolivier/purge_job_config_typo
...
Fix a typo in the purge jobs configuration example
2020-01-07 16:17:40 +01:00
Brendan Abolivier
3675fb9bc6
Fix reference
2020-01-07 15:15:16 +00:00
Brendan Abolivier
7ba98a2874
Incorporate review
2020-01-07 15:14:33 +00:00
Brendan Abolivier
4be582d7c8
Merge branch 'develop' into babolivier/retention_doc
2020-01-07 15:07:19 +00:00
Brendan Abolivier
01fbd95736
Apply suggestions from code review
...
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2020-01-07 15:59:38 +01:00
Brendan Abolivier
03edfc5850
Update changelog.d/6624.doc
...
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2020-01-07 15:59:05 +01:00
Brendan Abolivier
391fb47791
Reword
2020-01-07 14:54:32 +00:00
Brendan Abolivier
3a86477162
Change the example from 5min to 12h
...
Have a purge job running every 5min is probably not something we want to advise admins to do as a sort-of default.
2020-01-07 14:53:07 +00:00
Erik Johnston
235d977e1f
Fixup changelog
2020-01-07 14:45:54 +00:00
Erik Johnston
2f1c175936
Fixup changelog
2020-01-07 14:39:35 +00:00
Erik Johnston
06958d5bb1
Fixup changelog
2020-01-07 14:38:40 +00:00
Erik Johnston
7f0e706ebf
1.8.0rc1
2020-01-07 14:31:13 +00:00
Brendan Abolivier
0ab5853ec9
Merge pull request #6652 from matrix-org/babolivier/depth_missing_events
...
Fix conditions failing if min_depth = 0
2020-01-07 15:22:07 +01:00
Richard van der Hoff
85db7f73be
Add a background update to clear tombstoned rooms from the directory ( #6648 )
...
* Add a background update to clear tombstoned rooms from the directory
* use the ABC metaclass
2020-01-07 14:18:43 +00:00
Richard van der Hoff
9824a39d80
Async/await for background updates ( #6647 )
...
so that bg update routines can be async
2020-01-07 14:12:42 +00:00
Richard van der Hoff
d20c346544
port BackgroundUpdateTestCase to HomeserverTestCase ( #6653 )
2020-01-07 14:09:07 +00:00
Richard van der Hoff
1ff5491117
Merge pull request #6645 from matrix-org/rav/fix_synchrotron_error
...
Fix exceptions in the synchrotron worker log when events are rejected.
2020-01-07 14:02:14 +00:00
Brendan Abolivier
1f2a5923d4
Changelog
2020-01-07 13:12:17 +00:00
Brendan Abolivier
cd428a93e2
Fix conditions failing if min_depth = 0
...
This could result in Synapse not fetching prev_events for new events in the room if it has missed some events.
2020-01-07 12:08:58 +00:00
Richard van der Hoff
1807db5e73
Merge pull request #6629 from matrix-org/rav/kill_event_reference_hashes
...
Remove a bunch of unused code from event creation
2020-01-06 17:46:31 +00:00
Richard van der Hoff
055e6fbaa2
changelog
2020-01-06 17:17:40 +00:00
Richard van der Hoff
26c5d3d398
Fix exceptions in log when rejected event is replicated
2020-01-06 17:16:28 +00:00
Richard van der Hoff
c74de81bfc
async/await for SyncReplicationHandler.process_and_notify
2020-01-06 17:14:28 +00:00
Richard van der Hoff
bc42da4ab8
Clarify documentation on get_event* methods
...
Make it clearer how they behave in the face of rejected and/or missing events.
2020-01-06 17:12:06 +00:00
Richard van der Hoff
ba897a7590
Fix some test failures when frozen_dicts are enabled ( #6642 )
...
Fixes #4026
2020-01-06 15:22:46 +00:00
Erik Johnston
9f6c1befbb
Add experimental 'databases' config ( #6580 )
2020-01-06 14:44:01 +00:00
Richard van der Hoff
ab4b4ee6a7
Fix an error which was thrown by the PresenceHandler _on_shutdown handler. ( #6640 )
2020-01-06 14:34:02 +00:00
Richard van der Hoff
550b2946d8
changelog
2020-01-06 13:45:33 +00:00
Richard van der Hoff
a7d2e5b37f
Remove unused get_latest_event_ids_and_hashes_in_room
2020-01-06 13:45:33 +00:00
Richard van der Hoff
dc41fbf0dd
Remove unused get_prev_events_and_hashes_for_room
2020-01-06 13:45:33 +00:00
Richard van der Hoff
38e0829a4c
Remove unused hashes and depths from _update_membership params
2020-01-06 13:45:33 +00:00
Richard van der Hoff
3bef62488e
Remove unused hashes and depths from create_event params
2020-01-06 13:45:33 +00:00
Richard van der Hoff
66ca914dc0
Remove unused hashes and depths from create_new_client_event params
2020-01-06 13:45:33 +00:00
Richard van der Hoff
15720092ac
replace get_prev_events_and_hashes_for_room with get_prev_events_for_room in create_new_client_event
2020-01-06 13:45:33 +00:00
Richard van der Hoff
5a04781643
rename get_prev_events_for_room to get_prev_events_and_hashes_for_room
...
... to make way for a new method which just returns the event ids
2020-01-06 13:45:33 +00:00
Richard van der Hoff
4b36b482e0
Fix exception when fetching notary server's old keys ( #6625 )
...
Lift the restriction that *all* the keys used for signing v2 key responses be
present in verify_keys.
Fixes #6596 .
2020-01-06 12:33:56 +00:00
Richard van der Hoff
18674eebb1
Workaround for error when fetching notary's own key ( #6620 )
...
* Kill off redundant SynapseRequestFactory
We already get the Site via the Channel, so there's no need for a dedicated
RequestFactory: we can just use the right constructor.
* Workaround for error when fetching notary's own key
As a notary server, when we return our own keys, include all of our signing
keys in verify_keys.
This is a workaround for #6596 .
2020-01-06 12:28:58 +00:00
Andrew Morgan
01c3c6c929
Fix power levels being incorrectly set in old and new rooms after a room upgrade ( #6633 )
...
Modify a copy of an upgraded room's PL before sending to the new room
2020-01-06 09:53:07 +00:00
Richard van der Hoff
08815566bc
Automate generation of the sample and debian log configs ( #6627 )
2020-01-03 17:14:00 +00:00
Richard van der Hoff
e484101306
Raise an error if someone tries to use the log_file config option ( #6626 )
...
This has caused some confusion for people who didn't notice it going away.
2020-01-03 17:11:29 +00:00
Richard van der Hoff
98247c4a0e
Remove unused, undocumented "content repo" resource ( #6628 )
...
This looks like it got half-killed back in #888 .
Fixes #6567 .
2020-01-03 17:10:52 +00:00
Richard van der Hoff
b6b57ecb4e
Kill off redundant SynapseRequestFactory ( #6619 )
...
We already get the Site via the Channel, so there's no need for a dedicated
RequestFactory: we can just use the right constructor.
2020-01-03 14:19:48 +00:00
Richard van der Hoff
6964ea095b
Reduce the reconnect time when replication fails. ( #6617 )
2020-01-03 14:19:09 +00:00
Brendan Abolivier
b7dec300b7
Fix vacuum instructions for sqlite
2020-01-03 13:51:59 +01:00
Brendan Abolivier
51b8a21f0c
Rename changelog
2020-01-03 13:49:12 +01:00
Brendan Abolivier
9279a2c4e4
Add a complete documentation of the message retention policies support
2020-01-03 13:45:03 +01:00
Brendan Abolivier
9c59bc59c8
Changelog
2020-01-03 13:00:32 +01:00
Brendan Abolivier
dd2954f78d
Update sample config
2020-01-03 12:58:12 +01:00
Brendan Abolivier
4efe1d4d3f
Fix a typo in the purge jobs configuration example
2020-01-03 12:57:24 +01:00
ewaf1
0495097a7f
Added the section 'Configuration' in /docs/turn-howto.md ( #6614 )
...
put the 2nd part of the "source installation"-section into a new section, because it also applies to Debian packages
2020-01-02 10:41:30 +00:00
Aaron Raimist
32779b59fa
Reword sections of federate.md that explained delegation at time of Synapse 1.0 transition ( #6601 )
...
* Remove sections of federate.md explaining delegation at time of Synapse 1.0 transition
Signed-off-by: Aaron Raimist <aaron@raim.ist >
* Add changelog
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2020-01-02 10:28:20 +00:00
Richard van der Hoff
dc96943d51
Merge branch 'master' into develop
2019-12-31 11:01:06 +00:00
Richard van der Hoff
77661ce81a
1.7.3
2019-12-31 10:45:12 +00:00
Richard van der Hoff
92eac974b9
Hacks to work around #6605 ( #6608 )
...
When we have an event which refers to non-existent auth_events, ignore said events rather than exploding in a ball of fire.
Fixes #6605 .
2019-12-31 10:41:44 +00:00
Richard van der Hoff
f03c877b32
sample log config
...
TODO: automate generation of this
2019-12-24 17:39:58 +00:00
dopple
b2db382841
Update reverse proxy file name ( #6590 )
...
s/reverse_proxy.rst/reverse_proxy.md/
2019-12-22 22:17:09 +00:00
dopple
7c6b853558
Update reverse proxy file name ( #6590 )
...
s/reverse_proxy.rst/reverse_proxy.md/
2019-12-22 22:16:56 +00:00
Richard van der Hoff
56ad230efa
Merge branch 'master' into develop
2019-12-20 11:11:34 +00:00
Richard van der Hoff
138708608b
Merge tag 'v1.7.2'
...
Synapse 1.7.2 (2019-12-20)
==========================
This release fixes some regressions introduced in Synapse 1.7.0 and 1.7.1.
Bugfixes
--------
- Fix a regression introduced in Synapse 1.7.1 which caused errors when attempting to backfill rooms over federation. ([\#6576](https://github.com/matrix-org/synapse/issues/6576 ))
- Fix a bug introduced in Synapse 1.7.0 which caused an error on startup when upgrading from versions before 1.3.0. ([\#6578](https://github.com/matrix-org/synapse/issues/6578 ))
2019-12-20 11:09:59 +00:00
Richard van der Hoff
29794c6bc8
1.7.2
2019-12-20 10:58:07 +00:00
Erik Johnston
75d8f26ac8
Split state groups into a separate data store ( #6296 )
2019-12-20 10:48:24 +00:00
Richard van der Hoff
4caab0e95e
Backport fixes to sqlite upgrade from develop ( #6578 )
...
Only run prepare_database on connection for in-memory databases.
Fixes #6569 .
2019-12-20 10:46:46 +00:00
Erik Johnston
fa780e9721
Change EventContext to use the Storage class ( #6564 )
2019-12-20 10:32:02 +00:00
Richard van der Hoff
03d3792f3c
Fix exceptions when attempting to backfill ( #6576 )
...
Fixes #6575
2019-12-20 09:55:45 +00:00
Erik Johnston
0b5dbadd96
Explode on duplicate delta file names. ( #6565 )
2019-12-19 15:07:37 +00:00
Erik Johnston
3d46124ad0
Port some admin handlers to async/await ( #6559 )
2019-12-19 15:07:28 +00:00
Richard van der Hoff
bca30cefee
Improve diagnostics on database upgrade failure ( #6570 )
...
`Failed to upgrade database` is not helpful, and it's unlikely that UPGRADE.rst
has anything useful.
2019-12-19 14:53:15 +00:00
Richard van der Hoff
0b794cbd7b
Fix sdnotify with acme enabled ( #6571 )
...
If acme was enabled, the sdnotify startup hook would never be run because we
would try to add it to a hook which had already fired.
There's no need to delay it: we can sdnotify as soon as we've started the
listeners.
2019-12-19 14:52:52 +00:00
Richard van der Hoff
b95b762560
Add an export_signing_key script ( #6546 )
...
I want to do some key rotation, and it is silly that we don't have a way to do
this.
2019-12-19 11:11:14 +00:00
Richard van der Hoff
d6752ce5da
Clean up startup for the pusher ( #6558 )
...
* Remove redundant python2 support code
`str.decode()` doesn't exist on python3, so presumably this code was doing
nothing
* Filter out pushers with corrupt data
When we get a row with unparsable json, drop the row, rather than returning a
row with null `data`, which will then cause an explosion later on.
* Improve logging when we can't start a pusher
Log the ID to help us understand the problem
* Make email pusher setup more robust
We know we'll have a `data` member, since that comes from the database. What we
*don't* know is if that is a dict, and if that has a `brand` member, and if
that member is a string.
2019-12-18 14:26:58 +00:00
Andrew Morgan
7963ca83cb
Add delta file to fix missing default table data ( #6555 )
2019-12-18 11:13:33 +00:00
Erik Johnston
2284eb3a53
Add database config class ( #6513 )
...
This encapsulates config for a given database and is the way to get new
connections.
2019-12-18 10:45:12 +00:00
Richard van der Hoff
91ccfe9f37
Merge branch 'master' into develop
2019-12-18 10:16:39 +00:00
Richard van der Hoff
4154637834
Merge tag 'v1.7.1'
...
Synapse 1.7.1 (2019-12-18)
==========================
This release includes several security fixes as well as a fix to a bug exposed by the security fixes. Administrators are encouraged to upgrade as soon as possible.
Security updates
----------------
- Fix a bug which could cause room events to be incorrectly authorized using events from a different room. ([\#6501](https://github.com/matrix-org/synapse/issues/6501 ), [\#6503](https://github.com/matrix-org/synapse/issues/6503 ), [\#6521](https://github.com/matrix-org/synapse/issues/6521 ), [\#6524](https://github.com/matrix-org/synapse/issues/6524 ), [\#6530](https://github.com/matrix-org/synapse/issues/6530 ), [\#6531](https://github.com/matrix-org/synapse/issues/6531 ))
- Fix a bug causing responses to the `/context` client endpoint to not use the pruned version of the event. ([\#6553](https://github.com/matrix-org/synapse/issues/6553 ))
- Fix a cause of state resets in room versions 2 onwards. ([\#6556](https://github.com/matrix-org/synapse/issues/6556 ), [\#6560](https://github.com/matrix-org/synapse/issues/6560 ))
Bugfixes
--------
- Fix a bug which could cause the federation server to incorrectly return errors when handling certain obscure event graphs. ([\#6526](https://github.com/matrix-org/synapse/issues/6526 ), [\#6527](https://github.com/matrix-org/synapse/issues/6527 ))
2019-12-18 10:14:49 +00:00
Richard van der Hoff
6e8f8e14f2
Merge release-v1.7.1 into develop
2019-12-18 09:51:51 +00:00
Richard van der Hoff
e156c86a7f
too many parens
2019-12-18 09:40:03 +00:00
Richard van der Hoff
d656e91fc2
1.7.1
2019-12-18 09:38:08 +00:00
Erik Johnston
5029422530
Fix bug where we added duplicate event IDs as auth_events ( #6560 )
2019-12-17 15:06:08 +00:00
Erik Johnston
02553901ce
Remove unused get_pagination_rows methods. ( #6557 )
...
Remove unused get_pagination_rows methods
2019-12-17 11:44:32 +00:00
Erik Johnston
5ca2cfadc3
Add auth events as per spec. ( #6556 )
...
Previously we tried to be clever and filter out some unnecessary event
IDs to keep the auth chain small, but that had some annoying
interactions with state res v2 so we stop doing that for now.
2019-12-16 17:05:01 +00:00
Erik Johnston
3fbe5b7ec3
Add auth events as per spec. ( #6556 )
...
Previously we tried to be clever and filter out some unnecessary event
IDs to keep the auth chain small, but that had some annoying
interactions with state res v2 so we stop doing that for now.
2019-12-16 16:59:32 +00:00
Brendan Abolivier
6316530366
Merge pull request #6553 from matrix-org/babolivier/fix-context-filter
...
Use the filtered version of an event when responding to /context requests for that event
2019-12-16 16:24:10 +00:00
Will Hunt
bfb95654c9
Add option to allow profile queries without sharing a room ( #6523 )
2019-12-16 16:11:55 +00:00
Brendan Abolivier
7f8d8fd2e2
Merge branch 'babolivier/fix-context-filter' of github.com:matrix-org/synapse into babolivier/fix-context-filter
2019-12-16 16:01:32 +00:00
Brendan Abolivier
a820069549
Incorporate review
2019-12-16 16:00:18 +00:00
Brendan Abolivier
284e690aa0
Update changelog.d/6553.bugfix
...
Co-Authored-By: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2019-12-16 14:56:05 +00:00
Brendan Abolivier
a29420f9f4
Lint
2019-12-16 14:55:50 +00:00
Brendan Abolivier
596dd9914d
Add test case
2019-12-16 14:53:21 +00:00
Richard van der Hoff
bbb75ff6ee
Exclude rejected state events when calculating state at backwards extrems ( #6527 )
...
This fixes a weird bug where, if you were determined enough, you could end up with a rejected event forming part of the state at a backwards-extremity. Authing that backwards extrem would then lead to us trying to pull the rejected event from the db (with allow_rejected=False), which would fail with a 404.
2019-12-16 14:07:29 +00:00
Richard van der Hoff
ff773ff724
Persist auth/state events at backwards extremities when we fetch them ( #6526 )
...
The main point here is to make sure that the state returned by _get_state_in_room has been authed before we try to use it as state in the room.
2019-12-16 14:07:11 +00:00
Richard van der Hoff
83895316d4
sanity-checking for events used in state res ( #6531 )
...
When we perform state resolution, check that all of the events involved are in
the right room.
2019-12-16 13:53:53 +00:00
Richard van der Hoff
6577f2d887
Sanity-check room ids in event auth ( #6530 )
...
When we do an event auth operation, check that all of the events involved are
in the right room.
2019-12-16 13:47:34 +00:00
Richard van der Hoff
35bbe4ca79
Check the room_id of events when fetching room state/auth ( #6524 )
...
When we request the state/auth_events to populate a backwards extremity (on
backfill or in the case of missing events in a transaction push), we should
check that the returned events are in the right room rather than blindly using
them in the room state or auth chain.
Given that _get_events_from_store_or_dest takes a room_id, it seems clear that
it should be sanity-checking the room_id of the requested events, so let's do
it there.
2019-12-16 13:47:07 +00:00
Richard van der Hoff
20d5ba16e6
Add include_event_in_state to _get_state_for_room ( #6521 )
...
Make it return the state *after* the requested event, rather than the one
before it. This is a bit easier and requires fewer calls to
get_events_from_store_or_dest.
2019-12-16 13:26:12 +00:00
Richard van der Hoff
be294d6fde
Move get_state methods into FederationHandler ( #6503 )
...
This is a non-functional refactor as a precursor to some other work.
2019-12-16 13:20:21 +00:00
Richard van der Hoff
4c7b1bb6cc
Refactor get_events_from_store_or_dest to return a dict ( #6501 )
...
There was a bunch of unnecessary conversion back and forth between dict and
list going on here. We can simplify a bunch of the code.
2019-12-16 13:19:32 +00:00
Richard van der Hoff
6920d88892
Exclude rejected state events when calculating state at backwards extrems ( #6527 )
...
This fixes a weird bug where, if you were determined enough, you could end up with a rejected event forming part of the state at a backwards-extremity. Authing that backwards extrem would then lead to us trying to pull the rejected event from the db (with allow_rejected=False), which would fail with a 404.
2019-12-16 13:14:37 +00:00
Richard van der Hoff
bc7de87650
Persist auth/state events at backwards extremities when we fetch them ( #6526 )
...
The main point here is to make sure that the state returned by _get_state_in_room has been authed before we try to use it as state in the room.
2019-12-16 12:26:28 +00:00
Brendan Abolivier
8b9f5c21c3
Changelog
2019-12-16 12:19:35 +00:00
Brendan Abolivier
ac87ddb242
Update the documentation of the filtering function
2019-12-16 12:15:37 +00:00
Brendan Abolivier
487f1bb49d
Use the filtered version of an event when responding to /context requests for that event
...
Sometimes the filtering function can return a pruned version of an event (on top of either the event itself or an empty list), if it thinks the user should be able to see that there's an event there but not the content of that event. Therefore, the previous logic of 'if filtered is empty then we can use the event we retrieved from the database' is flawed, and we should use the event returned by the filtering function.
2019-12-16 12:14:12 +00:00
Werner Sembach
9d173b312c
Automatically delete empty groups/communities ( #6453 )
...
Signed-off-by: Werner Sembach <werner.sembach@fau.de >
2019-12-16 12:12:40 +00:00
Andrew Morgan
0b90fc6ed2
Document Shutdown Room admin API ( #6541 )
2019-12-13 15:28:48 +00:00
Richard van der Hoff
1da15f05f5
sanity-checking for events used in state res ( #6531 )
...
When we perform state resolution, check that all of the events involved are in
the right room.
2019-12-13 12:55:32 +00:00
Richard van der Hoff
971a0702b5
Sanity-check room ids in event auth ( #6530 )
...
When we do an event auth operation, check that all of the events involved are
in the right room.
2019-12-13 11:44:41 +00:00
Erik Johnston
5cadbd9ebb
Merge pull request #6537 from matrix-org/erikj/bump_mypy_version
...
Bump mypy version
2019-12-13 11:32:53 +00:00
Erik Johnston
f46e05d053
Merge branch 'master' into develop
2019-12-13 10:55:47 +00:00
Erik Johnston
bee1982d17
Merge tag 'v1.7.0'
...
Synapse 1.7.0 (2019-12-13)
==========================
This release changes the default settings so that only local authenticated users can query the server's room directory. See the [upgrade notes](UPGRADE.rst#upgrading-to-v170) for details.
Support for SQLite versions before 3.11 is now deprecated. A future release will refuse to start if used with an SQLite version before 3.11.
Administrators are reminded that SQLite should not be used for production instances. Instructions for migrating to Postgres are available [here](docs/postgres.md). A future release of synapse will, by default, disable federation for servers using SQLite.
No significant changes since 1.7.0rc2.
Synapse 1.7.0rc2 (2019-12-11)
=============================
Bugfixes
--------
- Fix incorrect error message for invalid requests when setting user's avatar URL. ([\#6497](https://github.com/matrix-org/synapse/issues/6497 ))
- Fix support for SQLite 3.7. ([\#6499](https://github.com/matrix-org/synapse/issues/6499 ))
- Fix regression where sending email push would not work when using a pusher worker. ([\#6507](https://github.com/matrix-org/synapse/issues/6507 ), [\#6509](https://github.com/matrix-org/synapse/issues/6509 ))
Synapse 1.7.0rc1 (2019-12-09)
=============================
Features
--------
- Implement per-room message retention policies. ([\#5815](https://github.com/matrix-org/synapse/issues/5815 ), [\#6436](https://github.com/matrix-org/synapse/issues/6436 ))
- Add etag and count fields to key backup endpoints to help clients guess if there are new keys. ([\#5858](https://github.com/matrix-org/synapse/issues/5858 ))
- Add `/admin/v2/users` endpoint with pagination. Contributed by Awesome Technologies Innovationslabor GmbH. ([\#5925](https://github.com/matrix-org/synapse/issues/5925 ))
- Require User-Interactive Authentication for `/account/3pid/add`, meaning the user's password will be required to add a third-party ID to their account. ([\#6119](https://github.com/matrix-org/synapse/issues/6119 ))
- Implement the `/_matrix/federation/unstable/net.atleastfornow/state/<context>` API as drafted in MSC2314. ([\#6176](https://github.com/matrix-org/synapse/issues/6176 ))
- Configure privacy-preserving settings by default for the room directory. ([\#6355](https://github.com/matrix-org/synapse/issues/6355 ))
- Add ephemeral messages support by partially implementing [MSC2228](https://github.com/matrix-org/matrix-doc/pull/2228 ). ([\#6409](https://github.com/matrix-org/synapse/issues/6409 ))
- Add support for [MSC 2367](https://github.com/matrix-org/matrix-doc/pull/2367 ), which allows specifying a reason on all membership events. ([\#6434](https://github.com/matrix-org/synapse/issues/6434 ))
Bugfixes
--------
- Transfer non-standard power levels on room upgrade. ([\#6237](https://github.com/matrix-org/synapse/issues/6237 ))
- Fix error from the Pillow library when uploading RGBA images. ([\#6241](https://github.com/matrix-org/synapse/issues/6241 ))
- Correctly apply the event filter to the `state`, `events_before` and `events_after` fields in the response to `/context` requests. ([\#6329](https://github.com/matrix-org/synapse/issues/6329 ))
- Fix caching devices for remote users when using workers, so that we don't attempt to refetch (and potentially fail) each time a user requests devices. ([\#6332](https://github.com/matrix-org/synapse/issues/6332 ))
- Prevent account data syncs getting lost across TCP replication. ([\#6333](https://github.com/matrix-org/synapse/issues/6333 ))
- Fix bug: TypeError in `register_user()` while using LDAP auth module. ([\#6406](https://github.com/matrix-org/synapse/issues/6406 ))
- Fix an intermittent exception when handling read-receipts. ([\#6408](https://github.com/matrix-org/synapse/issues/6408 ))
- Fix broken guest registration when there are existing blocks of numeric user IDs. ([\#6420](https://github.com/matrix-org/synapse/issues/6420 ))
- Fix startup error when http proxy is defined. ([\#6421](https://github.com/matrix-org/synapse/issues/6421 ))
- Fix error when using synapse_port_db on a vanilla synapse db. ([\#6449](https://github.com/matrix-org/synapse/issues/6449 ))
- Fix uploading multiple cross signing signatures for the same user. ([\#6451](https://github.com/matrix-org/synapse/issues/6451 ))
- Fix bug which lead to exceptions being thrown in a loop when a cross-signed device is deleted. ([\#6462](https://github.com/matrix-org/synapse/issues/6462 ))
- Fix `synapse_port_db` not exiting with a 0 code if something went wrong during the port process. ([\#6470](https://github.com/matrix-org/synapse/issues/6470 ))
- Improve sanity-checking when receiving events over federation. ([\#6472](https://github.com/matrix-org/synapse/issues/6472 ))
- Fix inaccurate per-block Prometheus metrics. ([\#6491](https://github.com/matrix-org/synapse/issues/6491 ))
- Fix small performance regression for sending invites. ([\#6493](https://github.com/matrix-org/synapse/issues/6493 ))
- Back out cross-signing code added in Synapse 1.5.0, which caused a performance regression. ([\#6494](https://github.com/matrix-org/synapse/issues/6494 ))
Improved Documentation
----------------------
- Update documentation and variables in user contributed systemd reference file. ([\#6369](https://github.com/matrix-org/synapse/issues/6369 ), [\#6490](https://github.com/matrix-org/synapse/issues/6490 ))
- Fix link in the user directory documentation. ([\#6388](https://github.com/matrix-org/synapse/issues/6388 ))
- Add build instructions to the docker readme. ([\#6390](https://github.com/matrix-org/synapse/issues/6390 ))
- Switch Ubuntu package install recommendation to use python3 packages in INSTALL.md. ([\#6443](https://github.com/matrix-org/synapse/issues/6443 ))
- Write some docs for the quarantine_media api. ([\#6458](https://github.com/matrix-org/synapse/issues/6458 ))
- Convert CONTRIBUTING.rst to markdown (among other small fixes). ([\#6461](https://github.com/matrix-org/synapse/issues/6461 ))
Deprecations and Removals
-------------------------
- Remove admin/v1/users_paginate endpoint. Contributed by Awesome Technologies Innovationslabor GmbH. ([\#5925](https://github.com/matrix-org/synapse/issues/5925 ))
- Remove fallback for federation with old servers which lack the /federation/v1/state_ids API. ([\#6488](https://github.com/matrix-org/synapse/issues/6488 ))
Internal Changes
----------------
- Add benchmarks for structured logging and improve output performance. ([\#6266](https://github.com/matrix-org/synapse/issues/6266 ))
- Improve the performance of outputting structured logging. ([\#6322](https://github.com/matrix-org/synapse/issues/6322 ))
- Refactor some code in the event authentication path for clarity. ([\#6343](https://github.com/matrix-org/synapse/issues/6343 ), [\#6468](https://github.com/matrix-org/synapse/issues/6468 ), [\#6480](https://github.com/matrix-org/synapse/issues/6480 ))
- Clean up some unnecessary quotation marks around the codebase. ([\#6362](https://github.com/matrix-org/synapse/issues/6362 ))
- Complain on startup instead of 500'ing during runtime when `public_baseurl` isn't set when necessary. ([\#6379](https://github.com/matrix-org/synapse/issues/6379 ))
- Add a test scenario to make sure room history purges don't break `/messages` in the future. ([\#6392](https://github.com/matrix-org/synapse/issues/6392 ))
- Clarifications for the email configuration settings. ([\#6423](https://github.com/matrix-org/synapse/issues/6423 ))
- Add more tests to the blacklist when running in worker mode. ([\#6429](https://github.com/matrix-org/synapse/issues/6429 ))
- Refactor data store layer to support multiple databases in the future. ([\#6454](https://github.com/matrix-org/synapse/issues/6454 ), [\#6464](https://github.com/matrix-org/synapse/issues/6464 ), [\#6469](https://github.com/matrix-org/synapse/issues/6469 ), [\#6487](https://github.com/matrix-org/synapse/issues/6487 ))
- Port synapse.rest.client.v1 to async/await. ([\#6482](https://github.com/matrix-org/synapse/issues/6482 ))
- Port synapse.rest.client.v2_alpha to async/await. ([\#6483](https://github.com/matrix-org/synapse/issues/6483 ))
- Port SyncHandler to async/await. ([\#6484](https://github.com/matrix-org/synapse/issues/6484 ))
2019-12-13 10:55:33 +00:00
Erik Johnston
ba57a45644
More rewording of changelog.
2019-12-13 10:52:29 +00:00
Erik Johnston
bac1578013
Reword changelog
2019-12-13 10:46:31 +00:00
Erik Johnston
d046f367a4
Add deprecation notes
2019-12-13 10:36:35 +00:00
Erik Johnston
f5aeea9e89
1.7.0
2019-12-13 10:19:53 +00:00
Richard van der Hoff
4ce05ec171
Adjust the sytest blacklist for worker mode ( #6538 )
...
Remove tests that got blacklisted while torturing was enabled, and add one that
fails.
2019-12-13 10:15:20 +00:00
Erik Johnston
caa52836e4
Merge pull request #6496 from matrix-org/erikj/initial_sync_asnyc
...
Port synapse.handlers.initial_sync to async/await
2019-12-13 10:01:51 +00:00
Erik Johnston
7e67cfc87d
Merge pull request #6534 from matrix-org/erikj/extend_mypy
...
Include more folders in mypy
2019-12-12 17:21:42 +00:00
Hubert Chathi
cb2db17994
look up cross-signing keys from the DB in bulk ( #6486 )
2019-12-12 12:03:28 -05:00
Andrew Morgan
5bfd8855d6
Fix redacted events being returned in search results ordered by "recent" ( #6522 )
2019-12-12 15:53:49 +00:00
Erik Johnston
5056d6d90a
Newsfile
2019-12-12 15:22:46 +00:00
Erik Johnston
495005360c
Bump version of mypy
2019-12-12 15:21:12 +00:00
Erik Johnston
c965253e4b
Newsfile
2019-12-12 14:54:03 +00:00
Erik Johnston
324d4f61b8
Include more folders in mypy
2019-12-12 14:52:11 +00:00
Richard van der Hoff
25f1244329
Check the room_id of events when fetching room state/auth ( #6524 )
...
When we request the state/auth_events to populate a backwards extremity (on
backfill or in the case of missing events in a transaction push), we should
check that the returned events are in the right room rather than blindly using
them in the room state or auth chain.
Given that _get_events_from_store_or_dest takes a room_id, it seems clear that
it should be sanity-checking the room_id of the requested events, so let's do
it there.
2019-12-12 12:57:45 +00:00
Erik Johnston
b8e4b39b69
Merge pull request #6511 from matrix-org/erikj/remove_db_config_from_apps
...
Move database config from apps into HomeServer object
2019-12-12 10:37:56 +00:00
Erik Johnston
cfcfb57e58
Add new config param to docstring and add types
2019-12-11 17:27:46 +00:00
Erik Johnston
6828b47c45
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/initial_sync_asnyc
2019-12-11 17:01:41 +00:00
Richard van der Hoff
2045356517
Add include_event_in_state to _get_state_for_room ( #6521 )
...
Make it return the state *after* the requested event, rather than the one
before it. This is a bit easier and requires fewer calls to
get_events_from_store_or_dest.
2019-12-11 16:37:51 +00:00
Richard van der Hoff
894d2addac
Merge pull request #6517 from matrix-org/rav/event_auth/13
...
Port some of FederationHandler to async/await
2019-12-11 16:36:06 +00:00
Mark Nowiasz
58fdcbdfe7
Update workers.md to make media_repository work (again) ( #6519 )
2019-12-11 16:23:38 +00:00
Erik Johnston
31905a518e
Merge pull request #6504 from matrix-org/erikj/account_validity_async_await
...
Port handlers.account_validity to async/await.
2019-12-11 14:49:26 +00:00
Richard van der Hoff
5324bc20a6
changelog
2019-12-11 14:39:26 +00:00
Richard van der Hoff
6637d90d77
convert to async: FederationHandler._process_received_pdu
...
also fix user_joined_room to consistently return deferreds
2019-12-11 14:39:26 +00:00
Richard van der Hoff
4db394a4b3
convert to async: FederationHandler._get_state_for_room
...
... and _get_events_from_store_or_dest
2019-12-11 14:39:26 +00:00
Richard van der Hoff
e77237b935
convert to async: FederationHandler.on_receive_pdu
...
and associated functions:
* on_receive_pdu
* handle_queued_pdus
* get_missing_events_for_pdu
2019-12-11 14:39:26 +00:00
Richard van der Hoff
7712e751b8
Convert federation backfill to async
...
PaginationHandler.get_messages is only called by RoomMessageListRestServlet,
which is async.
Chase the code path down from there:
- FederationHandler.maybe_backfill (and nested try_backfill)
- FederationHandler.backfill
2019-12-11 14:39:25 +00:00
Richard van der Hoff
7c429f92d6
Clean up some logging ( #6515 )
...
This just makes some of the logging easier to follow when things start going
wrong.
2019-12-11 14:32:25 +00:00
Erik Johnston
adb3a873fd
Merge tag 'v1.7.0rc2' into develop
...
Synapse 1.7.0rc2 (2019-12-11)
=============================
Bugfixes
--------
- Fix incorrect error message for invalid requests when setting user's avatar URL. ([\#6497](https://github.com/matrix-org/synapse/issues/6497 ))
- Fix support for SQLite 3.7. ([\#6499](https://github.com/matrix-org/synapse/issues/6499 ))
- Fix regression where sending email push would not work when using a pusher worker. ([\#6507](https://github.com/matrix-org/synapse/issues/6507 ), [\#6509](https://github.com/matrix-org/synapse/issues/6509 ))
2019-12-11 14:14:30 +00:00
Andrew Morgan
fc316a4894
Prevent redacted events from appearing in message search ( #6377 )
2019-12-11 13:39:47 +00:00
Andrew Morgan
6676ee9c4a
Add dev script to generate full SQL schema files ( #6394 )
2019-12-11 13:16:01 +00:00
Andrew Morgan
ea0f0ad414
Prevent message search in upgraded rooms we're not in ( #6385 )
2019-12-11 13:07:25 +00:00
Brendan Abolivier
54ae52ba96
Merge pull request #6349 from matrix-org/babolivier/msc1802
...
Implement v2 APIs for send_join and send_leave
2019-12-11 11:41:47 +00:00
Erik Johnston
239d86a134
Merge pull request #6512 from matrix-org/erikj/silence_mypy
...
Silence mypy errors for files outside those specified
2019-12-11 10:39:57 +00:00
Richard van der Hoff
f8bc2ae883
Move get_state methods into FederationHandler ( #6503 )
...
This is a non-functional refactor as a precursor to some other work.
2019-12-10 17:42:46 +00:00
Andrew Morgan
4947de5a14
Allow SAML username provider plugins ( #6411 )
2019-12-10 17:30:16 +00:00
Erik Johnston
b2dcddc413
Merge pull request #6510 from matrix-org/erikj/phone_home_stats_db
...
Phone home stats DB reporting should not assume a single DB.
2019-12-10 16:31:24 +00:00
Richard van der Hoff
40eda84933
Fix race which caused deleted devices to reappear ( #6514 )
...
Stop the `update_client_ips` background job from recreating deleted devices.
2019-12-10 16:22:29 +00:00
Richard van der Hoff
c3dda2874d
Refactor get_events_from_store_or_dest to return a dict ( #6501 )
...
There was a bunch of unnecessary conversion back and forth between dict and
list going on here. We can simplify a bunch of the code.
2019-12-10 16:22:00 +00:00
Richard van der Hoff
424fd58237
Remove redundant code from event authorisation implementation. ( #6502 )
2019-12-10 15:09:45 +00:00
Erik Johnston
3f97b4c16b
Newsfile
2019-12-10 14:40:15 +00:00
Erik Johnston
257ef2c727
Port handlers.account_validity to async/await.
2019-12-10 14:40:15 +00:00
Erik Johnston
d630c82349
Newsfile
2019-12-10 14:34:17 +00:00
Erik Johnston
67c991b78f
Fix upgrade db script
2019-12-10 14:34:17 +00:00
Erik Johnston
bc5cb8bfe8
Remove database config parsing from apps.
2019-12-10 14:34:17 +00:00
Erik Johnston
35f3c366ef
Merge pull request #6505 from matrix-org/erikj/make_deferred_yiedable
...
Fix `make_deferred_yieldable` to work with coroutines
2019-12-10 14:20:26 +00:00
Erik Johnston
e726e18737
Merge pull request #6499 from matrix-org/erikj/fix_sqlite_7
...
Fix support for SQLite 3.7.
2019-12-10 13:43:52 +00:00
Erik Johnston
4643bb2a37
Newsfile
2019-12-10 13:36:00 +00:00
Erik Johnston
28b758fa0f
Silence mypy errors for files outside those specified
2019-12-10 13:34:56 +00:00
Erik Johnston
accd343f91
Newsfile
2019-12-10 13:22:42 +00:00
Erik Johnston
663238aeb4
Phone home stats DB reporting should not assume a single DB.
2019-12-10 13:21:04 +00:00
Erik Johnston
ffeafade48
Update comment
2019-12-10 13:17:39 +00:00
Erik Johnston
e3f528c544
Merge pull request #6506 from matrix-org/erikj/remove_snapshot_cache
...
Remove SnapshotCache in favour of ResponseCache
2019-12-10 13:04:50 +00:00
Erik Johnston
b1e7012dee
Newsfile
2019-12-10 11:29:44 +00:00
Erik Johnston
f5bb1531b7
Newsfile
2019-12-10 11:23:52 +00:00
Erik Johnston
9a2223d4c8
Fix make_deferred_yieldable to work with coroutines
2019-12-10 11:22:12 +00:00
Erik Johnston
353396e3a7
Port handlers.account_data to async/await.
2019-12-10 11:12:56 +00:00
Erik Johnston
aeaeb72ee4
Newsfile
2019-12-09 13:48:14 +00:00
Erik Johnston
a1f8ea9051
Port synapse.handlers.initial_sync to async/await
2019-12-09 13:46:45 +00:00
Erik Johnston
f166a8d1f5
Remove SnapshotCache in favour of ResponseCache
2019-12-09 13:42:49 +00:00
Brendan Abolivier
e126d83f74
Merge branch 'develop' into babolivier/msc1802
2019-12-05 21:00:43 +00:00
Andrew Morgan
e2cce15af1
Remove #6369 changelog
2019-12-05 15:44:02 +00:00
Brendan Abolivier
c8444b4152
Merge branch 'develop' into babolivier/msc1802
2019-11-14 10:12:11 +00:00
Brendan Abolivier
94cdd6fffe
Lint
2019-11-11 16:56:55 +00:00
Brendan Abolivier
21056ad12a
Changelog
2019-11-11 16:53:29 +00:00
Brendan Abolivier
edc4c7d4c5
Lint
2019-11-11 16:51:54 +00:00
Brendan Abolivier
5e18dc7955
Fix prefix for v2/send_leave
2019-11-11 16:46:09 +00:00
Brendan Abolivier
74897de01f
Add server-side support to the v2 API
2019-11-11 16:40:45 +00:00
Brendan Abolivier
1e202a90f1
Implement v2 API for send_leave
2019-11-11 16:26:53 +00:00
Brendan Abolivier
92527d7b21
Add missing yield
2019-11-11 16:20:53 +00:00
Brendan Abolivier
4c131b2c78
Implement v2 API for send_join
2019-11-11 15:47:47 +00:00
Matthew Hodgson
dd8e24f42e
changelog
2019-09-19 01:14:17 +01:00
Matthew Hodgson
2292dc35fc
Add experimental "dont_push" push action to suppress push for notifications
...
This is a potential solution to https://github.com/vector-im/riot-web/issues/3374
and https://github.com/vector-im/riot-web/issues/5953
as raised by Mozilla at https://github.com/vector-im/riot-web/issues/10868 .
This lets you define a push rule action which increases the badge count (unread notification)
count on a given room, but doesn't actually send a push for that notification via email or HTTP.
We might want to define this as the default behaviour for group chats in future
to solve https://github.com/vector-im/riot-web/issues/3268 at last.
This is implemented as a string action rather than a tweak because:
* Other pushers don't care about the tweak, given they won't ever get pushed
* The DB can store the tweak more efficiently using the existing `notify` table.
* It avoids breaking the default_notif/highlight_action optimisations.
Clients which generate their own notifs (e.g. desktop notifs from Riot/Web
would need to be aware of the new push action) to uphold it.
An alternative way to do this would be to maintain a `msg_count` alongside
`highlight_count` and `notification_count` in `unread_notifications` in sync responses.
However, doing this by counting the rows in `events` since the `stream_position`
of the user's last read receipt turns out to be painfully slow (~200ms), perhaps
due to the size of the events table. So instead, we use the highly optimised
existing event_push_actions (and event_push_actions_staging) table to maintain
the counts - using the code paths which already exist for tracking unread
notification counts efficiently. These queries are typically ~3ms or so.
The biggest issues I see here are:
* We're slightly repurposing the `notif` field on `event_push_actions` to
track whether a given action actually sent a `push` or not. This doesn't
seem unreasonable, but it's slightly naughty given that previously the
field explicitly tracked whether `notify` was true for the action (and
as a result, it was uselessly always set to 1 in the DB).
* We're going to put more load on the `event_push_actions` table for all the
random group chats which people had previously muted. In practice i don't
think there are many of these though.
* There isn't an MSC for this yet (although this comment could become one).
2019-09-19 00:54:05 +01:00