Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit ac9d346

Browse files
committed
Merge branch 'develop' of github.com:matrix-org/synapse into anoa/improve_test_times
* 'develop' of github.com:matrix-org/synapse: (160 commits) Update the test federation client to handle streaming responses (#8130) Do not propagate profile changes of shadow-banned users into rooms. (#8157) Make SlavedIdTracker.advance have same interface as MultiWriterIDGenerator (#8171) Convert simple_select_one and simple_select_one_onecol to async (#8162) Fix rate limiting unit tests. (#8167) 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) ...
2 parents 9aea07e + 88b9807 commit ac9d346

File tree

604 files changed

+10191
-6994
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

604 files changed

+10191
-6994
lines changed

.circleci/config.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@ jobs:
44
machine: true
55
steps:
66
- checkout
7-
- run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:${CIRCLE_TAG} -t matrixdotorg/synapse:${CIRCLE_TAG}-py3 .
7+
- run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:${CIRCLE_TAG} .
88
- run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
99
- run: docker push matrixdotorg/synapse:${CIRCLE_TAG}
10-
- run: docker push matrixdotorg/synapse:${CIRCLE_TAG}-py3
1110
dockerhubuploadlatest:
1211
machine: true
1312
steps:
1413
- checkout
15-
- run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:latest -t matrixdotorg/synapse:latest-py3 .
14+
- run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:latest .
1615
- run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
1716
- run: docker push matrixdotorg/synapse:latest
18-
- run: docker push matrixdotorg/synapse:latest-py3
1917

2018
workflows:
2119
version: 2

.github/ISSUE_TEMPLATE/BUG_REPORT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ about: Create a report to help us improve
44

55
---
66

7+
<!--
8+
79
**THIS IS NOT A SUPPORT CHANNEL!**
810
**IF YOU HAVE SUPPORT QUESTIONS ABOUT RUNNING OR CONFIGURING YOUR OWN HOME SERVER**,
911
please ask in **#synapse:matrix.org** (using a matrix.org account if necessary)
1012
11-
<!--
12-
1313
If you want to report a security issue, please see https://matrix.org/security-disclosure-policy/
1414
1515
This is a bug report template. By following the instructions below and

CHANGES.md

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,143 @@
1+
For the next release
2+
====================
3+
4+
Removal warning
5+
---------------
6+
7+
Some older clients used a
8+
[disallowed character](https://matrix.org/docs/spec/client_server/r0.6.1#post-matrix-client-r0-register-email-requesttoken)
9+
(`:`) in the `client_secret` parameter of various endpoints. The incorrect
10+
behaviour was allowed for backwards compatibility, but is now being removed
11+
from Synapse as most users have updated their client. Further context can be
12+
found at [\#6766](https://github.com/matrix-org/synapse/issues/6766).
13+
14+
15+
Synapse 1.19.1rc1 (2020-08-25)
16+
==============================
17+
18+
Bugfixes
19+
--------
20+
21+
- 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))
22+
- 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))
23+
24+
25+
Synapse 1.19.0 (2020-08-17)
26+
===========================
27+
28+
No significant changes since 1.19.0rc1.
29+
30+
Removal warning
31+
---------------
32+
33+
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).
34+
35+
36+
Synapse 1.19.0rc1 (2020-08-13)
37+
==============================
38+
39+
Features
40+
--------
41+
42+
- 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))
43+
- 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))
44+
- Add rate limiting to users joining rooms. ([\#8008](https://github.com/matrix-org/synapse/issues/8008))
45+
- 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))
46+
- Allow login to be blocked based on the values of SAML attributes. ([\#8052](https://github.com/matrix-org/synapse/issues/8052))
47+
- 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))
48+
49+
50+
Bugfixes
51+
--------
52+
53+
- 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))
54+
- 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))
55+
- 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))
56+
- Fix various comments and minor discrepencies in server notices code. ([\#7996](https://github.com/matrix-org/synapse/issues/7996))
57+
- Fix a long standing bug where HTTP HEAD requests resulted in a 400 error. ([\#7999](https://github.com/matrix-org/synapse/issues/7999))
58+
- 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))
59+
60+
61+
Updates to the Docker image
62+
---------------------------
63+
64+
- 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))
65+
66+
67+
Improved Documentation
68+
----------------------
69+
70+
- 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))
71+
- Improve workers docs. ([\#7990](https://github.com/matrix-org/synapse/issues/7990), [\#8000](https://github.com/matrix-org/synapse/issues/8000))
72+
- Fix typo in `docs/workers.md`. ([\#7992](https://github.com/matrix-org/synapse/issues/7992))
73+
- 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))
74+
75+
76+
Internal Changes
77+
----------------
78+
79+
- 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))
80+
- 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))
81+
- 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))
82+
- Move some database-related log lines from the default logger to the database/transaction loggers. ([\#7952](https://github.com/matrix-org/synapse/issues/7952))
83+
- 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))
84+
- Log the SAML session ID during creation. ([\#7971](https://github.com/matrix-org/synapse/issues/7971))
85+
- Implement new experimental push rules for some users. ([\#7997](https://github.com/matrix-org/synapse/issues/7997))
86+
- Remove redundant and unreliable signature check for v1 Identity Service lookup responses. ([\#8001](https://github.com/matrix-org/synapse/issues/8001))
87+
- Improve the performance of the register endpoint. ([\#8009](https://github.com/matrix-org/synapse/issues/8009))
88+
- 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))
89+
- Rename storage layer objects to be more sensible. ([\#8033](https://github.com/matrix-org/synapse/issues/8033))
90+
- Change the default log config to reduce disk I/O and storage for new servers. ([\#8040](https://github.com/matrix-org/synapse/issues/8040))
91+
- Add an assertion on `prev_events` in `create_new_client_event`. ([\#8041](https://github.com/matrix-org/synapse/issues/8041))
92+
- Add a comment to `ServerContextFactory` about the use of `SSLv23_METHOD`. ([\#8043](https://github.com/matrix-org/synapse/issues/8043))
93+
- Log `OPTIONS` requests at `DEBUG` rather than `INFO` level to reduce amount logged at `INFO`. ([\#8049](https://github.com/matrix-org/synapse/issues/8049))
94+
- Reduce amount of outbound request logging at `INFO` level. ([\#8050](https://github.com/matrix-org/synapse/issues/8050))
95+
- 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))
96+
- 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))
97+
98+
99+
Synapse 1.18.0 (2020-07-30)
100+
===========================
101+
102+
Deprecation Warnings
103+
--------------------
104+
105+
### Docker Tags with `-py3` Suffix
106+
107+
From 10th August 2020, we will no longer publish Docker images with the `-py3` tag suffix. The images tagged with the `-py3` suffix have been identical to the non-suffixed tags since release 0.99.0, and the suffix is obsolete.
108+
109+
On 10th August, we will remove the `latest-py3` tag. Existing per-release tags (such as `v1.18.0-py3`) will not be removed, but no new `-py3` tags will be added.
110+
111+
Scripts relying on the `-py3` suffix will need to be updated.
112+
113+
114+
### TCP-based Replication
115+
116+
When setting up worker processes, we now recommend the use of a Redis server for replication. The old direct TCP connection method is deprecated and will be removed in a future release. See [docs/workers.md](https://github.com/matrix-org/synapse/blob/release-v1.18.0/docs/workers.md) for more details.
117+
118+
119+
Improved Documentation
120+
----------------------
121+
122+
- Update worker docs with latest enhancements. ([\#7969](https://github.com/matrix-org/synapse/issues/7969))
123+
124+
125+
Synapse 1.18.0rc2 (2020-07-28)
126+
==============================
127+
128+
Bugfixes
129+
--------
130+
131+
- Fix an `AssertionError` exception introduced in v1.18.0rc1. ([\#7876](https://github.com/matrix-org/synapse/issues/7876))
132+
- 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))
133+
134+
135+
Internal Changes
136+
----------------
137+
138+
- Further optimise queueing of inbound replication commands. ([\#7876](https://github.com/matrix-org/synapse/issues/7876))
139+
140+
1141
Synapse 1.18.0rc1 (2020-07-27)
2142
==============================
3143

INSTALL.md

Lines changed: 95 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
- [Choosing your server name](#choosing-your-server-name)
2+
- [Picking a database engine](#picking-a-database-engine)
23
- [Installing Synapse](#installing-synapse)
34
- [Installing from source](#installing-from-source)
45
- [Platform-Specific Instructions](#platform-specific-instructions)
56
- [Prebuilt packages](#prebuilt-packages)
67
- [Setting up Synapse](#setting-up-synapse)
78
- [TLS certificates](#tls-certificates)
9+
- [Client Well-Known URI](#client-well-known-uri)
810
- [Email](#email)
911
- [Registering a user](#registering-a-user)
1012
- [Setting up a TURN server](#setting-up-a-turn-server)
@@ -27,6 +29,25 @@ that your email address is probably `[email protected]` rather than
2729
`[email protected]`) - but doing so may require more advanced setup: see
2830
[Setting up Federation](docs/federate.md).
2931

32+
# Picking a database engine
33+
34+
Synapse offers two database engines:
35+
* [PostgreSQL](https://www.postgresql.org)
36+
* [SQLite](https://sqlite.org/)
37+
38+
Almost all installations should opt to use PostgreSQL. Advantages include:
39+
40+
* significant performance improvements due to the superior threading and
41+
caching model, smarter query optimiser
42+
* allowing the DB to be run on separate hardware
43+
44+
For information on how to install and use PostgreSQL, please see
45+
[docs/postgres.md](docs/postgres.md)
46+
47+
By default Synapse uses SQLite and in doing so trades performance for convenience.
48+
SQLite is only recommended in Synapse for testing purposes or for servers with
49+
light workloads.
50+
3051
# Installing Synapse
3152

3253
## Installing from source
@@ -234,17 +255,18 @@ for a number of platforms.
234255

235256
There is an offical synapse image available at
236257
https://hub.docker.com/r/matrixdotorg/synapse which can be used with
237-
the docker-compose file available at [contrib/docker](contrib/docker). Further information on
238-
this including configuration options is available in the README on
239-
hub.docker.com.
258+
the docker-compose file available at [contrib/docker](contrib/docker). Further
259+
information on this including configuration options is available in the README
260+
on hub.docker.com.
240261

241262
Alternatively, Andreas Peters (previously Silvio Fricke) has contributed a
242263
Dockerfile to automate a synapse server in a single Docker image, at
243264
https://hub.docker.com/r/avhost/docker-matrix/tags/
244265

245266
Slavi Pantaleev has created an Ansible playbook,
246267
which installs the offical Docker image of Matrix Synapse
247-
along with many other Matrix-related services (Postgres database, riot-web, coturn, mxisd, SSL support, etc.).
268+
along with many other Matrix-related services (Postgres database, Element, coturn,
269+
ma1sd, SSL support, etc.).
248270
For more details, see
249271
https://github.com/spantaleev/matrix-docker-ansible-deploy
250272

@@ -277,22 +299,27 @@ The fingerprint of the repository signing key (as shown by `gpg
277299
/usr/share/keyrings/matrix-org-archive-keyring.gpg`) is
278300
`AAF9AE843A7584B5A3E4CD2BCF45A512DE2DA058`.
279301

280-
#### Downstream Debian/Ubuntu packages
302+
#### Downstream Debian packages
281303

282-
For `buster` and `sid`, Synapse is available in the Debian repositories and
283-
it should be possible to install it with simply:
304+
We do not recommend using the packages from the default Debian `buster`
305+
repository at this time, as they are old and suffer from known security
306+
vulnerabilities. You can install the latest version of Synapse from
307+
[our repository](#matrixorg-packages) or from `buster-backports`. Please
308+
see the [Debian documentation](https://backports.debian.org/Instructions/)
309+
for information on how to use backports.
310+
311+
If you are using Debian `sid` or testing, Synapse is available in the default
312+
repositories and it should be possible to install it simply with:
284313

285314
```
286315
sudo apt install matrix-synapse
287316
```
288317

289-
There is also a version of `matrix-synapse` in `stretch-backports`. Please see
290-
the [Debian documentation on
291-
backports](https://backports.debian.org/Instructions/) for information on how
292-
to use them.
318+
#### Downstream Ubuntu packages
293319

294-
We do not recommend using the packages in downstream Ubuntu at this time, as
295-
they are old and suffer from known security vulnerabilities.
320+
We do not recommend using the packages in the default Ubuntu repository
321+
at this time, as they are old and suffer from known security vulnerabilities.
322+
The latest version of Synapse can be installed from [our repository](#matrixorg-packages).
296323

297324
### Fedora
298325

@@ -419,6 +446,60 @@ so, you will need to edit `homeserver.yaml`, as follows:
419446
For a more detailed guide to configuring your server for federation, see
420447
[federate.md](docs/federate.md).
421448

449+
## Client Well-Known URI
450+
451+
Setting up the client Well-Known URI is optional but if you set it up, it will
452+
allow users to enter their full username (e.g. `@user:<server_name>`) into clients
453+
which support well-known lookup to automatically configure the homeserver and
454+
identity server URLs. This is useful so that users don't have to memorize or think
455+
about the actual homeserver URL you are using.
456+
457+
The URL `https://<server_name>/.well-known/matrix/client` should return JSON in
458+
the following format.
459+
460+
```
461+
{
462+
"m.homeserver": {
463+
"base_url": "https://<matrix.example.com>"
464+
}
465+
}
466+
```
467+
468+
It can optionally contain identity server information as well.
469+
470+
```
471+
{
472+
"m.homeserver": {
473+
"base_url": "https://<matrix.example.com>"
474+
},
475+
"m.identity_server": {
476+
"base_url": "https://<identity.example.com>"
477+
}
478+
}
479+
```
480+
481+
To work in browser based clients, the file must be served with the appropriate
482+
Cross-Origin Resource Sharing (CORS) headers. A recommended value would be
483+
`Access-Control-Allow-Origin: *` which would allow all browser based clients to
484+
view it.
485+
486+
In nginx this would be something like:
487+
```
488+
location /.well-known/matrix/client {
489+
return 200 '{"m.homeserver": {"base_url": "https://<matrix.example.com>"}}';
490+
add_header Content-Type application/json;
491+
add_header Access-Control-Allow-Origin *;
492+
}
493+
```
494+
495+
You should also ensure the `public_baseurl` option in `homeserver.yaml` is set
496+
correctly. `public_baseurl` should be set to the URL that clients will use to
497+
connect to your server. This is the same URL you put for the `m.homeserver`
498+
`base_url` above.
499+
500+
```
501+
public_baseurl: "https://<matrix.example.com>"
502+
```
422503

423504
## Email
424505

@@ -437,7 +518,7 @@ email will be disabled.
437518

438519
## Registering a user
439520

440-
The easiest way to create a new user is to do so from a client like [Riot](https://riot.im).
521+
The easiest way to create a new user is to do so from a client like [Element](https://element.io/).
441522

442523
Alternatively you can do so from the command line if you have installed via pip.
443524

0 commit comments

Comments
 (0)