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

Commit

Permalink
Merge branch 'develop' into cross-signing_hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
uhoreg committed Jul 31, 2019
2 parents 2997a91 + d4f91e7 commit c1f0a56
Show file tree
Hide file tree
Showing 298 changed files with 3,402 additions and 2,125 deletions.
8 changes: 5 additions & 3 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,15 @@ steps:


- command:
- "python -m pip install tox"
- "apt-get update && apt-get install -y python3.5 python3.5-dev python3-pip libxml2-dev libxslt-dev zlib1g-dev"
- "python3.5 -m pip install tox"
- "tox -e py35-old,codecov"
label: ":python: 3.5 / SQLite / Old Deps"
env:
TRIAL_FLAGS: "-j 2"
plugins:
- docker#v3.0.1:
image: "python:3.5"
image: "ubuntu:xenial" # We use xenail to get an old sqlite and python
propagate-environment: true
retry:
automatic:
Expand Down Expand Up @@ -220,16 +221,17 @@ steps:
env:
POSTGRES: "1"
WORKERS: "1"
BLACKLIST: "synapse-blacklist-with-workers"
command:
- "bash .buildkite/merge_base_branch.sh"
- "bash -c 'cat /src/sytest-blacklist /src/.buildkite/worker-blacklist > /src/synapse-blacklist-with-workers'"
- "bash /synapse_sytest.sh"
plugins:
- docker#v3.0.1:
image: "matrixdotorg/sytest-synapse:py35"
propagate-environment: true
always-pull: true
workdir: "/src"
soft_fail: true
retry:
automatic:
- exit_status: -1
Expand Down
34 changes: 34 additions & 0 deletions .buildkite/worker-blacklist
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This file serves as a blacklist for SyTest tests that we expect will fail in
# Synapse when run under worker mode. For more details, see sytest-blacklist.

Message history can be paginated

m.room.history_visibility == "world_readable" allows/forbids appropriately for Guest users

m.room.history_visibility == "world_readable" allows/forbids appropriately for Real users

Can re-join room if re-invited

/upgrade creates a new room

The only membership state included in an initial sync is for all the senders in the timeline

Local device key changes get to remote servers

If remote user leaves room we no longer receive device updates

Forgotten room messages cannot be paginated

Inbound federation can get public room list

Members from the gap are included in gappy incr LL sync

Leaves are present in non-gapped incremental syncs

Old leaves are present in gapped incremental syncs

User sees updates to presence from other users in the incremental sync.

Gapped incremental syncs include all state changes

Old members are included in gappy incr LL sync if they start speaking
122 changes: 122 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,125 @@
Synapse 1.2.1 (2019-07-26)
==========================

Security update
---------------

This release includes *four* security fixes:

