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
6a7e90ad78
1.10.0rc2
2020-02-06 10:40:08 +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
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
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
Richard van der Hoff
4b4536dd02
newsfile
2020-02-03 22:28:45 +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
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
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
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
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
750d4d7599
changelog
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
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
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
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
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
1dc5a791cf
Fixup changelog
2020-01-23 12:59:29 +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
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
6ae0c8db33
Lint + changelog
2020-01-22 12:38:18 +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
351fdfede6
Update changelog.d/6747.bugfix
...
Co-Authored-By: Erik Johnston <erik@matrix.org>
2020-01-20 15:58:44 +00:00
Andrew Morgan
026f4bdf3c
Add changelog
2020-01-20 14:12:21 +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