- Prevent an attack where a federated server could send redactions for arbitrary events in v1 and v2 rooms. ([\#5767](https://github.com/matrix-org/synapse/issues/5767))
- Prevent a denial-of-service attack where cycles of redaction events would make Synapse spin infinitely. Thanks to `@lrizika:matrix.org` for identifying and responsibly disclosing this issue. ([0f2ecb961](https://github.com/matrix-org/synapse/commit/0f2ecb961))
- Prevent an attack where users could be joined or parted from public rooms without their consent. Thanks to @dylangerdaly for identifying and responsibly disclosing this issue. ([\#5744](https://github.com/matrix-org/synapse/issues/5744))
- Fix a vulnerability where a federated server could spoof read-receipts from
users on other servers. Thanks to @dylangerdaly for identifying this issue too. ([\#5743](https://github.com/matrix-org/synapse/issues/5743))

Additionally, the following fix was in Synapse **1.2.0**, but was not correctly
identified during the original release:

- It was possible for a room moderator to send a redaction for an `m.room.create` event, which would downgrade the room to version 1. Thanks to `/dev/ponies` for identifying and responsibly disclosing this issue! ([\#5701](https://github.com/matrix-org/synapse/issues/5701))

Synapse 1.2.0 (2019-07-25)
==========================

No significant changes.


Synapse 1.2.0rc2 (2019-07-24)
=============================

Bugfixes
--------

- Fix a regression introduced in v1.2.0rc1 which led to incorrect labels on some prometheus metrics. ([\#5734](https://github.com/matrix-org/synapse/issues/5734))


Synapse 1.2.0rc1 (2019-07-22)
=============================

Security fixes
--------------

This update included a security fix which was initially incorrectly flagged as
a regular bug fix.

- It was possible for a room moderator to send a redaction for an `m.room.create` event, which would downgrade the room to version 1. Thanks to `/dev/ponies` for identifying and responsibly disclosing this issue! ([\#5701](https://github.com/matrix-org/synapse/issues/5701))

Features
--------

- Add support for opentracing. ([\#5544](https://github.com/matrix-org/synapse/issues/5544), [\#5712](https://github.com/matrix-org/synapse/issues/5712))
- Add ability to pull all locally stored events out of synapse that a particular user can see. ([\#5589](https://github.com/matrix-org/synapse/issues/5589))
- Add a basic admin command app to allow server operators to run Synapse admin commands separately from the main production instance. ([\#5597](https://github.com/matrix-org/synapse/issues/5597))
- Add `sender` and `origin_server_ts` fields to `m.replace`. ([\#5613](https://github.com/matrix-org/synapse/issues/5613))
- Add default push rule to ignore reactions. ([\#5623](https://github.com/matrix-org/synapse/issues/5623))
- Include the original event when asking for its relations. ([\#5626](https://github.com/matrix-org/synapse/issues/5626))
- Implement `session_lifetime` configuration option, after which access tokens will expire. ([\#5660](https://github.com/matrix-org/synapse/issues/5660))
- Return "This account has been deactivated" when a deactivated user tries to login. ([\#5674](https://github.com/matrix-org/synapse/issues/5674))
- Enable aggregations support by default ([\#5714](https://github.com/matrix-org/synapse/issues/5714))


Bugfixes
--------

- Fix 'utime went backwards' errors on daemonization. ([\#5609](https://github.com/matrix-org/synapse/issues/5609))
- Various minor fixes to the federation request rate limiter. ([\#5621](https://github.com/matrix-org/synapse/issues/5621))
- Forbid viewing relations on an event once it has been redacted. ([\#5629](https://github.com/matrix-org/synapse/issues/5629))
- Fix requests to the `/store_invite` endpoint of identity servers being sent in the wrong format. ([\#5638](https://github.com/matrix-org/synapse/issues/5638))
- Fix newly-registered users not being able to lookup their own profile without joining a room. ([\#5644](https://github.com/matrix-org/synapse/issues/5644))
- Fix bug in #5626 that prevented the original_event field from actually having the contents of the original event in a call to `/relations`. ([\#5654](https://github.com/matrix-org/synapse/issues/5654))
- Fix 3PID bind requests being sent to identity servers as `application/x-form-www-urlencoded` data, which is deprecated. ([\#5658](https://github.com/matrix-org/synapse/issues/5658))
- Fix some problems with authenticating redactions in recent room versions. ([\#5699](https://github.com/matrix-org/synapse/issues/5699), [\#5700](https://github.com/matrix-org/synapse/issues/5700), [\#5707](https://github.com/matrix-org/synapse/issues/5707))


Updates to the Docker image
---------------------------

- Base Docker image on a newer Alpine Linux version (3.8 -> 3.10). ([\#5619](https://github.com/matrix-org/synapse/issues/5619))
- Add missing space in default logging file format generated by the Docker image. ([\#5620](https://github.com/matrix-org/synapse/issues/5620))


Improved Documentation
----------------------

- Add information about nginx normalisation to reverse_proxy.rst. Contributed by @skalarproduktraum - thanks! ([\#5397](https://github.com/matrix-org/synapse/issues/5397))
- --no-pep517 should be --no-use-pep517 in the documentation to setup the development environment. ([\#5651](https://github.com/matrix-org/synapse/issues/5651))
- Improvements to Postgres setup instructions. Contributed by @Lrizika - thanks! ([\#5661](https://github.com/matrix-org/synapse/issues/5661))
- Minor tweaks to postgres documentation. ([\#5675](https://github.com/matrix-org/synapse/issues/5675))


Deprecations and Removals
-------------------------

- Remove support for the `invite_3pid_guest` configuration setting. ([\#5625](https://github.com/matrix-org/synapse/issues/5625))


Internal Changes
----------------

- Move logging code out of `synapse.util` and into `synapse.logging`. ([\#5606](https://github.com/matrix-org/synapse/issues/5606), [\#5617](https://github.com/matrix-org/synapse/issues/5617))
- Add a blacklist file to the repo to blacklist certain sytests from failing CI. ([\#5611](https://github.com/matrix-org/synapse/issues/5611))
- Make runtime errors surrounding password reset emails much clearer. ([\#5616](https://github.com/matrix-org/synapse/issues/5616))
- Remove dead code for persiting outgoing federation transactions. ([\#5622](https://github.com/matrix-org/synapse/issues/5622))
- Add `lint.sh` to the scripts-dev folder which will run all linting steps required by CI. ([\#5627](https://github.com/matrix-org/synapse/issues/5627))
- Move RegistrationHandler.get_or_create_user to test code. ([\#5628](https://github.com/matrix-org/synapse/issues/5628))
- Add some more common python virtual-environment paths to the black exclusion list. ([\#5630](https://github.com/matrix-org/synapse/issues/5630))
- Some counter metrics exposed over Prometheus have been renamed, with the old names preserved for backwards compatibility and deprecated. See `docs/metrics-howto.rst` for details. ([\#5636](https://github.com/matrix-org/synapse/issues/5636))
- Unblacklist some user_directory sytests. ([\#5637](https://github.com/matrix-org/synapse/issues/5637))
- Factor out some redundant code in the login implementation. ([\#5639](https://github.com/matrix-org/synapse/issues/5639))
- Update ModuleApi to avoid register(generate_token=True). ([\#5640](https://github.com/matrix-org/synapse/issues/5640))
- Remove access-token support from `RegistrationHandler.register`, and rename it. ([\#5641](https://github.com/matrix-org/synapse/issues/5641))
- Remove access-token support from `RegistrationStore.register`, and rename it. ([\#5642](https://github.com/matrix-org/synapse/issues/5642))
- Improve logging for auto-join when a new user is created. ([\#5643](https://github.com/matrix-org/synapse/issues/5643))
- Remove unused and unnecessary check for FederationDeniedError in _exception_to_failure. ([\#5645](https://github.com/matrix-org/synapse/issues/5645))
- Fix a small typo in a code comment. ([\#5655](https://github.com/matrix-org/synapse/issues/5655))
- Clean up exception handling around client access tokens. ([\#5656](https://github.com/matrix-org/synapse/issues/5656))
- Add a mechanism for per-test homeserver configuration in the unit tests. ([\#5657](https://github.com/matrix-org/synapse/issues/5657))
- Inline issue_access_token. ([\#5659](https://github.com/matrix-org/synapse/issues/5659))
- Update the sytest BuildKite configuration to checkout Synapse in `/src`. ([\#5664](https://github.com/matrix-org/synapse/issues/5664))
- Add a `docker` type to the towncrier configuration. ([\#5673](https://github.com/matrix-org/synapse/issues/5673))
- Convert `synapse.federation.transport.server` to `async`. Might improve some stack traces. ([\#5689](https://github.com/matrix-org/synapse/issues/5689))
- Documentation for opentracing. ([\#5703](https://github.com/matrix-org/synapse/issues/5703))


Synapse 1.1.0 (2019-07-04)
==========================

Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ include demo/README
include demo/demo.tls.dh
include demo/*.py
include demo/*.sh
include sytest-blacklist

recursive-include synapse/storage/schema *.sql
recursive-include synapse/storage/schema *.sql.postgres
Expand All @@ -34,6 +33,7 @@ exclude Dockerfile
exclude .dockerignore
exclude test_postgresql.sh
exclude .editorconfig
exclude sytest-blacklist

include pyproject.toml
recursive-include changelog.d *
Expand Down
1 change: 0 additions & 1 deletion changelog.d/5397.doc

This file was deleted.

2 changes: 0 additions & 2 deletions changelog.d/5544.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5589.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5597.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5606.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5609.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5611.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5613.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5616.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5617.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5619.docker

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5620.docker

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5621.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5622.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5623.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5625.removal

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5626.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5627.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5628.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5629.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5630.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5636.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5637.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5638.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5639.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5640.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5641.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5642.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5643.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5644.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5645.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5651.doc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5654.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5655.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5656.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5657.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5658.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5659.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5660.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5661.doc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5664.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5673.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5674.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5675.doc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5689.misc

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/5693.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix UISIs during homeserver outage.
1 change: 1 addition & 0 deletions changelog.d/5694.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make Jaeger fully configurable.
1 change: 0 additions & 1 deletion changelog.d/5699.bugfix

This file was deleted.

2 changes: 0 additions & 2 deletions changelog.d/5700.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5701.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5707.bugfix

This file was deleted.

2 changes: 0 additions & 2 deletions changelog.d/5712.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5714.feature

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/5722.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a set of opentracing utils.
1 change: 1 addition & 0 deletions changelog.d/5724.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix stack overflow in server key lookup code.
1 change: 1 addition & 0 deletions changelog.d/5725.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
start.sh no longer uses deprecated cli option.
1 change: 1 addition & 0 deletions changelog.d/5729.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Synapse now no longer accepts the `-v`/`--verbose`, `-f`/`--log-file`, or `--log-config` command line flags, and removes the deprecated `verbose` and `log_file` configuration file options. Users of these options should migrate their options into the dedicated log configuration.
1 change: 1 addition & 0 deletions changelog.d/5730.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Cache result of get_version_string to reduce overhead of `/version` federation requests.
1 change: 1 addition & 0 deletions changelog.d/5731.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Return 'user_type' in admin API user endpoints results.
1 change: 1 addition & 0 deletions changelog.d/5732.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add sd_notify hooks to ease systemd integration and allows usage of Type=Notify.
1 change: 1 addition & 0 deletions changelog.d/5733.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Don't package the sytest test blacklist file.
1 change: 1 addition & 0 deletions changelog.d/5736.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Replace uses of returnValue with plain return, as returnValue is not needed on Python 3.
1 change: 1 addition & 0 deletions changelog.d/5738.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reduce database IO usage by optimising queries for current membership.
1 change: 1 addition & 0 deletions changelog.d/5740.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Blacklist some flakey tests in worker mode.
1 change: 1 addition & 0 deletions changelog.d/5743.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Log when we receive an event receipt from an unexpected origin.
1 change: 1 addition & 0 deletions changelog.d/5746.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reduce database IO usage by optimising queries for current membership.
1 change: 1 addition & 0 deletions changelog.d/5749.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix some error cases in the caching layer.
1 change: 1 addition & 0 deletions changelog.d/5750.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a prometheus metric for pending cache lookups.
1 change: 1 addition & 0 deletions changelog.d/5752.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reduce database IO usage by optimising queries for current membership.
1 change: 1 addition & 0 deletions changelog.d/5753.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Stop trying to fetch events with event_id=None.
1 change: 1 addition & 0 deletions changelog.d/5768.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Convert RedactionTestCase to modern test style.
1 change: 1 addition & 0 deletions changelog.d/5770.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reduce database IO usage by optimising queries for current membership.
1 change: 1 addition & 0 deletions changelog.d/5774.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reduce database IO usage by optimising queries for current membership.
1 change: 1 addition & 0 deletions changelog.d/5775.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix debian packaging scripts to correctly build sid packages.
1 change: 1 addition & 0 deletions changelog.d/5780.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow looping calls to be given arguments.
1 change: 1 addition & 0 deletions changelog.d/5782.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove non-functional 'expire_access_token' setting.
1 change: 1 addition & 0 deletions changelog.d/5783.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Synapse can now be configured to not join remote rooms of a given "complexity" (currently, state events) over federation. This option can be used to prevent adverse performance on resource-constrained homeservers.
1 change: 1 addition & 0 deletions changelog.d/5785.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Set the logs emitted when checking typing and presence timeouts to DEBUG level, not INFO.
1 change: 1 addition & 0 deletions changelog.d/5789.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix UISIs during homeserver outage.
1 change: 1 addition & 0 deletions changelog.d/5792.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reduce database IO usage by optimising queries for current membership.
1 change: 1 addition & 0 deletions changelog.d/5793.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reduce database IO usage by optimising queries for current membership.
3 changes: 2 additions & 1 deletion contrib/systemd-with-workers/system/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ After=matrix-synapse.service
BindsTo=matrix-synapse.service

[Service]
Type=simple
Type=notify
NotifyAccess=main
User=matrix-synapse
WorkingDirectory=/var/lib/matrix-synapse
EnvironmentFile=/etc/default/matrix-synapse
Expand Down
Loading

0 comments on commit c1f0a56

Please sign in to comment.