Erik Johnston
a027b65c8e
Merge remote-tracking branch 'origin/release-v1.35' into matrix-org-hotfixes
2021-05-28 17:15:01 +01:00
Erik Johnston
4f41b711d8
CHANGELOG
2021-05-28 17:13:57 +01:00
Erik Johnston
258a9a9e8b
1.35.0rc3
2021-05-28 17:06:05 +01:00
Erik Johnston
6b6c6a02db
Merge remote-tracking branch 'origin/release-v1.35.0' into release-v1.35
2021-05-28 17:03:14 +01:00
Brendan Abolivier
9408b86f5c
Limit the number of events sent over replication when persisting events. ( #10082 )
2021-05-28 16:29:09 +01:00
Erik Johnston
1641c5c707
Log method and path when dropping request due to size limit ( #10091 )
2021-05-28 16:29:09 +01:00
Erik Johnston
84cf3e47a0
Allow response of /send_join to be larger. ( #10093 )
...
Fixes #10087 .
2021-05-28 16:28:01 +01:00
Erik Johnston
d2fcfef679
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-05-27 17:11:57 +01:00
Brendan Abolivier
f828a70be3
Limit the number of events sent over replication when persisting events. ( #10082 )
2021-05-27 17:10:58 +01:00
Erik Johnston
8e132fe64e
Merge tag 'v1.35.0rc2' into develop
...
Synapse 1.35.0rc2 (2021-05-27)
==============================
Bugfixes
--------
- Fix a bug introduced in v1.35.0rc1 when calling the spaces summary API via a GET request. ([\#10079](https://github.com/matrix-org/synapse/issues/10079 ))
2021-05-27 14:59:46 +01:00
Erik Johnston
b1bc26a909
1.35.0rc2
2021-05-27 14:46:24 +01:00
Erik Johnston
78b5102ae7
Fix up BatchingQueue ( #10078 )
...
Fixes #10068
2021-05-27 14:32:31 +01:00
Patrick Cloke
8e15c92c2f
Pass the origin when calculating the spaces summary over GET. ( #10079 )
...
Fixes a bug due to conflicting PRs which were merged. (One added a new caller to
a method, the other added a new parameter to the same method.)
2021-05-27 08:52:28 -04:00
Denis Kasak
d9f44fd0b9
Clarify security note regarding the domain Synapse is hosted on. ( #9221 )
2021-05-27 11:41:16 +00:00
Richard van der Hoff
dcbfec919b
Improve the error message printed by synctl when synapse fails to start. ( #10059 )
2021-05-27 10:35:06 +01:00
Richard van der Hoff
5447a76332
Remove redundant, unmaintained convert_server_keys script. ( #10055 )
2021-05-27 10:34:55 +01:00
Richard van der Hoff
fe5dad46b0
Remove redundant code to reload tls cert ( #10054 )
...
we don't need to reload the tls cert if we don't have any tls listeners.
Follow-up to #9280 .
2021-05-27 10:34:24 +01:00
Richard van der Hoff
224f2f949b
Combine LruCache.invalidate and invalidate_many ( #9973 )
...
* Make `invalidate` and `invalidate_many` do the same thing
... so that we can do either over the invalidation replication stream, and also
because they always confused me a bit.
* Kill off `invalidate_many`
* changelog
2021-05-27 10:33:56 +01:00
Patrick Cloke
f42e4c4eb9
Remove the experimental spaces enabled flag. ( #10063 )
...
In lieu of just always enabling the unstable spaces endpoint and
unstable room version.
2021-05-26 14:35:16 -04:00
Dan Callahan
49df2c28e3
Fix GitHub Actions lint for newsfragments ( #10069 )
...
* Fix GitHub Actions lint for newsfragments
Signed-off-by: Dan Callahan <danc@element.io >
2021-05-26 14:14:43 +01:00
Aaron Raimist
f95e7a03fa
Tweak wording of database recommendation in INSTALL.md ( #10057 )
...
* Tweak wording of database recommendation in INSTALL.md
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2021-05-26 13:29:02 +01:00
Dan Callahan
913a761a53
Tell CircleCI to build Docker images from main ( #9906 )
...
The `only` field takes a string or list of strings per the Circle docs:
https://circleci.com/docs/2.0/configuration-reference/#branches
Signed-off-by: Dan Callahan <danc@element.io >
2021-05-26 13:16:06 +01:00
Dirk Klimpel
65e6c64d83
Add an admin API for unprotecting local media from quarantine ( #10040 )
...
Signed-off-by: Dirk Klimpel dirk@klimpel.org
2021-05-26 11:19:47 +01:00
Aaron Raimist
3e1beb75e6
Update CAPTCHA documentation to mention turning off verify origin feature ( #10046 )
...
* Update CAPTCHA documentation to mention turning off verify origin
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2021-05-26 10:55:30 +01:00
Erik Johnston
557635f69a
1.35.0rc1
2021-05-25 11:00:13 +01:00
Erik Johnston
2d83d19061
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-05-25 10:23:00 +01:00
Patrick Cloke
7d90d6ce9b
Run complement with Synapse workers manually. ( #10039 )
...
Adds an option to complement.sh to run Synapse in worker
mode (instead of the default monolith mode).
2021-05-24 15:32:45 -04:00
Patrick Cloke
7adcb20fc0
Add missing type hints to synapse.util ( #9982 )
2021-05-24 15:32:01 -04:00
Sergio Miguéns
22a8838f62
Fix docker image to not log at /homeserver.log ( #10045 )
...
Fixes #9970
Signed-off-by: Sergio Miguéns Iglesias lonyelon@lony.xyz
2021-05-24 20:23:54 +01:00
Jerin J Titus
057ce7b754
Remove tls_fingerprints option ( #9280 )
...
Signed-off-by: Jerin J Titus <72017981+jerinjtitus@users.noreply.github.com >
2021-05-24 17:43:30 +01:00
Richard van der Hoff
82eacb0e07
Fix --no-daemonize for synctl with workers ( #9995 )
2021-05-24 14:03:30 +01:00
Richard van der Hoff
daca7b2794
Fix off-by-one-error in synapse_port_db ( #9991 )
...
fixes #9979
2021-05-24 14:03:00 +01:00
Richard van der Hoff
c0df6bae06
Remove keylen from LruCache. ( #9993 )
...
`keylen` seems to be a thing that is frequently incorrectly set, and we don't really need it.
The only time it was used was to figure out if we had removed a subtree in `del_multi`, which we can do better by changing `TreeCache.pop` to return a different type (`TreeCacheNode`).
Commits should be independently reviewable.
2021-05-24 14:02:01 +01:00
Patrick Cloke
316f89e87f
Enable experimental spaces by default. ( #10011 )
...
The previous spaces_enabled flag now defaults to true and
is exposed in the sample config.
2021-05-24 08:57:14 -04:00
Dirk Klimpel
387c297489
Add missing entry to the table of contents of room admin API ( #10043 )
2021-05-24 07:37:30 -04:00
Eric Eastwood
5f1198a67e
Fix get_state_ids_for_event return type typo to match what the function actually does ( #10050 )
...
It looks like a typo copy/paste from `get_state_for_event` above.
2021-05-24 10:43:33 +01:00
Erik Johnston
3e831f24ff
Don't hammer the database for destination retry timings every ~5mins ( #10036 )
2021-05-21 17:57:08 +01:00
Michael Telatynski
e8ac9ac8ca
Fix /upload 500'ing when presented a very large image ( #10029 )
...
* Fix /upload 500'ing when presented a very large image
Catch DecompressionBombError and re-raise as ThumbnailErrors
* Set PIL's MAX_IMAGE_PIXELS to match homeserver.yaml
to get it to bomb out quicker, to load less into memory
in the case of super large images
* Add changelog entry for 10029
2021-05-21 18:31:59 +02:00
Andrew Morgan
21bd230831
Add a test for update_presence ( #10033 )
...
https://github.com/matrix-org/synapse/issues/9962 uncovered that we accidentally removed all but one of the presence updates that we store in the database when persisting multiple updates. This could cause users' presence state to be stale.
The bug was fixed in #10014 , and this PR just adds a test that failed on the old code, and was used to initially verify the bug.
The test attempts to insert some presence into the database in a batch using `PresenceStore.update_presence`, and then simply pulls it out again.
2021-05-21 17:29:14 +01:00
Patrick Cloke
c5413d0e9e
Remove unused properties from the SpaceSummaryHandler. ( #10038 )
2021-05-21 12:02:01 -04:00
Marek Matys
6a8643ff3d
Fixed removal of new presence stream states ( #10014 )
...
Fixes: https://github.com/matrix-org/synapse/issues/9962
This is a fix for above problem.
I fixed it by swaping the order of insertion of new records and deletion of old ones. This ensures that we don't delete fresh database records as we do deletes before inserts.
Signed-off-by: Marek Matys <themarcq@gmail.com >
2021-05-21 12:02:06 +01:00
Erik Johnston
7958eadcd1
Add a batching queue implementation. ( #10017 )
2021-05-21 11:20:51 +01:00
Erik Johnston
1c6a19002c
Add Keyring.verify_events_for_server and reduce memory usage ( #10018 )
...
Also add support for giving a callback to generate the JSON object to
verify. This should reduce memory usage, as we no longer have the event
in memory in dict form (which has a large memory footprint) for extend
periods of time.
2021-05-20 16:25:11 +01:00
Erik Johnston
64887f06fc
Use ijson to parse the response to /send_join, reducing memory usage. ( #9958 )
...
Instead of parsing the full response to `/send_join` into Python objects (which can be huge for large rooms) and *then* parsing that into events, we instead use ijson to stream parse the response directly into `EventBase` objects.
2021-05-20 16:11:48 +01:00
Patrick Cloke
551d2c3f4b
Allow a user who could join a restricted room to see it in spaces summary. ( #9922 )
...
This finishes up the experimental implementation of MSC3083 by showing
the restricted rooms in the spaces summary (from MSC2946).
2021-05-20 11:10:36 -04:00
Andrew Morgan
d983ced596
Merge branch 'master' of github.com:matrix-org/synapse into develop
2021-05-20 14:39:46 +01:00
Javier Junquera Sánchez
141b073c7b
Update user_directory.md ( #10016 )
...
Signed-off-by: Javier Junquera Sánchez <javier@junquera.io >
2021-05-20 14:24:19 +01:00
Erik Johnston
9c76d0561b
Update the contrib grafana dashboard ( #10001 )
2021-05-19 11:47:16 +01:00
Savyasachee Jha
5bba1b4905
Hardened systemd unit files ( #9803 )
...
Signed-off-by: Savyasachee Jha savya.jha@hawkradius.com
2021-05-19 11:44:16 +01:00
Patrick Cloke
ac6bfcd52f
Refactor checking restricted join rules ( #10007 )
...
To be more consistent with similar code. The check now automatically
raises an AuthError instead of passing back a boolean. It also absorbs
some shared logic between callers.
2021-05-18 12:17:04 -04:00
Andrew Morgan
4d6e5a5e99
Use a database table to hold the users that should have full presence sent to them, instead of something in-memory ( #9823 )
2021-05-18 14:13:45 +01:00
Patrick Cloke
206a7b5f12
Fix the allowed range of valid ordering characters for spaces. ( #10002 )
...
\x7F was meant to be \0x7E (~) this was originally incorrect
in MSC1772.
2021-05-17 09:59:17 -04:00
Patrick Cloke
9752849e2b
Clarify comments in the space summary handler. ( #9974 )
2021-05-17 09:01:19 -04:00
Erik Johnston
653fe2f3cd
Merge branch 'master' into develop
2021-05-17 12:14:58 +01:00
Erik Johnston
13b0673b5a
Changelog
2021-05-17 12:00:28 +01:00
Erik Johnston
8dde0bf8b3
Update UPGRADE.rst
2021-05-17 11:50:08 +01:00
Erik Johnston
afb6dcf806
1.34.0
2021-05-17 11:34:39 +01:00
Brendan Abolivier
41ac128fd3
Split multiplart email sending into a dedicated handler ( #9977 )
...
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2021-05-17 12:33:38 +02:00
Richard van der Hoff
6660912226
Update postgres docs ( #9989 )
2021-05-14 13:14:48 +01:00
Richard van der Hoff
6482075c95
Run black on the scripts ( #9981 )
...
Turns out these scripts weren't getting linted.
2021-05-14 11:46:35 +01:00
Erik Johnston
6942377f90
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-05-14 11:31:38 +01:00
Richard van der Hoff
5090f26b63
Minor @cachedList enhancements ( #9975 )
...
- use a tuple rather than a list for the iterable that is passed into the
wrapped function, for performance
- test that we can pass an iterable and that keys are correctly deduped.
2021-05-14 11:12:36 +01:00
Dan Callahan
52ed9655ed
Remove unnecessary SystemRandom from SQLBaseStore ( #9987 )
...
It's not obvious that instances of SQLBaseStore each need their own
instances of random.SystemRandom(); let's just use random directly.
Introduced by 52839886d6
Signed-off-by: Dan Callahan <danc@element.io >
2021-05-14 10:59:10 +01:00
Dan Callahan
ebdef256b3
Remove superfluous call to bool() ( #9986 )
...
Our strtobool already returns a bool, so no need to re-cast here
Signed-off-by: Dan Callahan <danc@element.io >
2021-05-14 10:58:57 +01:00
Dan Callahan
bd918d874f
Simplify exception handling in is_ascii. ( #9985 )
...
We can get away with just catching UnicodeError here.
⋮
+-- ValueError
| +-- UnicodeError
| +-- UnicodeDecodeError
| +-- UnicodeEncodeError
| +-- UnicodeTranslateError
⋮
https://docs.python.org/3/library/exceptions.html#exception-hierarchy
Signed-off-by: Dan Callahan <danc@element.io >
2021-05-14 10:58:52 +01:00
Dan Callahan
498084228b
Use Python's secrets module instead of random ( #9984 )
...
Functionally identical, but more obviously cryptographically secure.
...Explicit is better than implicit?
Avoids needing to know that SystemRandom() implies a CSPRNG, and
complies with the big scary red box on the documentation for random:
> Warning:
> The pseudo-random generators of this module should not be used for
> security purposes. For security or cryptographic uses, see the
> secrets module.
https://docs.python.org/3/library/random.html
Signed-off-by: Dan Callahan <danc@element.io >
2021-05-14 10:58:46 +01:00
Richard van der Hoff
c14f99be46
Support enabling opentracing by user ( #9978 )
...
Add a config option which allows enabling opentracing by user id, eg for
debugging requests made by a test user.
2021-05-14 10:51:08 +01:00
Andrew Morgan
976216959b
Update minimum supported version in postgres.md ( #9988 )
2021-05-14 09:21:00 +01:00
Patrick Cloke
d19bccdbec
Update SSO mapping providers documentation about unique IDs. ( #9980 )
2021-05-13 14:37:20 -04:00
Brendan Abolivier
451f25172a
Incorporate changes from review
2021-05-12 17:10:42 +01:00
Brendan Abolivier
91143bb24e
Refer and link to the upgrade notes rather than to the file name
2021-05-12 17:04:00 +01:00
Brendan Abolivier
47806b0869
1.34.0rc1
2021-05-12 16:59:46 +01:00
Brendan Abolivier
019ed44b84
Merge branch 'release-v1.34.0' into matrix-org-hotfixes
2021-05-12 16:41:04 +01:00
Brendan Abolivier
a683028d81
Correctly ratelimit invites when creating a room ( #9968 )
...
* Correctly ratelimit invites when creating a room
Also allow ratelimiting for more than one action at a time.
2021-05-12 16:05:28 +02:00
Richard van der Hoff
7562d887e1
Change the format of access tokens away from macaroons ( #5588 )
2021-05-12 15:04:51 +01:00
Erik Johnston
affaffb0ab
Run cache_joined_hosts_for_event in background ( #9951 )
2021-05-12 13:17:11 +01:00
Richard van der Hoff
b0b8110acd
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-05-12 12:57:55 +01:00
Richard van der Hoff
63fb220e5f
Tests for to-device messages ( #9965 )
2021-05-11 18:01:11 +01:00
Patrick Cloke
27c375f812
Sort child events according to MSC1772 for the spaces summary API. ( #9954 )
...
This should help ensure that equivalent results are achieved between
homeservers querying for the summary of a space.
This implements modified MSC1772 rules, according to MSC2946.
The different is that the origin_server_ts of the m.room.create event
is not used as a tie-breaker since this might not be known if the
homeserver is not part of the room.
2021-05-11 12:57:39 -04:00
Patrick Cloke
f4833e0c06
Support fetching the spaces summary via GET over federation. ( #9947 )
...
Per changes in MSC2946, the C-S and S-S APIs for spaces summary
should use GET requests.
Until this is stable, the POST endpoints still exist.
This does not switch federation requests to use the GET version yet
since it is newly added and already deployed servers might not support
it. When switching to the stable endpoint we should switch to GET
requests.
2021-05-11 12:21:43 -04:00
Patrick Cloke
28c6841102
Send the m.room.create stripped event with invites (support MSC1772). ( #9966 )
...
MSC1772 specifies the m.room.create event should be sent as part
of the invite_state. This was done optionally behind an experimental
flag, but is now done by default due to MSC1772 being approved.
2021-05-11 10:58:58 -04:00
Brendan Abolivier
652a6b094d
Merge branch 'master' into develop
2021-05-11 14:15:30 +01:00
Brendan Abolivier
d1473f7362
Use link to advisory rather than to the CVE repo
2021-05-11 14:09:46 +01:00
Aaron Raimist
dc6366a9bd
Add config option to hide device names over federation ( #9945 )
...
Now that cross signing exists there is much less of a need for other people to look at devices and verify them individually. This PR adds a config option to allow you to prevent device display names from being shared with other servers.
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2021-05-11 14:03:23 +01:00
Brendan Abolivier
86fb71431c
1.33.2
2021-05-11 14:01:32 +01:00
Richard van der Hoff
b378d98c8f
Add debug logging for issue #9533 ( #9959 )
...
Hopefully this will help us track down where to-device messages are getting
lost/delayed.
2021-05-11 11:04:03 +01:00
Richard van der Hoff
7967b36efe
Fix m.room_key_request to-device messages ( #9961 )
...
fixes #9960
2021-05-11 11:02:56 +01:00
Brendan Abolivier
ab717bceb5
Merge branch 'release-v1.33.2' into matrix-org-hotfixes
2021-05-11 10:49:58 +01:00
Brendan Abolivier
6157f02067
Revert "improve efficiency of _glob_to_re"
...
This reverts commit edac710bc0 .
2021-05-11 10:49:45 +01:00
Richard van der Hoff
03318a766c
Merge pull request from GHSA-x345-32rc-8h85
...
* tests for push rule pattern matching
* tests for acl pattern matching
* factor out common `re.escape`
* Factor out common re.compile
* Factor out common anchoring code
* add word_boundary support to `glob_to_regex`
* Use `glob_to_regex` in push rule evaluator
NB that this drops support for character classes. I don't think anyone ever
used them.
* Improve efficiency of globs with multiple wildcards
The idea here is that we compress multiple `*` globs into a single `.*`. We
also need to consider `?`, since `*?*` is as hard to implement efficiently as
`**`.
* add assertion on regex pattern
* Fix mypy
* Simplify glob_to_regex
* Inline the glob_to_regex helper function
Signed-off-by: Dan Callahan <danc@element.io >
* Moar comments
Signed-off-by: Dan Callahan <danc@element.io >
Co-authored-by: Dan Callahan <danc@element.io >
2021-05-11 11:47:23 +02:00
Erik Johnston
2b2985b5cf
Improve performance of backfilling in large rooms. ( #9935 )
...
We were pulling the full auth chain for the room out of the DB each time
we backfilled, which can be *huge* for large rooms and is totally
unnecessary.
2021-05-10 13:29:02 +01:00
Richard van der Hoff
51065c44bb
Fix port_db on empty db ( #9930 )
...
... and test it.
2021-05-10 13:02:55 +01:00
Erik Johnston
7865bc1dfb
Always cache 'event_to_prev_state_group'
...
Fixes regression in send PDU times introduced in #9905 .
2021-05-07 14:55:22 +01:00
Erik Johnston
6c84778549
Always cache 'event_to_prev_state_group' ( #9950 )
...
Fixes regression in send PDU times introduced in #9905 .
2021-05-07 14:54:09 +01:00
Richard van der Hoff
765473567c
Fix make_full_schema to create the db with the right options and user ( #9931 )
2021-05-07 14:01:57 +01:00
Erik Johnston
b65ecaff9b
Merge remote-tracking branch 'origin/release-v1.33.2' into develop
2021-05-07 13:27:19 +01:00
Erik Johnston
4df26abf28
Unpin attrs dep after new version has been released ( #9946 )
...
c.f. #9936
2021-05-07 12:57:21 +01:00
Richard van der Hoff
25f43faa70
Reorganise the database schema directories ( #9932 )
...
The hope here is that by moving all the schema files into synapse/storage/schema, it gets a bit easier for newcomers to navigate.
It certainly got easier for me to write a helpful README. There's more to do on that front, but I'll follow up with other PRs for that.
2021-05-07 10:22:05 +01:00
Erik Johnston
8771b1337d
Export jemalloc stats to prometheus when used ( #9882 )
2021-05-06 15:54:07 +01:00
Erik Johnston
e11cd368b7
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-05-06 15:07:28 +01:00
Erik Johnston
eba431c539
Revert "Leave out optional keys from /sync ( #9919 )" ( #9940 )
...
This reverts commit e9eb3549d3 .
2021-05-06 15:06:35 +01:00
Erik Johnston
a8803e2b6e
Merge remote-tracking branch 'origin/master' into develop
2021-05-06 14:36:59 +01:00
Erik Johnston
ac88aca7f7
1.33.1
2021-05-06 14:06:38 +01:00
Erik Johnston
24f07a83e6
Pin attrs to <21.1.0 ( #9937 )
...
Fixes #9936
2021-05-06 14:06:06 +01:00
Erik Johnston
a8f48246b6
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-05-06 10:25:53 +01:00
Patrick Cloke
70f0ffd2fc
Follow-up to #9915 to correct the identifier for room types.
2021-05-05 16:31:16 -04:00
Patrick Cloke
d783880083
Include the time of the create event in Spaces Summary. ( #9928 )
...
This is an update based on changes to MSC2946. The origin_server_ts
of the m.room.create event is copied into the creation_ts field for each
room returned from the spaces summary.
2021-05-05 13:33:05 -04:00
Erik Johnston
37623e3382
Increase perf of handling presence when joining large rooms. ( #9916 )
2021-05-05 17:27:05 +01:00
Patrick Cloke
e2a443550e
Support stable MSC1772 spaces identifiers. ( #9915 )
...
Support both the unstable and stable identifiers. A future release
will disable the unstable identifiers.
2021-05-05 11:56:51 -04:00
Erik Johnston
ef889c98a6
Optionally track memory usage of each LruCache ( #9881 )
...
This will double count slightly in the presence of interned strings. It's off by default as it can consume a lot of resources.
2021-05-05 16:54:36 +01:00
Erik Johnston
1fb9a2d0bf
Limit how often GC happens by time. ( #9902 )
...
Synapse can be quite memory intensive, and unless care is taken to tune
the GC thresholds it can end up thrashing, causing noticable performance
problems for large servers. We fix this by limiting how often we GC a
given generation, regardless of current counts/thresholds.
This does not help with the reverse problem where the thresholds are set
too high, but that should only happen in situations where they've been
manually configured.
Adds a `gc_min_seconds_between` config option to override the defaults.
Fixes #9890 .
2021-05-05 16:53:45 +01:00
Erik Johnston
de8f0a03a3
Don't set the external cache if its been done recently ( #9905 )
2021-05-05 16:53:22 +01:00
Erik Johnston
d0aee697ac
Use get_current_users_in_room from store and not StateHandler ( #9910 )
2021-05-05 16:49:34 +01:00
Christopher May-Townsend
d5305000f1
Docker healthcheck timings - add startup delay and changed interval ( #9913 )
...
* Add healthcheck startup delay by 5secs and reduced interval check to 15s
to reduce waiting time for docker aware edge routers bringing an
instance online
2021-05-05 17:33:04 +02:00
DeepBlueV7.X
e9eb3549d3
Leave out optional keys from /sync ( #9919 )
...
This leaves out all optional keys from /sync. This should be fine for all clients tested against conduit already, but it may break some clients, as such we should check, that at least most of them don't break horribly and maybe back out some of the individual changes. (We can probably always leave out groups for example, while the others may cause more issues.)
Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de >
2021-05-05 14:37:56 +01:00
Brendan Abolivier
a61b13c0a1
Merge branch 'master' into develop
2021-05-05 14:25:49 +01:00
Brendan Abolivier
0644ac0989
1.33.0
2021-05-05 14:15:54 +01:00
Erik Johnston
e3bc4617fc
Time external cache response time ( #9904 )
2021-05-04 15:14:22 +01:00
Andrew Morgan
b85821aca2
Add port parameter to the sample config for psycopg2 args ( #9911 )
...
Adds the `port` option with the default value to the sample config file.
2021-05-04 13:28:59 +01:00
Dan Callahan
56c4b47df3
Build Debian packages for Ubuntu 21.04 Hirsute ( #9909 )
...
Signed-off-by: Dan Callahan <danc@element.io >
2021-04-30 15:36:05 +01:00
Andrew Morgan
4d624f467a
Merge tag 'v1.33.0rc2' into develop
...
Synapse 1.33.0rc2 (2021-04-29)
==============================
Bugfixes
--------
- Fix tight loop when handling presence replication when using workers. Introduced in v1.33.0rc1. ([\#9900](https://github.com/matrix-org/synapse/issues/9900 ))
2021-04-29 14:35:14 +01:00
Andrew Morgan
d11f2dfee5
typo in changelog
2021-04-29 14:31:14 +01:00
Patrick Cloke
bb4b11846f
Add missing type hints to handlers and fix a Spam Checker type hint. ( #9896 )
...
The user_may_create_room_alias method on spam checkers
declared the room_alias parameter as a str when in reality it is
passed a RoomAlias object.
2021-04-29 07:17:28 -04:00
Andrew Morgan
e9444cc74d
1.33.0rc2
2021-04-29 11:45:37 +01:00
Andrew Morgan
696e7df2e8
Merge branch 'release-v1.33.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2021-04-29 11:30:12 +01:00
ThibF
0085dc5abc
Delete room endpoint ( #9889 )
...
Support the delete of a room through DELETE request and mark
previous request as deprecated through documentation.
Signed-off-by: Thibault Ferrante <thibault.ferrante@pm.me >
2021-04-29 10:31:45 +01:00
Erik Johnston
802560211a
Merge remote-tracking branch 'origin/release-v1.33.0' into develop
2021-04-28 14:43:10 +01:00
Erik Johnston
e4ab8676b4
Fix tight loop handling presence replication. ( #9900 )
...
Only affects workers. Introduced in #9819 .
Fixes #9899 .
2021-04-28 14:42:50 +01:00
Patrick Cloke
10a08ab88a
Use the parent's logging context name for runWithConnection. ( #9895 )
...
This fixes a regression where the logging context for runWithConnection
was reported as runWithConnection instead of the connection name,
e.g. "POST-XYZ".
2021-04-28 07:44:52 -04:00
Andrew Morgan
fa6679e794
Merge tag 'v1.33.0rc1' into develop
...
Synapse 1.33.0rc1 (2021-04-28)
==============================
Features
--------
- Update experimental support for [MSC3083](https://github.com/matrix-org/matrix-doc/pull/3083 ): restricting room access via group membership. ([\#9800](https://github.com/matrix-org/synapse/issues/9800 ), [\#9814](https://github.com/matrix-org/synapse/issues/9814 ))
- Add experimental support for handling presence on a worker. ([\#9819](https://github.com/matrix-org/synapse/issues/9819 ), [\#9820](https://github.com/matrix-org/synapse/issues/9820 ), [\#9828](https://github.com/matrix-org/synapse/issues/9828 ), [\#9850](https://github.com/matrix-org/synapse/issues/9850 ))
- Return a new template when an user attempts to renew their account multiple times with the same token, stating that their account is set to expire. This replaces the invalid token template that would previously be shown in this case. This change concerns the optional account validity feature. ([\#9832](https://github.com/matrix-org/synapse/issues/9832 ))
Bugfixes
--------
- Fixes the OIDC SSO flow when using a `public_baseurl` value including a non-root URL path. ([\#9726](https://github.com/matrix-org/synapse/issues/9726 ))
- Fix thumbnail generation for some sites with non-standard content types. Contributed by @rkfg. ([\#9788](https://github.com/matrix-org/synapse/issues/9788 ))
- Add some sanity checks to identity server passed to 3PID bind/unbind endpoints. ([\#9802](https://github.com/matrix-org/synapse/issues/9802 ))
- Limit the size of HTTP responses read over federation. ([\#9833](https://github.com/matrix-org/synapse/issues/9833 ))
- Fix a bug which could cause Synapse to get stuck in a loop of resyncing device lists. ([\#9867](https://github.com/matrix-org/synapse/issues/9867 ))
- Fix a long-standing bug where errors from federation did not propagate to the client. ([\#9868](https://github.com/matrix-org/synapse/issues/9868 ))
Improved Documentation
----------------------
- Add a note to the docker docs mentioning that we mirror upstream's supported Docker platforms. ([\#9801](https://github.com/matrix-org/synapse/issues/9801 ))
Internal Changes
----------------
- Add a dockerfile for running Synapse in worker-mode under Complement. ([\#9162](https://github.com/matrix-org/synapse/issues/9162 ))
- Apply `pyupgrade` across the codebase. ([\#9786](https://github.com/matrix-org/synapse/issues/9786 ))
- Move some replication processing out of `generic_worker`. ([\#9796](https://github.com/matrix-org/synapse/issues/9796 ))
- Replace `HomeServer.get_config()` with inline references. ([\#9815](https://github.com/matrix-org/synapse/issues/9815 ))
- Rename some handlers and config modules to not duplicate the top-level module. ([\#9816](https://github.com/matrix-org/synapse/issues/9816 ))
- Fix a long-standing bug which caused `max_upload_size` to not be correctly enforced. ([\#9817](https://github.com/matrix-org/synapse/issues/9817 ))
- Reduce CPU usage of the user directory by reusing existing calculated room membership. ([\#9821](https://github.com/matrix-org/synapse/issues/9821 ))
- Small speed up for joining large remote rooms. ([\#9825](https://github.com/matrix-org/synapse/issues/9825 ))
- Introduce flake8-bugbear to the test suite and fix some of its lint violations. ([\#9838](https://github.com/matrix-org/synapse/issues/9838 ))
- Only store the raw data in the in-memory caches, rather than objects that include references to e.g. the data stores. ([\#9845](https://github.com/matrix-org/synapse/issues/9845 ))
- Limit length of accepted email addresses. ([\#9855](https://github.com/matrix-org/synapse/issues/9855 ))
- Remove redundant `synapse.types.Collection` type definition. ([\#9856](https://github.com/matrix-org/synapse/issues/9856 ))
- Handle recently added rate limits correctly when using `--no-rate-limit` with the demo scripts. ([\#9858](https://github.com/matrix-org/synapse/issues/9858 ))
- Disable invite rate-limiting by default when running the unit tests. ([\#9871](https://github.com/matrix-org/synapse/issues/9871 ))
- Pass a reactor into `SynapseSite` to make testing easier. ([\#9874](https://github.com/matrix-org/synapse/issues/9874 ))
- Make `DomainSpecificString` an `attrs` class. ([\#9875](https://github.com/matrix-org/synapse/issues/9875 ))
- Add type hints to `synapse.api.auth` and `synapse.api.auth_blocking` modules. ([\#9876](https://github.com/matrix-org/synapse/issues/9876 ))
- Remove redundant `_PushHTTPChannel` test class. ([\#9878](https://github.com/matrix-org/synapse/issues/9878 ))
- Remove backwards-compatibility code for Python versions < 3.6. ([\#9879](https://github.com/matrix-org/synapse/issues/9879 ))
- Small performance improvement around handling new local presence updates. ([\#9887](https://github.com/matrix-org/synapse/issues/9887 ))
2021-04-28 12:12:29 +01:00
Andrew Morgan
8ba086980d
Reword account validity template change to sound less like a bugfix
2021-04-28 12:07:49 +01:00
Erik Johnston
391bfe9a7b
Reduce memory footprint of caches ( #9886 )
2021-04-28 11:59:28 +01:00
Andrew Morgan
787de3190f
1.33.0rc1
2021-04-28 11:43:33 +01:00
Andrew Morgan
4e0fd35bc9
Revert "Experimental Federation Speedup ( #9702 )"
...
This reverts commit 05e8c70c05 .
2021-04-28 11:38:33 +01:00
Erik Johnston
dd2d32dcdb
Add type hints to presence handler ( #9885 )
2021-04-28 11:07:47 +01:00
Andrew Morgan
9979fef4fe
Revert "Experimental Federation Speedup ( #9702 )"
...
This reverts commit 05e8c70c05 .
2021-04-27 13:47:39 +01:00
Andrew Morgan
9773abf3d8
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2021-04-27 13:46:16 +01:00
Andrew Morgan
fe604a022a
Remove various bits of compatibility code for Python <3.6 ( #9879 )
...
I went through and removed a bunch of cruft that was lying around for compatibility with old Python versions. This PR also will now prevent Synapse from starting unless you're running Python 3.6+.
2021-04-27 13:13:07 +01:00
Patrick Cloke
1350b053da
Pass errors back to the client when trying multiple federation destinations. ( #9868 )
...
This ensures that something like an auth error (403) will be
returned to the requester instead of attempting to try more
servers, which will likely result in the same error, and then
passing back a generic 400 error.
2021-04-27 07:30:34 -04:00
Erik Johnston
0ffa5fb935
Use current state table for presence.get_interested_remotes ( #9887 )
...
This should be a lot quicker than asking the state handler.
2021-04-27 10:09:41 +01:00
Richard van der Hoff
3ff2251754
Improved validation for received requests ( #9817 )
...
* Simplify `start_listening` callpath
* Correctly check the size of uploaded files
2021-04-23 19:20:44 +01:00
Richard van der Hoff
84936e2264
Kill off _PushHTTPChannel. ( #9878 )
...
First of all, a fixup to `FakeChannel` which is needed to make it work with the default HTTP channel implementation.
Secondly, it looks like we no longer need `_PushHTTPChannel`, because as of #8013 , the producer that gets attached to the `HTTPChannel` is now an `IPushProducer`. This is good, because it means we can remove a whole load of test-specific boilerplate which causes variation between tests and production.
2021-04-23 18:40:57 +01:00
Andrew Morgan
695b73c861
Allow OIDC cookies to work on non-root public baseurls ( #9726 )
...
Applied a (slightly modified) patch from https://github.com/matrix-org/synapse/issues/9574 .
As far as I understand this would allow the cookie set during the OIDC flow to work on deployments using public baseurls that do not sit at the URL path root.
2021-04-23 18:22:47 +01:00
Richard van der Hoff
59d24c5bef
pass a reactor into SynapseSite ( #9874 )
2021-04-23 17:06:47 +01:00
Patrick Cloke
e83627926f
Add type hints to auth and auth_blocking. ( #9876 )
2021-04-23 12:02:16 -04:00
Erik Johnston
a15c003e5b
Make DomainSpecificString an attrs class ( #9875 )
2021-04-23 15:46:29 +01:00
Andrew Morgan
ceaa76970f
Remove room and user invite ratelimits in default unit test config ( #9871 )
2021-04-23 13:37:48 +01:00
Erik Johnston
9d25a0ae65
Split presence out of master ( #9820 )
2021-04-23 12:21:55 +01:00
Patrick Cloke
d924827da1
Check for space membership during a remote join of a restricted room ( #9814 )
...
When receiving a /send_join request for a room with join rules set to 'restricted',
check if the user is a member of the spaces defined in the 'allow' key of the join rules.
This only applies to an experimental room version, as defined in MSC3083.
2021-04-23 07:05:51 -04:00
Erik Johnston
3853a7edfc
Only store data in caches, not "smart" objects ( #9845 )
2021-04-23 11:47:07 +01:00
Richard van der Hoff
51a20914a8
Limit the size of HTTP responses read over federation. ( #9833 )
2021-04-23 11:08:41 +01:00
manuroe
c1ddbbde4f
Handle all new rate limits in demo scripts ( #9858 )
2021-04-22 17:49:42 +01:00
Erik Johnston
177dae2704
Limit length of accepted email addresses ( #9855 )
2021-04-22 17:49:11 +01:00
Richard van der Hoff
69018acbd2
Clear the resync bit after resyncing device lists ( #9867 )
...
Fixes #9866 .
2021-04-22 16:53:24 +01:00
Richard van der Hoff
294c675033
Remove synapse.types.Collection ( #9856 )
...
This is no longer required, since we have dropped support for Python 3.5.
2021-04-22 16:43:50 +01:00
Andrew Morgan
3186324260
Merge branch 'master' into develop
2021-04-22 11:23:56 +01:00
Andrew Morgan
0f2629ebc6
Merge tag 'v1.32.2'
...
Synapse 1.32.2 (2021-04-22)
===========================
This release includes a fix for a regression introduced in 1.32.0.
Bugfixes
--------
- Fix a regression in Synapse 1.32.0 and 1.32.1 which caused `LoggingContext` errors in plugins. ([\#9857](https://github.com/matrix-org/synapse/issues/9857 ))
2021-04-22 11:23:34 +01:00
Andrew Morgan
dac4445934
A regression can't be introduced twice
2021-04-22 11:09:31 +01:00
Andrew Morgan
79e6d9e4b1
Note regression was in 1.32.0 and 1.32.1
2021-04-22 11:04:51 +01:00
Andrew Morgan
ca380881b1
Update dates in changelogs
2021-04-21 18:47:31 +01:00
Andrew Morgan
55159c48e3
1.32.2
2021-04-21 18:45:39 +01:00
Andrew Morgan
ca6ecb8d67
Merge branch 'release-v1.32.1' of github.com:matrix-org/synapse into release-v1.32.2
2021-04-21 18:39:45 +01:00
Andrew Morgan
8798f2291c
Merge branch 'master' of github.com:matrix-org/synapse into develop
2021-04-21 18:21:56 +01:00
Andrew Morgan
046175daba
Merge branch 'release-v1.32.1' of github.com:matrix-org/synapse
2021-04-21 18:21:14 +01:00
Andrew Morgan
0c23aa393c
Note LoggingContext signature change incompatibility in 1.32.0 ( #9859 )
...
1.32.0 also introduced an incompatibility with Synapse modules that make use of `synapse.logging.context.LoggingContext`, such as [synapse-s3-storage-provider](https://github.com/matrix-org/synapse-s3-storage-provider ).
This PR adds a note to the 1.32.0 changelog and upgrade notes about it.
2021-04-21 18:16:58 +01:00
Richard van der Hoff
7b5022ee2e
Merge remote-tracking branch 'origin/release-v1.32.2' into matrix-org-hotfixes
2021-04-21 16:43:10 +01:00
Richard van der Hoff
f21a46216f
Merge branch 'release-v1.32.2' into matrix-org-hotfixes
2021-04-21 16:39:55 +01:00
Richard van der Hoff
d9bd62f9d1
Make LoggingContext's name optional ( #9857 )
...
Fixes https://github.com/matrix-org/synapse-s3-storage-provider/issues/55
2021-04-21 16:39:34 +01:00
Andrew Morgan
4b2217ace2
Merge branch 'master' into develop
2021-04-21 14:55:06 +01:00
Andrew Morgan
a0972085ed
Merge tag 'v1.32.1'
...
Synapse 1.32.1 (2021-04-21)
===========================
This release fixes [a regression](https://github.com/matrix-org/synapse/issues/9853 ) in Synapse 1.32.0 that caused connected Prometheus instances to become unstable. If you ran Synapse 1.32.0 with Prometheus metrics, first upgrade to Synapse 1.32.1 and follow [these instructions](https://github.com/matrix-org/synapse/pull/9854#issuecomment-823472183 ) to clean up any excess writeahead logs.
Bugfixes
--------
- Fix a regression in Synapse 1.32.0 which caused Synapse to report large numbers of Prometheus time series, potentially overwhelming Prometheus instances. ([\#9854](https://github.com/matrix-org/synapse/issues/9854 ))
2021-04-21 14:54:03 +01:00
Andrew Morgan
bdb4c20dc1
Clarify 1.32.0/1 changelog and upgrade notes
2021-04-21 14:44:04 +01:00
Andrew Morgan
acb8c81041
Add regression notes to CHANGES.md; fix link in 1.32.0 changelog
2021-04-21 14:24:16 +01:00
Andrew Morgan
98a1b84631
Add link to fixing prometheus to 1.32.0 upgrade notes; 1.32.1 has a fix
2021-04-21 14:19:11 +01:00
Andrew Morgan
026a66f2b3
Fix typo in link to regression in 1.32.0 upgrade notes
2021-04-21 14:04:44 +01:00
Andrew Morgan
a745531c10
1.32.1
2021-04-21 14:01:12 +01:00
Andrew Morgan
30c94862b4
Mention Prometheus metrics regression in v1.32.0
2021-04-21 14:00:31 +01:00
Andrew Morgan
a468d19fd6
Merge branch 'release-v1.32.1' into matrix-org-hotfixes
2021-04-21 10:26:43 +01:00
Richard van der Hoff
5d281c10dd
Stop BackgroundProcessLoggingContext making new prometheus timeseries ( #9854 )
...
This undoes part of b076bc276e .
2021-04-21 10:03:31 +01:00
Patrick Cloke
683d6f75af
Rename handler and config modules which end in handler/config. ( #9816 )
2021-04-20 14:55:20 -04:00
Andrew Morgan
eccacd72cb
Merge branch 'master' into develop
2021-04-20 17:14:15 +01:00
Andrew Morgan
b8c5f6fddb
Mention Prometheus metrics regression in v1.32.0
2021-04-20 17:11:36 +01:00
Andrew Morgan
272402c4d7
Merge branch 'master' into develop
2021-04-20 16:07:53 +01:00
Andrew Morgan
05fa06834d
Further tweaking on gpg signing key notice
2021-04-20 15:52:06 +01:00
Andrew Morgan
913f790bb2
Add note about expired Debian gpg signing keys to CHANGES.md
2021-04-20 15:33:56 +01:00
Andrew Morgan
6982db9651
Merge branch 'master' into develop
2021-04-20 14:55:16 +01:00
Andrew Morgan
438a8594cb
Update v1.32.0 changelog. It's m.login.application_service, not plural
2021-04-20 14:47:17 +01:00
Andrew Morgan
e031c7e0cc
1.32.0
2021-04-20 14:31:27 +01:00
Andrew Morgan
0a88ec0a87
Add Application Service registration type requirement + py35, pg95 deprecation notices to v1.32.0 upgrade notes ( #9849 )
...
Fixes https://github.com/matrix-org/synapse/issues/9846 .
Adds important removal information from the top of https://github.com/matrix-org/synapse/releases/tag/v1.32.0rc1 into UPGRADE.rst.
2021-04-20 14:19:35 +01:00
Patrick Cloke
b076bc276e
Always use the name as the log ID. ( #9829 )
...
As far as I can tell our logging contexts are meant to log the request ID, or sometimes the request ID followed by a suffix (this is generally stored in the name field of LoggingContext). There's also code to log the name@memory location, but I'm not sure this is ever used.
This simplifies the code paths to require every logging context to have a name and use that in logging. For sub-contexts (created via nested_logging_contexts, defer_to_threadpool, Measure) we use the current context's str (which becomes their name or the string "sentinel") and then potentially modify that (e.g. add a suffix).
2021-04-20 14:19:00 +01:00
Erik Johnston
de0d088adc
Add presence federation stream ( #9819 )
2021-04-20 14:11:24 +01:00
Erik Johnston
db70435de7
Fix bug where we sent remote presence states to remote servers ( #9850 )
2021-04-20 13:37:54 +01:00
Jonathan de Jong
495b214f4f
Fix (final) Bugbear violations ( #9838 )
2021-04-20 11:50:49 +01:00
Andrew Morgan
71f0623de9
Port "Allow users to click account renewal links multiple times without hitting an 'Invalid Token' page #74 " from synapse-dinsic ( #9832 )
...
This attempts to be a direct port of https://github.com/matrix-org/synapse-dinsic/pull/74 to mainline. There was some fiddling required to deal with the changes that have been made to mainline since (mainly dealing with the split of `RegistrationWorkerStore` from `RegistrationStore`, and the changes made to `self.make_request` in test code).
2021-04-19 19:16:34 +01:00
Richard van der Hoff
edac710bc0
improve efficiency of _glob_to_re
2021-04-19 19:03:38 +01:00
Denis Kasak
e694a598f8
Sanity check identity server passed to bind/unbind. ( #9802 )
...
Signed-off-by: Denis Kasak <dkasak@termina.org.uk >
2021-04-19 17:21:46 +01:00
Andrew Morgan
bf4ad8070e
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2021-04-19 14:32:50 +01:00
Erik Johnston
2b7dd21655
Don't send normal presence updates over federation replication stream ( #9828 )
2021-04-19 10:50:49 +01:00
Andrew Morgan
c571736c6c
User directory: use calculated room membership state instead ( #9821 )
...
Fixes : #9797 .
Should help reduce CPU usage on the user directory, especially when memberships change in rooms with lots of state history.
2021-04-16 18:17:18 +01:00
Erik Johnston
601b893352
Small speed up joining large remote rooms ( #9825 )
...
There are a couple of points in `persist_events` where we are doing a
query per event in series, which we can replace.
2021-04-16 14:44:55 +01:00
Richard van der Hoff
5a153772c1
remove HomeServer.get_config ( #9815 )
...
Every single time I want to access the config object, I have to remember
whether or not we use `get_config`. Let's just get rid of it.
2021-04-14 19:09:08 +01:00
Patrick Cloke
936e69825a
Separate creating an event context from persisting it in the federation handler ( #9800 )
...
This refactoring allows adding logic that uses the event context
before persisting it.
2021-04-14 12:35:28 -04:00
Patrick Cloke
e8816c6ace
Revert "Check for space membership during a remote join of a restricted room. ( #9763 )"
...
This reverts commit cc51aaaa7a .
The PR was prematurely merged and not yet approved.
2021-04-14 12:33:37 -04:00
Patrick Cloke
cc51aaaa7a
Check for space membership during a remote join of a restricted room. ( #9763 )
...
When receiving a /send_join request for a room with join rules set to 'restricted',
check if the user is a member of the spaces defined in the 'allow' key of the join
rules.
This only applies to an experimental room version, as defined in MSC3083.
2021-04-14 12:32:20 -04:00
Jonathan de Jong
05e8c70c05
Experimental Federation Speedup ( #9702 )
...
This basically speeds up federation by "squeezing" each individual dual database call (to destinations and destination_rooms), which previously happened per every event, into one call for an entire batch (100 max).
Signed-off-by: Jonathan de Jong <jonathan@automatia.nl >
2021-04-14 17:19:02 +01:00
Erik Johnston
00a6db9676
Move some replication processing out of generic_worker ( #9796 )
...
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2021-04-14 17:06:06 +01:00
rkfg
c9a2b5d402
More robust handling of the Content-Type header for thumbnail generation ( #9788 )
...
Signed-off-by: Sergey Shpikin <rkfg@rkfg.me >
2021-04-14 16:30:59 +01:00
Jonathan de Jong
4b965c862d
Remove redundant "coding: utf-8" lines ( #9786 )
...
Part of #9744
Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now.
`Signed-off-by: Jonathan de Jong <jonathan@automatia.nl >`
2021-04-14 15:34:27 +01:00
Andrew Morgan
7e460ec2a5
Add a dockerfile for running a set of Synapse worker processes ( #9162 )
...
This PR adds a Dockerfile and some supporting files to the `docker/` directory. The Dockerfile's intention is to spin up a container with:
* A Synapse main process.
* Any desired worker processes, defined by a `SYNAPSE_WORKERS` environment variable supplied at runtime.
* A redis for worker communication.
* A nginx for routing traffic.
* A supervisord to start all worker processes and monitor them if any go down.
Note that **this is not currently intended to be used in production**. If you'd like to use Synapse workers with Docker, instead make use of the official image, with one worker per container. The purpose of this dockerfile is currently to allow testing Synapse in worker mode with the [Complement](https://github.com/matrix-org/complement/ ) test suite.
`configure_workers_and_start.py` is where most of the magic happens in this PR. It reads from environment variables (documented in the file) and creates all necessary config files for the processes. It is the entrypoint of the Dockerfile, and thus is run any time the docker container is spun up, recreating all config files in case you want to use a different set of workers. One can specify which workers they'd like to use by setting the `SYNAPSE_WORKERS` environment variable (as a comma-separated list of arbitrary worker names) or by setting it to `*` for all worker processes. We will be using the latter in CI.
Huge thanks to @MatMaul for helping get this all working 🎉 This PR is paired with its equivalent on the Complement side: https://github.com/matrix-org/complement/pull/62 .
Note, for the purpose of testing this PR before it's merged: You'll need to (re)build the base Synapse docker image for everything to work (`matrixdotorg/synapse:latest`). Then build the worker-based docker image on top (`matrixdotorg/synapse:workers`).
2021-04-14 13:54:49 +01:00
Andrew Morgan
f16c6cf59a
Add note to docker docs explaining platform support ( #9801 )
...
Context is in https://github.com/matrix-org/synapse/issues/9764#issuecomment-818615894 .
I struggled to find a more official link for this. The problem occurs when using WSL1 instead of WSL2, which some Windows platforms (at least Server 2019) still don't have. Docker have updated their documentation to paint a much happier picture now given WSL2's support.
The last sentence here can probably be removed once WSL1 is no longer around... though that will likely not be for a very long time.
2021-04-14 12:06:19 +01:00
Andrew Morgan
118e789e0c
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2021-04-13 16:10:20 +01:00
Andrew Morgan
77866a5f5f
Merge branch 'matrix-org-hotfixes' of github.com:matrix-org/synapse into matrix-org-hotfixes
2021-04-13 16:10:07 +01:00
Andrew Morgan
d9bd181a3f
Update changelog for v1.32.0
2021-04-13 14:39:06 +01:00
Andrew Morgan
3efd98aa1c
1.32.0rc1
2021-04-13 14:23:43 +01:00
Erik Johnston
c1dbe84c3d
Add release helper script ( #9713 )
...
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2021-04-13 11:51:10 +01:00
Dan Callahan
1d5f0e3529
Bump black configuration to target py36 ( #9781 )
...
Signed-off-by: Dan Callahan <danc@element.io >
2021-04-13 10:41:34 +01:00
Dirk Klimpel
1fc97ee876
Add an admin API to manage ratelimit for a specific user ( #9648 )
2021-04-13 10:26:37 +01:00
Dan Callahan
a7044e5c0f
Drop Python 3.5 from Trove classifier metadata. ( #9782 )
...
* Drop Python 3.5 from Trove classifier metadata.
Signed-off-by: Dan Callahan <danc@element.io >
2021-04-12 16:00:28 +01:00
Dan Callahan
3efde8b69a
Add option to skip unit tests when building debs ( #9793 )
...
Signed-off-by: Dan Callahan <danc@element.io >
2021-04-12 15:27:05 +01:00
Will Hunt
e300ef64b1
Require AppserviceRegistrationType ( #9548 )
...
This change ensures that the appservice registration behaviour follows the spec. We decided to do this for Dendrite, so it made sense to also make a PR for synapse to correct the behaviour.
2021-04-12 15:13:55 +01:00
Patrick Cloke
0b3112123d
Use mock from the stdlib. ( #9772 )
2021-04-09 13:44:38 -04:00
Richard van der Hoff
f946450184
Fix duplicate logging of exceptions in transaction processing ( #9780 )
...
There's no point logging this twice.
2021-04-09 18:12:15 +01:00
Patrick Cloke
abc814dcbf
Enable complement tests for MSC2946. ( #9771 )
...
By providing the additional build tag for `msc2946`.
2021-04-09 08:11:51 -04:00
Dan Callahan
0277b8f3e6
Proof of concept for GitHub Actions ( #9661 )
...
Signed-off-by: Dan Callahan <danc@element.io >
2021-04-09 10:54:30 +01:00
Dirk Klimpel
48a1f4db31
Remove old admin API GET /_synapse/admin/v1/users/<user_id> ( #9401 )
...
Related: #8334
Deprecated in: #9429 - Synapse 1.28.0 (2021-02-25)
`GET /_synapse/admin/v1/users/<user_id>` has no
- unit tests
- documentation
API in v2 is available (#5925 - 12/2019, v1.7.0).
API is misleading. It expects `user_id` and returns a list of all users.
Signed-off-by: Dirk Klimpel dirk@klimpel.org
2021-04-09 09:44:40 +01:00
Jonathan de Jong
2ca4e349e9
Bugbear: Add Mutable Parameter fixes ( #9682 )
...
Part of #9366
Adds in fixes for B006 and B008, both relating to mutable parameter lint errors.
Signed-off-by: Jonathan de Jong <jonathan@automatia.nl >
2021-04-08 22:38:54 +01:00
Richard van der Hoff
64f4f506c5
Merge pull request #9766 from matrix-org/rav/drop_py35
...
Require py36, Postgres 9.6, and sqlite 3.22
2021-04-08 19:29:03 +01:00
Richard van der Hoff
9e167d9c53
Merge remote-tracking branch 'origin/develop' into rav/drop_py35
2021-04-08 18:30:38 +01:00
Richard van der Hoff
24c58ebfc9
remove unused param on make_tuple_comparison_clause
2021-04-08 18:29:57 +01:00
Richard van der Hoff
88b9414e32
Merge pull request #9769 from matrix-org/rav/fix_bionic
...
Fix incompatibility with bionic
2021-04-08 18:26:51 +01:00
Erik Johnston
be0e722fe1
Merge branch 'erikj/fix_stalled_catchup' into develop
2021-04-08 18:05:35 +01:00
Erik Johnston
053c8c019f
Merge branch 'erikj/fix_stalled_catchup' into matrix-org-hotfixes
2021-04-08 18:05:22 +01:00
Erik Johnston
3a569fb200
Fix sharded federation sender sometimes using 100% CPU.
...
We pull all destinations requiring catchup from the DB in batches.
However, if all those destinations get filtered out (due to the
federation sender being sharded), then the `last_processed` destination
doesn't get updated, and we keep requesting the same set repeatedly.
2021-04-08 17:34:07 +01:00
Richard van der Hoff
77e56deffc
update test_old_deps script
2021-04-08 16:44:07 +01:00
Richard van der Hoff
04ff88139a
Update tox.ini to remove py35
2021-04-08 16:43:04 +01:00
Richard van der Hoff
9278eb701e
drop support for stretch and xenial
2021-04-08 16:42:32 +01:00
Richard van der Hoff
3ada9b4264
Drop support for sqlite<3.22 as well
2021-04-08 16:42:32 +01:00
Richard van der Hoff
abade34633
Require py36 and Postgres 9.6
2021-04-08 16:42:32 +01:00
Richard van der Hoff
906065c75b
unpin olddeps build from py36
2021-04-08 16:41:35 +01:00
Richard van der Hoff
5edd91caec
Fix incompatibility with tox 2.5
...
Apparently on tox 2.5, `usedevelop` overrides `skip_install`, so we end up
trying to install the full dependencies even for the `-old` environment.
2021-04-08 16:22:45 +01:00
Johannes Wienke
cb657eb2f8
Put opencontainers labels to the final image ( #9765 )
...
They don't make any sense on the intermediate builder image. The final
images needs them to be of use for anyone.
Signed-off-by: Johannes Wienke <languitar@semipol.de >
2021-04-08 13:49:14 +01:00
Patrick Cloke
452991527a
MSC3083: Check for space membership during a local join of restricted rooms. ( #9735 )
...
When joining a room with join rules set to 'restricted', check if the
user is a member of the spaces defined in the 'allow' key of the join rules.
This only applies to an experimental room version, as defined in MSC3083.
2021-04-08 08:28:32 -04:00
Patrick Cloke
fbcc8703dc
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-04-08 08:10:56 -04:00
Patrick Cloke
48d44ab142
Record more information into structured logs. ( #9654 )
...
Records additional request information into the structured logs,
e.g. the requester, IP address, etc.
2021-04-08 08:01:14 -04:00
Andrew Morgan
0d87c6bd12
Don't report anything from GaugeBucketCollector metrics until data is present ( #8926 )
...
This PR modifies `GaugeBucketCollector` to only report data once it has been updated, rather than initially reporting a value of 0. Fixes zero values being reported for some metrics on startup until a background job to update the metric's value runs later.
2021-04-06 16:32:04 +01:00
Andrew Morgan
04819239ba
Add a Synapse Module for configuring presence update routing ( #9491 )
...
At the moment, if you'd like to share presence between local or remote users, those users must be sharing a room together. This isn't always the most convenient or useful situation though.
This PR adds a module to Synapse that will allow deployments to set up extra logic on where presence updates should be routed. The module must implement two methods, `get_users_for_states` and `get_interested_users`. These methods are given presence updates or user IDs and must return information that Synapse will use to grant passing presence updates around.
A method is additionally added to `ModuleApi` which allows triggering a set of users to receive the current, online presence information for all users they are considered interested in. This is the equivalent of that user receiving presence information during an initial sync.
The goal of this module is to be fairly generic and useful for a variety of applications, with hard requirements being:
* Sending state for a specific set or all known users to a defined set of local and remote users.
* The ability to trigger an initial sync for specific users, so they receive all current state.
2021-04-06 14:38:30 +01:00
Patrick Cloke
44bb881096
Add type hints to expiring cache. ( #9730 )
2021-04-06 08:58:18 -04:00
Andrew Morgan
024f121b74
Fix reported bugbear: too broad exception assertion ( #9753 )
2021-04-06 13:48:22 +01:00
Richard van der Hoff
0ef321ff3b
Remove outdated constraint on remote_media_cache_thumbnails ( #9725 )
...
The `remote_media_cache_thumbnails_media_origin_media_id_thumbna_key`
constraint is superceded by
`remote_media_repository_thumbn_media_origin_id_width_height_met` (which adds
`thumbnail_method` to the unique key).
PR #7124 made an attempt to remove the old constraint, but got the name wrong,
so it didn't work. Here we update the bg update and rerun it.
Fixes #8649 .
2021-04-06 13:36:05 +01:00
Erik Johnston
5688a74cf3
Merge branch 'master' into develop
2021-04-06 13:29:29 +01:00
Erik Johnston
1d8863c67d
1.31.0
2021-04-06 13:09:56 +01:00
Erik Johnston
a888cbdd31
Add deprecation policy doc ( #9723 )
...
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2021-04-06 13:07:36 +01:00
Jonathan de Jong
fc8695d621
Fix version for bugbear ( #9734 )
2021-04-06 12:48:37 +01:00
Patrick Cloke
d959d28730
Add type hints to the federation handler and server. ( #9743 )
2021-04-06 07:21:57 -04:00
Patrick Cloke
e7b769aea1
Convert storage test cases to HomeserverTestCase. ( #9736 )
2021-04-06 07:21:02 -04:00
Jonathan de Jong
e2b8a90897
Update mypy configuration: no_implicit_optional = True ( #9742 )
2021-04-05 09:10:18 -04:00
Jonathan de Jong
4609e58970
Fix version for bugbear ( #9734 )
2021-04-02 11:22:21 +01:00
Erik Johnston
33548f37aa
Improve tracing for to device messages ( #9686 )
2021-04-01 17:08:21 +01:00
Dirk Klimpel
bb0fe02a52
Add order_by to list user admin API ( #9691 )
2021-04-01 11:28:53 +01:00
Patrick Cloke
35c5ef2d24
Add an experimental room version to support restricted join rules. ( #9717 )
...
Per MSC3083.
2021-03-31 16:39:08 -04:00
Patrick Cloke
e32294f54b
Merge branch 'release-v1.31.0' into develop
2021-03-31 14:19:14 -04:00
Patrick Cloke
5fe38e07e7
Revert "Use 'dmypy run' in lint.sh instead of 'mypy' ( #9701 )" ( #9720 )
2021-03-31 14:17:52 -04:00
Denis Kasak
5ff8eb97c6
Make sample config allowed_local_3pids regex stricter. ( #9719 )
...
The regex should be terminated so that subdomain matches of another
domain are not accepted. Just ensuring that someone doesn't shoot
themselves in the foot by copying our example.
Signed-off-by: Denis Kasak <dkasak@termina.org.uk >
2021-03-31 12:27:20 +00:00
Cristina
670564446c
Deprecate imp ( #9718 )
...
Fixes #9642 .
Signed-off-by: Cristina Muñoz <hi@xmunoz.com >
2021-03-31 12:04:27 +01:00
Andrew Morgan
ac99774dac
Rewrite complement.sh ( #9685 )
...
This PR rewrites the original complement.sh script with a number of improvements:
* We can now use a local checkout of Complement (configurable with `COMPLEMENT_DIR`), though the default behaviour still downloads the master branch.
* You can now specify a regex of test names to run, or just run all tests.
* We now use the Synapse test blacklist tag (so all tests will pass).
2021-03-31 11:58:12 +01:00
Richard van der Hoff
4dabcf026e
Include m.room.create in invite_room_state for Spaces ( #9710 )
2021-03-30 14:03:17 +01:00
Richard van der Hoff
f02663c4dd
Replace room_invite_state_types with room_prejoin_state ( #9700 )
...
`room_invite_state_types` was inconvenient as a configuration setting, because
anyone that ever set it would not receive any new types that were added to the
defaults. Here, we deprecate the old setting, and replace it with a couple of
new settings under `room_prejoin_state`.
2021-03-30 12:12:44 +01:00
Erik Johnston
963f4309fe
Make RateLimiter class check for ratelimit overrides ( #9711 )
...
This should fix a class of bug where we forget to check if e.g. the appservice shouldn't be ratelimited.
We also check the `ratelimit_override` table to check if the user has ratelimiting disabled. That table is really only meant to override the event sender ratelimiting, so we don't use any values from it (as they might not make sense for different rate limits), but we do infer that if ratelimiting is disabled for the user we should disabled all ratelimits.
Fixes #9663
2021-03-30 12:06:09 +01:00
Erik Johnston
f46b864748
Merge remote-tracking branch 'origin/release-v1.31.0' into matrix-org-hotfixes
2021-03-30 11:41:52 +01:00
Erik Johnston
3a446c21f8
Update changelog
2021-03-30 11:29:21 +01:00
Erik Johnston
78e48f61bf
1.31.0rc1
2021-03-30 11:19:21 +01:00
Andrew Morgan
f380bb77d1
Use 'dmypy run' in lint.sh instead of 'mypy' ( #9701 )
...
For it's obvious performance benefits. `dmypy` support landed in #9692 .
2021-03-30 10:30:43 +01:00
Patrick Cloke
01dd90b0f0
Add type hints to DictionaryCache and TTLCache. ( #9442 )
2021-03-29 12:15:33 -04:00
blakehawkins
7dcf3fd221
Clarify that register_new_matrix_user is present also when installed via non-pip package ( #9074 )
...
Signed-off-by: blakehawkins blake.hawkins.11@gmail.com
2021-03-29 17:05:06 +01:00
Patrick Cloke
da75d2ea1f
Add type hints for the federation sender. ( #9681 )
...
Includes an abstract base class which both the FederationSender
and the FederationRemoteSendQueue must implement.
2021-03-29 11:43:20 -04:00
Richard van der Hoff
4bbd535450
Update the OIDC sample config ( #9695 )
...
I've reiterated the advice about using `oidc` to migrate, since I've seen a few
people caught by this.
I've also removed a couple of the examples as they are duplicating the OIDC
documentation, and I think they might be leading people astray.
2021-03-29 15:40:11 +01:00
Andrew Morgan
5fdff97719
Fix CI by ignore type for None module import ( #9709 )
2021-03-29 14:42:38 +01:00
Jonathan de Jong
fc53a606e4
Fix re.Pattern mypy error on 3.6 ( #9703 )
2021-03-29 09:40:45 -04:00
Richard van der Hoff
ad8690a26c
Fix the suggested pip incantation for cryptography ( #9699 )
...
If you have the wrong version of `cryptography` installed, synapse suggests:
```
To install run:
pip install --upgrade --force 'cryptography>=3.4.7;python_version>='3.6''
```
However, the use of ' inside '...' doesn't work, so when you run this, you get
an error.
2021-03-29 11:55:33 +01:00
Eric Eastwood
0a778c135f
Make pip install faster in Docker build for Complement testing ( #9610 )
...
Make pip install faster in Docker build for [Complement](https://github.com/matrix-org/complement ) testing.
If files have changed in a `COPY` command, Docker will invalidate all of the layers below. So I changed the order of operations to install all dependencies before we `COPY synapse /synapse/synapse/`. This allows Docker to use our cached layer of dependencies even when we change the source of Synapse and speed up builds dramatically! `53.5s` -> `3.7s` builds 🤘
As an alternative, I did try using BuildKit caches but this still took 30 seconds overall on that step. 15 seconds to gather the dependencies from the cache and another 15 seconds to `Installing collected packages`.
Fix https://github.com/matrix-org/synapse/issues/9364
2021-03-26 18:42:58 +00:00
Richard van der Hoff
7c8402ddb8
Suppress CryptographyDeprecationWarning ( #9698 )
...
This warning is somewhat confusing to users, so let's suppress it
2021-03-26 17:33:55 +00:00
Erik Johnston
b5efcb577e
Make it possible to use dmypy ( #9692 )
...
Running `dmypy run` will do a `mypy` check while spinning up a daemon
that makes rerunning `dmypy run` a lot faster.
`dmypy` doesn't support `follow_imports = silent` and has
`local_partial_types` enabled, so this PR enables those options and
fixes the issues that were newly raised. Note that `local_partial_types`
will be enabled by default in upcoming mypy releases.
2021-03-26 16:49:46 +00:00
Erik Johnston
2b8650547f
Merge tag 'v1.30.1' into matrix-org-hotfixes
...
Synapse 1.30.1 (2021-03-26)
===========================
This release is identical to Synapse 1.30.0, with the exception of explicitly
setting a minimum version of Python's Cryptography library to ensure that users
of Synapse are protected from the recent [OpenSSL security advisories](https://mta.openssl.org/pipermail/openssl-announce/2021-March/000198.html ),
especially CVE-2021-3449.
Note that Cryptography defaults to bundling its own statically linked copy of
OpenSSL, which means that you may not be protected by your operating system's
security updates.
It's also worth noting that Cryptography no longer supports Python 3.5, so
admins deploying to older environments may not be protected against this or
future vulnerabilities. Synapse will be dropping support for Python 3.5 at the
end of March.
Updates to the Docker image
---------------------------
- Ensure that the docker container has up to date versions of openssl. ([\#9697](https://github.com/matrix-org/synapse/issues/9697 ))
Internal Changes
----------------
- Enforce that `cryptography` dependency is up to date to ensure it has the most recent openssl patches. ([\#9697](https://github.com/matrix-org/synapse/issues/9697 ))
2021-03-26 14:44:31 +00:00
Erik Johnston
019010964d
Merge branch 'master' into develop
2021-03-26 12:26:58 +00:00
Erik Johnston
262ed05f5b
Update cahngelog
2021-03-26 12:21:04 +00:00
Erik Johnston
548c4a6587
Update cahngelog
2021-03-26 12:17:37 +00:00
Erik Johnston
c6f8e8086c
1.30.1
2021-03-26 12:03:29 +00:00
Erik Johnston
12d6184713
Explicitly upgrade openssl in docker file and enforce new version of cryptography ( #9697 )
2021-03-26 12:00:25 +00:00
Paul Tötterman
d7d4232a2d
Preserve host in example apache config ( #9696 )
...
Fixes redirect loop
Signed-off-by: Paul Tötterman <paul.totterman@iki.fi >
2021-03-26 10:38:31 +00:00
Quentin Gliech
d4c4798a25
Use interpreter from $PATH instead of absolute paths in various scripts using /usr/bin/env ( #9689 )
...
On NixOS, `bash` isn't under `/bin/bash` but rather in some directory in `$PATH`. Locally, I've been patching those scripts to make them work.
`/usr/bin/env` seems to be the only [portable way](https://unix.stackexchange.com/questions/29608/why-is-it-better-to-use-usr-bin-env-name-instead-of-path-to-name-as-my ) to use binaries from the PATH as interpreters.
Signed-off-by: Quentin Gliech <quentingliech@gmail.com >
2021-03-25 16:53:54 +00:00
Serban Constantin
e5801db830
platform specific prerequisites in source install ( #9667 )
...
Make it clearer in the source install step that the platform specific
prerequisites must be installed first.
Signed-off-by: Serban Constantin <serban.constantin@gmail.com >
2021-03-25 15:31:26 +00:00
Andrew Morgan
fae81f2f68
Add a storage method for returning all current presence from all users ( #9650 )
...
Split off from https://github.com/matrix-org/synapse/pull/9491
Adds a storage method for getting the current presence of all local users, optionally excluding those that are offline. This will be used by the code in #9491 when a PresenceRouter module informs Synapse that a given user should have `"ALL"` user presence updates routed to them. Specifically, it is used here: b588f16e39/synapse/handlers/presence.py (L1131-L1133)
Note that there is a `get_all_presence_updates` function just above. That function is intended to walk up the table through stream IDs, and is primarily used by the presence replication stream. I could possibly make use of it in the PresenceRouter-related code, but it would be a bit of a bodge.
2021-03-25 10:34:23 +00:00
Erik Johnston
f36a060d2c
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-03-24 16:13:19 +00:00
Erik Johnston
c602ba8336
Fixed undefined variable error in catchup ( #9664 )
...
Broke in #9640
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2021-03-24 16:12:47 +00:00
Patrick Cloke
c2d4bd62a2
Fix typo in changelog.
2021-03-24 11:32:42 -04:00
Jonathan de Jong
4c3827f2c1
Enable addtional flake8-bugbear linting checks. ( #9659 )
2021-03-24 09:34:30 -04:00
Richard van der Hoff
ea74189a90
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-03-24 12:45:54 +00:00
Richard van der Hoff
c73cc2c2ad
Spaces summary: call out to other servers ( #9653 )
...
When we hit an unknown room in the space tree, see if there are other servers that we might be able to poll to get the data.
Fixes : #9447
2021-03-24 12:45:39 +00:00
Ben Banfield-Zanin
4655d2221e
docs: fallback/web endpoint does not appear to be mounted on workers ( #9679 )
2021-03-24 11:43:04 +00:00
Patrick Cloke
83de0be4b0
Bump mypy-zope to 0.2.13. ( #9678 )
...
This fixes an error ("Cannot determine consistent method resolution order (MRO)")
when running mypy with a cache.
2021-03-24 07:35:43 -04:00
Patrick Cloke
af387cf52a
Add type hints to misc. files. ( #9676 )
2021-03-24 06:49:01 -04:00
Patrick Cloke
7e8dc9934e
Add a type hints for service notices to the HomeServer object. ( #9675 )
2021-03-24 06:48:46 -04:00
Erik Johnston
e550ab17ad
Increase default join burst ratelimiting ( #9674 )
...
It's legitimate behaviour to try and join a bunch of rooms at once.
2021-03-23 14:52:20 +00:00
Jonathan de Jong
0caf2a338e
Fix federation stall on concurrent access errors ( #9639 )
2021-03-23 13:52:30 +00:00
Richard van der Hoff
4ecba9bd5c
Federation API for Space summary ( #9652 )
...
Builds on the work done in #9643 to add a federation API for space summaries.
There's a bit of refactoring of the existing client-server code first, to avoid too much duplication.
2021-03-23 11:51:12 +00:00
Patrick Cloke
b7748d3c00
Import HomeServer from the proper module. ( #9665 )
2021-03-23 07:12:48 -04:00
Andrew Morgan
05ec9e8d37
Revert "Patch to temporarily drop cross-user m.key_share_requests ( #8675 )" ( #9668 )
...
We patched `matrix-org-hotfixes` a little while ago in #8675 to drop any cross-user key share requests while they were being accidentally spammed by a client. This was a temporary fix until we had some rate-limiting in place.
Rate-limiting landed in https://github.com/matrix-org/synapse/pull/8957 . Note that the rate-limit can't be configured, but has what appear to be [sensible defaults](db2efa9c50/synapse/config/ratelimiting.py (L105-L113) ).
Note that the original patch was already actually overridden partially when the rate-limit PR landed, as they conflicted. So we've already lifted the restriction between local devices on matrix.org, but requests were still blocked from being sent over federation. This PR cleans up the remaining bits.
This reverts commit d60af9305a .
2021-03-23 10:53:05 +00:00
Andrew Morgan
6557eba7dc
Revert "Patch to temporarily drop cross-user m.key_share_requests ( #8675 )"
...
This reverts commit d60af9305a .
2021-03-23 10:24:03 +00:00
Andrew Morgan
5b268997bd
Allow providing credentials to HTTPS_PROXY ( #9657 )
...
Addresses https://github.com/matrix-org/synapse-dinsic/issues/70
This PR causes `ProxyAgent` to attempt to extract credentials from an `HTTPS_PROXY` env var. If credentials are found, a `Proxy-Authorization` header ([details](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Proxy-Authorization )) is sent to the proxy server to authenticate against it. The headers are *not* passed to the remote server.
Also added some type hints.
2021-03-22 17:20:47 +00:00
Johannes Wienke
4612302399
Include opencontainers labels in Docker image ( #9612 )
...
Cf. https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys
Signed-off-by: Johannes Wienke <languitar@semipol.de >
2021-03-22 15:31:00 +00:00
Ankit Dobhal
d66f9070cd
Fixed code misc. quality issues ( #9649 )
...
- Merge 'isinstance' calls.
- Remove unnecessary dict call outside of comprehension.
- Use 'sys.exit()' calls.
2021-03-22 11:18:13 -04:00
Erik Johnston
d600d4506b
Merge branch 'master' into develop
2021-03-22 13:36:36 +00:00
Brendan Abolivier
e09838c78f
Merge pull request #9644 from matrix-org/babolivier/msc3026
...
Implement MSC3026: busy presence state
2021-03-22 14:28:19 +01:00
Erik Johnston
e2904f720d
1.30.0
2021-03-22 13:15:55 +00:00
Brendan Abolivier
b6ed4f55ac
Incorporate review
2021-03-19 18:19:50 +01:00
Brendan Abolivier
592d6305fd
Merge branch 'develop' into babolivier/msc3026
2021-03-19 16:12:40 +01:00
Brendan Abolivier
0b56481caa
Fix lint
2021-03-19 16:11:08 +01:00
Richard van der Hoff
066068f034
fix mypy
2021-03-19 12:20:11 +00:00
Richard van der Hoff
0e35584734
federation_client: handle inline signing_keys in hs.yaml ( #9647 )
2021-03-18 21:12:07 +00:00
Richard van der Hoff
201178db1a
federation_client: stop adding URL prefix ( #9645 )
2021-03-18 20:31:47 +00:00
Patrick Cloke
9b0e3009fa
Fix type-hints from bad merge.
2021-03-18 14:40:56 -04:00
Richard van der Hoff
004234f03a
Initial spaces summary API ( #9643 )
...
This is very bare-bones for now: federation will come soon, while pagination is descoped for now but will come later.
2021-03-18 18:24:16 +00:00
Brendan Abolivier
066c703729
Move support for MSC3026 behind an experimental flag
2021-03-18 18:37:19 +01:00
Dirk Klimpel
8dd2ea65a9
Consistently check whether a password may be set for a user. ( #9636 )
2021-03-18 12:54:08 -04:00
Erik Johnston
dd71eb0f8a
Make federation catchup send last event from any server. ( #9640 )
...
Currently federation catchup will send the last *local* event that we
failed to send to the remote. This can cause issues for large rooms
where lots of servers have sent events while the remote server was down,
as when it comes back up again it'll be flooded with events from various
points in the DAG.
Instead, let's make it so that all the servers send the most recent
events, even if its not theirs. The remote should deduplicate the
events, so there shouldn't be much overhead in doing this.
Alternatively, the servers could only send local events if they were
also extremities and hope that the other server will send the event
over, but that is a bit risky.
2021-03-18 15:52:26 +00:00
Brendan Abolivier
405aeb0b2c
Implement MSC3026: busy presence state
2021-03-18 16:34:47 +01:00
Andrew Morgan
7b06f85c0e
Ensure we use a copy of the event content dict before modifying it in serialize_event ( #9585 )
...
This bug was discovered by DINUM. We were modifying `serialized_event["content"]`, which - if you've got `USE_FROZEN_DICTS` turned on or are [using a third party rules module](17cd48fe51/synapse/events/third_party_rules.py (L73-L76) ) - will raise a 500 if you try to a edit a reply to a message.
`serialized_event["content"]` could be set to the edit event's content, instead of a copy of it, which is bad as we attempt to modify it. Instead, we also end up modifying the original event's content. DINUM uses a third party rules module, which meant the event's content got frozen and thus an exception was raised.
To be clear, the problem is not that the event's content was frozen. In fact doing so helped us uncover the fact we weren't copying event content correctly.
2021-03-17 16:51:55 +00:00
Patrick Cloke
cc324d53fe
Fix up types for the typing handler. ( #9638 )
...
By splitting this to two separate methods the callers know
what methods they can expect on the handler.
2021-03-17 11:30:21 -04:00
Hubert Chathi
73dbce5523
only save remote cross-signing keys if they're different from the current ones ( #9634 )
...
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2021-03-17 11:04:57 -04:00
Erik Johnston
ad721fc559
Fix bad naming of storage function ( #9637 )
...
We had two functions named `get_forward_extremities_for_room` and
`get_forward_extremeties_for_room` that took different paramters. We
rename one of them to avoid confusion.
2021-03-17 13:20:08 +00:00
Richard van der Hoff
567f88f835
Prep work for removing outlier from internal_metadata ( #9411 )
...
* Populate `internal_metadata.outlier` based on `events` table
Rather than relying on `outlier` being in the `internal_metadata` column,
populate it based on the `events.outlier` column.
* Move `outlier` out of InternalMetadata._dict
Ultimately, this will allow us to stop writing it to the database. For now, we
have to grandfather it back in so as to maintain compatibility with older
versions of Synapse.
2021-03-17 12:33:18 +00:00
Patrick Cloke
b449af0379
Add type hints to the room member handler. ( #9631 )
2021-03-17 07:14:39 -04:00
Jonathan de Jong
27d2820c33
Enable flake8-bugbear, but disable most checks. ( #9499 )
...
* Adds B00 to ignored checks.
* Fixes remaining issues.
2021-03-16 14:19:27 -04:00
Hubbe
dd5e5dc1d6
Add SSO attribute requirements for OIDC providers ( #9609 )
...
Allows limiting who can login using OIDC via the claims
made from the IdP.
2021-03-16 11:46:07 -04:00
Dirk Klimpel
8000cf1315
Return m.change_password.enabled=false if local database is disabled ( #9588 )
...
Instead of if the user does not have a password hash. This allows a SSO
user to add a password to their account, but only if the local password
database is configured.
2021-03-16 11:44:25 -04:00
Andrew Morgan
45ef73fd4f
Fix jemalloc changelog entry wording
2021-03-16 14:46:40 +00:00
Andrew Morgan
e3bc0e6f7c
Changelog typo
2021-03-16 14:33:23 +00:00
Andrew Morgan
ad5d2e7ec0
Pull up appservice login deprecation notice
2021-03-16 13:51:24 +00:00
Andrew Morgan
d315e96443
1.30.0rc1
2021-03-16 13:45:46 +00:00
Richard van der Hoff
d8953b34f2
Merge branch 'develop' into matrix-org-hotfixes
2021-03-16 12:42:54 +00:00
Andrew Morgan
847ecdd8fa
Pass SSO IdP information to spam checker's registration function ( #9626 )
...
Fixes https://github.com/matrix-org/synapse/issues/9572
When a SSO user logs in for the first time, we create a local Matrix user for them. This goes through the register_user flow, which ends up triggering the spam checker. Spam checker modules don't currently have any way to differentiate between a user trying to sign up initially, versus an SSO user (whom has presumably already been approved elsewhere) trying to log in for the first time.
This PR passes `auth_provider_id` as an argument to the `check_registration_for_spam` function. This argument will contain an ID of an SSO provider (`"saml"`, `"cas"`, etc.) if one was used, else `None`.
2021-03-16 12:41:41 +00:00
Mathieu Velten
ccf1dc51d7
Install jemalloc in docker image ( #8553 )
...
Co-authored-by: Will Hunt <willh@matrix.org >
Co-authored-by: Erik Johnston <erik@matrix.org >
2021-03-16 11:32:18 +00:00
Patrick Cloke
1383508f29
Handle an empty cookie as an invalid macaroon. ( #9620 )
...
* Handle an empty cookie as an invalid macaroon.
* Newsfragment
2021-03-16 11:29:35 +00:00
Richard van der Hoff
dd69110d95
Add support for stable MSC2858 API ( #9617 )
...
The stable format uses different brand identifiers, so we need to support two
identifiers for each IdP.
2021-03-16 11:21:26 +00:00
Richard van der Hoff
5b5bc188cf
Clean up config settings for stats ( #9604 )
...
... and complain if people try to turn it off.
2021-03-16 10:57:54 +00:00
Andrew Morgan
1b0eaed21f
Prevent bundling aggregations for state events ( #9619 )
...
There's no need to do aggregation bundling for state events. Doing so can cause performance issues.
2021-03-16 10:27:51 +00:00
Richard van der Hoff
1c8a2541da
Fix Internal Server Error on GET /saml2/authn_response ( #9623 )
...
* Fix Internal Server Error on `GET /saml2/authn_response`
Seems to have been introduced in #8765 (Synapse 1.24.0)
* Fix newsfile
2021-03-16 10:20:20 +00:00
Patrick Cloke
f87dfb9403
Revert requiring a specific version of Twisted for mypy checks. ( #9618 )
2021-03-15 12:18:35 -04:00
Patrick Cloke
d29b71aa50
Fix remaining mypy issues due to Twisted upgrade. ( #9608 )
2021-03-15 11:14:39 -04:00
Erik Johnston
026503fa3b
Don't go into federation catch up mode so easily ( #9561 )
...
Federation catch up mode is very inefficient if the number of events
that the remote server has missed is small, since handling gaps can be
very expensive, c.f. #9492 .
Instead of going into catch up mode whenever we see an error, we instead
do so only if we've backed off from trying the remote for more than an
hour (the assumption being that in such a case it is more than a
transient failure).
2021-03-15 14:42:40 +00:00
Richard van der Hoff
af2248f8bf
Optimise missing prev_event handling ( #9601 )
...
Background: When we receive incoming federation traffic, and notice that we are missing prev_events from
the incoming traffic, first we do a `/get_missing_events` request, and then if we still have missing prev_events,
we set up new backwards-extremities. To do that, we need to make a `/state_ids` request to ask the remote
server for the state at those prev_events, and then we may need to then ask the remote server for any events
in that state which we don't already have, as well as the auth events for those missing state events, so that we
can auth them.
This PR attempts to optimise the processing of that state request. The `state_ids` API returns a list of the state
events, as well as a list of all the auth events for *all* of those state events. The optimisation comes from the
observation that we are currently loading all of those auth events into memory at the start of the operation, but
we almost certainly aren't going to need *all* of the auth events. Rather, we can check that we have them, and
leave the actual load into memory for later. (Ideally the federation API would tell us which auth events we're
actually going to need, but it doesn't.)
The effect of this is to reduce the number of events that I need to load for an event in Matrix HQ from about
60000 to about 22000, which means it can stay in my in-memory cache, whereas previously the sheer number
of events meant that all 60K events had to be loaded from db for each request, due to the amount of cache
churn. (NB I've already tripled the size of the cache from its default of 10K).
Unfortunately I've ended up basically C&Ping `_get_state_for_room` and `_get_events_from_store_or_dest` into
a new method, because `_get_state_for_room` is also called during backfill, which expects the auth events to be
returned, so the same tricks don't work. That said, I don't really know why that codepath is completely different
(ultimately we're doing the same thing in setting up a new backwards extremity) so I've left a TODO suggesting
that we clean it up.
2021-03-15 13:51:02 +00:00
Patrick Cloke
55da8df078
Fix additional type hints from Twisted 21.2.0. ( #9591 )
2021-03-12 11:37:57 -05:00
Richard van der Hoff
1e67bff833
Reject concurrent transactions ( #9597 )
...
If more transactions arrive from an origin while we're still processing the
first one, reject them.
Hopefully a quick fix to https://github.com/matrix-org/synapse/issues/9489
2021-03-12 15:14:55 +00:00
Richard van der Hoff
2b328d7e02
Improve logging when processing incoming transactions ( #9596 )
...
Put the room id in the logcontext, to make it easier to understand what's going on.
2021-03-12 15:08:03 +00:00
Richard van der Hoff
464e5da7b2
Add logging for redis connection setup ( #9590 )
2021-03-11 18:35:09 +00:00
Patrick Cloke
e55bd0e110
Add tests for blacklisting reactor/agent. ( #9563 )
2021-03-11 09:15:22 -05:00
Dirk Klimpel
70d1b6abff
Re-Activating account when local passwords are disabled ( #9587 )
...
Fixes : #8393
2021-03-11 13:52:32 +00:00
Richard van der Hoff
a7a3790066
Convert Requester to attrs ( #9586 )
...
... because namedtuples suck
Fix up a couple of other annotations to keep mypy happy.
2021-03-10 18:15:56 +00:00
Richard van der Hoff
1107214a1d
Fix the auth provider on the logins metric ( #9573 )
...
We either need to pass the auth provider over the replication api, or make sure
we report the auth provider on the worker that received the request. I've gone
with the latter.
2021-03-10 18:15:03 +00:00
Jason Robinson
17cd48fe51
Fix spam checker modules documentation example ( #9580 )
...
Mention that parse_config must exist and note the
check_media_file_for_spam method.
2021-03-10 10:42:51 -05:00
Patrick Cloke
2a99cc6524
Use the chain cover index in get_auth_chain_ids. ( #9576 )
...
This uses a simplified version of get_chain_cover_difference to calculate
auth chain of events.
2021-03-10 09:57:59 -05:00
Patrick Cloke
918f6ed827
Fix a bug in the background task for purging chain cover. ( #9583 )
2021-03-10 08:55:52 -05:00
Patrick Cloke
67b979bfa1
Do not ignore the unpaddedbase64 module when type checking. ( #9568 )
2021-03-09 14:41:02 -05:00
Patrick Cloke
dc51d8ffaf
Add a background task to purge unused chain IDs. ( #9542 )
...
This is a companion change to apply the fix in #9498 /
922788c604 to previously
purged rooms.
2021-03-09 11:22:25 -05:00
Richard van der Hoff
56c0c711c1
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-03-09 15:23:55 +00:00
Andrew Morgan
e9df3f496b
Link to the List user's media admin API from media Admin API docs ( #9571 )
...
Earlier [I was convinced](https://github.com/matrix-org/synapse/issues/9565 ) that we didn't have an Admin API for listing media uploaded by a user. Foolishly I was looking under the Media Admin API documentation, instead of the User Admin API documentation.
I thought it'd be helpful to link to the latter so others don't hit the same dead end :)
2021-03-09 15:15:52 +00:00
Richard van der Hoff
eaada74075
JWT OIDC secrets for Sign in with Apple ( #9549 )
...
Apple had to be special. They want a client secret which is generated from an EC key.
Fixes #9220 . Also fixes #9212 while I'm here.
2021-03-09 15:03:37 +00:00
Erik Johnston
9cd18cc588
Retry 5xx errors in federation client ( #9567 )
...
Fixes #8915
2021-03-09 13:15:12 +00:00
Patrick Cloke
7fdc6cefb3
Fix additional type hints. ( #9543 )
...
Type hint fixes due to Twisted 21.2.0 adding type hints.
2021-03-09 07:41:32 -05:00
Patrick Cloke
075c16b410
Handle image transparency better when thumbnailing. ( #9473 )
...
Properly uses RGBA mode for 1- and 8-bit images with transparency
(instead of RBG mode).
2021-03-09 07:37:09 -05:00
Patrick Cloke
3ce650057d
Add a list of hashes to ignore during git blame. ( #9560 )
...
The hashes are from commits due to auto-formatting, e.g. running black.
git can be configured to use this automatically by running the following:
git config blame.ignoreRevsFile .git-blame-ignore-revs
2021-03-09 07:34:55 -05:00
Erik Johnston
576c91c7c1
Fixup sample config
...
After 0764d0c6e5
2021-03-09 11:40:45 +00:00
Andrew Morgan
22db45bd4d
Prevent the config-lint script erroring out on any sample_config changes ( #9562 )
...
I noticed that I'd occasionally have `scripts-dev/lint.sh` fail when messing about with config options in my PR. The script calls `scripts-dev/config-lint.sh`, which attempts some validation on the sample config.
It does this by using `sed` to edit the sample_config, and then seeing if the file changed using `git diff`.
The problem is: if you changed the sample_config as part of your commit, this script will error regardless.
This PR attempts to change the check so that existing, unstaged changes to the sample_config will not cause the script to report an invalid file.
2021-03-09 11:11:42 +00:00
Jonathan de Jong
9898470e7d
Add logging to ObservableDeferred callbacks ( #9523 )
2021-03-09 11:09:31 +00:00
Matthew Hodgson
0764d0c6e5
quick config comment tweak to clarify allow_profile_lookup_over_federation
2021-03-08 21:52:04 +00:00
Jonathan de Jong
d6196efafc
Add ResponseCache tests. ( #9458 )
2021-03-08 14:00:07 -05:00
Will Hunt
b2c4d3d721
Warn that /register will soon require a type when called with an access token ( #9559 )
...
This notice is giving a heads up to the planned spec compliance fix https://github.com/matrix-org/synapse/pull/9548 .
2021-03-08 16:35:04 +00:00
Dirk Klimpel
7076eee4b9
Add type hints to purge room and server notice admin API. ( #9520 )
2021-03-08 10:34:38 -05:00
Patrick Cloke
cb7fc7523e
Add a basic test for purging rooms. ( #9541 )
...
Unfortunately this doesn't test re-joining the room since
that requires having another homeserver to query over
federation, which isn't easily doable in unit tests.
2021-03-08 09:21:36 -05:00
Erik Johnston
b988b07bb0
Merge branch 'master' into develop
2021-03-08 14:06:35 +00:00
Erik Johnston
4de1c35728
Fixup changelog
2021-03-08 13:59:17 +00:00
Erik Johnston
15c788e22d
1.29.0
2021-03-08 13:52:13 +00:00
Patrick Cloke
58114f8a17
Create a SynapseReactor type which incorporates the necessary reactor interfaces. ( #9528 )
...
This helps fix some type hints when running with Twisted 21.2.0.
2021-03-08 08:25:43 -05:00
Leo Bärring
0fc4eb103a
Update reverse proxy to add OpenBSD relayd example configuration. ( #9508 )
...
Update reverse proxy to add OpenBSD relayd example configuration.
Signed-off-by: Leo Bärring <leo.barring@protonmail.com >
2021-03-06 11:49:19 +00:00
Ben Banfield-Zanin
e5da770cce
Add additional SAML2 upgrade notes ( #9550 )
2021-03-05 12:07:50 +00:00
Richard van der Hoff
8a4b3738f3
Replace last_*_pdu_age metrics with timestamps ( #9540 )
...
Following the advice at
https://prometheus.io/docs/practices/instrumentation/#timestamps-not-time-since ,
it's preferable to export unix timestamps, not ages.
There doesn't seem to be any particular naming convention for timestamp
metrics.
2021-03-04 16:40:18 +00:00
Richard van der Hoff
df425c2c63
Prometheus metrics for logins and registrations ( #9511 )
...
Add prom metrics for number of users successfully registering and logging in, by SSO provider.
2021-03-04 16:39:27 +00:00
Richard van der Hoff
7eb6e39a8f
Record the SSO Auth Provider in the login token ( #9510 )
...
This great big stack of commits is a a whole load of hoop-jumping to make it easier to store additional values in login tokens, and then to actually store the SSO Identity Provider in the login token. (Making use of that data will follow in a subsequent PR.)
2021-03-04 14:44:22 +00:00
Erik Johnston
a6333b8d42
Fix link in UPGRADES
2021-03-04 10:32:44 +00:00
Erik Johnston
ea0a3aaf0a
Fix changelog
2021-03-04 10:29:43 +00:00
Erik Johnston
61a970e25f
Merge remote-tracking branch 'origin/release-v1.29.0' into matrix-org-hotfixes
2021-03-04 10:23:26 +00:00
Erik Johnston
3f49d80dcf
1.29.0rc1
2021-03-04 10:12:53 +00:00
Patrick Cloke
33a02f0f52
Fix additional type hints from Twisted upgrade. ( #9518 )
2021-03-03 15:47:38 -05:00
Richard van der Hoff
4db07f9aef
Set X-Forwarded-Proto header when frontend-proxy proxies a request ( #9539 )
...
Should fix some remaining warnings
2021-03-03 18:49:08 +00:00
Erik Johnston
50c242fa29
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-03-03 16:08:05 +00:00
Erik Johnston
a4fa044c00
Fix 'rejected_events_metadata' background update ( #9537 )
...
Turns out matrix.org has an event that has duplicate auth events (which really isn't supposed to happen, but here we are). This caused the background update to fail due to `UniqueViolation`.
2021-03-03 16:04:24 +00:00
Patrick Cloke
922788c604
Purge chain cover tables when purging events. ( #9498 )
2021-03-03 11:04:08 -05:00
Dirk Klimpel
d790d0d314
Add type hints to user admin API. ( #9521 )
2021-03-03 08:09:39 -05:00
Patrick Cloke
0c330423bc
Bump the mypy and mypy-zope versions. ( #9529 )
2021-03-03 07:19:19 -05:00
Erik Johnston
8965291b87
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-03-03 12:12:15 +00:00
Erik Johnston
16f9f93eb7
Make deleting stale pushers a background update ( #9536 )
2021-03-03 12:08:16 +00:00
Richard van der Hoff
a5daae2a5f
Update nginx reverse-proxy docs ( #9512 )
...
Turns out nginx overwrites the Host header by default.
2021-03-03 11:08:11 +00:00
Erik Johnston
81c7b0515d
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-03-03 10:59:10 +00:00
Aaron Raimist
0279e0e086
Prevent presence background jobs from running when presence is disabled ( #9530 )
...
Prevent presence background jobs from running when presence is disabled
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2021-03-03 10:21:46 +00:00
Patrick Cloke
aee10768d8
Revert "Fix #8518 (sync requests being cached wrongly on timeout) ( #9358 )"
...
This reverts commit f5c93fc993 .
This is being backed out due to a regression (#9507 ) and additional
review feedback being provided.
2021-03-02 09:43:34 -05:00
Erik Johnston
7f5d753d06
Re-run rejected metadata background update. ( #9503 )
...
It landed in schema version 58 after 59 had been created, causing some
servers to not run it. The main effect of was that not all rooms had
their chain cover calculated correctly. After the BG updates complete
the chain covers will get fixed when a new state event in the affected
rooms is received.
2021-03-02 14:31:23 +00:00
Erik Johnston
16108c579d
Fix SQL delta file taking a long time to run ( #9516 )
...
Fixes #9504
2021-03-02 14:05:01 +00:00
Dirk Klimpel
f00c4e7af0
Add type hints to device and event report admin API ( #9519 )
2021-03-02 09:31:12 +00:00
Patrick Cloke
ad8589d392
Fix a bug when a room alias is given to the admin join endpoint ( #9506 )
2021-03-01 13:59:01 -05:00
Patrick Cloke
16ec8c3272
(Hopefully) stop leaking file descriptors in media repo. ( #9497 )
...
By consuming the response if the headers imply that the
content is too large.
2021-03-01 12:45:00 -05:00
Patrick Cloke
a0bc9d387e
Use the proper Request in type hints. ( #9515 )
...
This also pins the Twisted version in the mypy job for CI until
proper type hints are fixed throughout Synapse.
2021-03-01 12:23:46 -05:00
Jonathan de Jong
e12077a78a
Allow bytecode again ( #9502 )
...
In #75 , bytecode was disabled (from a bit of FUD back in `python<2.4` days, according to dev chat), I think it's safe enough to enable it again.
Added in `__pycache__/` and `.pyc`/`.pyd` to `.gitignore`, to extra-insure compiled files don't get committed.
`Signed-off-by: Jonathan de Jong <jonathan@automatia.nl >`
2021-02-26 18:30:54 +00:00
Tim Leung
ddb240293a
Add support for no_proxy and case insensitive env variables ( #9372 )
...
### Changes proposed in this PR
- Add support for the `no_proxy` and `NO_PROXY` environment variables
- Internally rely on urllib's [`proxy_bypass_environment`](bdb941be42/Lib/urllib/request.py (L2519) )
- Extract env variables using urllib's `getproxies`/[`getproxies_environment`](bdb941be42/Lib/urllib/request.py (L2488) ) which supports lowercase + uppercase, preferring lowercase, except for `HTTP_PROXY` in a CGI environment
This does contain behaviour changes for consumers so making sure these are called out:
- `no_proxy`/`NO_PROXY` is now respected
- lowercase `https_proxy` is now allowed and taken over `HTTPS_PROXY`
Related to #9306 which also uses `ProxyAgent`
Signed-off-by: Timothy Leung tim95@hotmail.co.uk
2021-02-26 17:37:57 +00:00
Richard van der Hoff
fdbccc1e74
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-02-26 14:05:40 +00:00
Richard van der Hoff
0e56f02d5d
Revert "Redirect redirect requests if they arrive on the wrong URI"
...
This reverts commit 5ee8a1c50a .
This has now been superceded on develop by PR #9436 .
2021-02-26 14:05:00 +00:00
Richard van der Hoff
c7934aee2c
Revert "more login hacking"
...
This reverts commit 47d2b49e2b .
This has now been superceded on develop by PR 9472.
2021-02-26 14:04:05 +00:00
Richard van der Hoff
15090de850
SSO: redirect to public URL before setting cookies ( #9436 )
...
... otherwise, we don't get the cookie back.
2021-02-26 14:02:06 +00:00
Richard van der Hoff
e53f11bd62
Call out the need for an X-Forwarded-Proto in the upgrade notes ( #9501 )
2021-02-26 13:24:54 +00:00
Erik Johnston
2566dc57ce
Test that we require validated email for email pushers ( #9496 )
2021-02-25 15:35:14 +00:00
Erik Johnston
1e62d9ee8c
Ensure pushers are deleted for deactivated accounts ( #9285 )
2021-02-25 13:56:55 +00:00
Erik Johnston
1efdcc3e87
Merge branch 'master' into develop
2021-02-25 10:53:31 +00:00
Erik Johnston
2756517f7a
Fixup changelog
2021-02-25 10:47:19 +00:00
Erik Johnston
0f9f30b32b
Fixup changelog
2021-02-25 10:27:22 +00:00
Erik Johnston
b5c4fe1971
1.28.0
2021-02-25 10:22:07 +00:00
Richard van der Hoff
d8e95e5452
Add support for X-Forwarded-Proto ( #9472 )
...
rewrite XForwardedForRequest to set `isSecure()` based on
`X-Forwarded-Proto`. Also implement `getClientAddress()` while we're here.
2021-02-24 18:11:33 +00:00
Andrew Morgan
00bf80cb8e
Fix typo in spam checker documentation
2021-02-24 17:51:52 +00:00
Erik Johnston
7cc571510b
Add SQL delta for deleting stale pushers ( #9479 )
2021-02-24 17:21:10 +00:00
Jonathan de Jong
f5c93fc993
Fix #8518 (sync requests being cached wrongly on timeout) ( #9358 )
...
This fixes #8518 by adding a conditional check on `SyncResult` in a function when `prev_stream_token == current_stream_token`, as a sanity check. In `CachedResponse.set.<remove>()`, the result is immediately popped from the cache if the conditional function returns "false".
This prevents the caching of a timed-out `SyncResult` (that has `next_key` as the stream key that produced that `SyncResult`). The cache is prevented from returning a `SyncResult` that makes the client request the same stream key over and over again, effectively making it stuck in a loop of requesting and getting a response immediately for as long as the cache keeps those values.
Signed-off-by: Jonathan de Jong <jonathan@automatia.nl >
2021-02-24 13:57:00 +00:00
Erik Johnston
2927921942
Clean up ShardedWorkerHandlingConfig ( #9466 )
...
* Split ShardedWorkerHandlingConfig
This is so that we have a type level understanding of when it is safe to
call `get_instance(..)` (as opposed to `should_handle(..)`).
* Remove special cases in ShardedWorkerHandlingConfig.
`ShardedWorkerHandlingConfig` tried to handle the various different ways
it was possible to configure federation senders and pushers. This led to
special cases that weren't hit during testing.
To fix this the handling of the different cases is moved from there and
`generic_worker` into the worker config class. This allows us to have
the logic in one place and allows the rest of the code to ignore the
different cases.
2021-02-24 13:23:18 +00:00
Erik Johnston
0b5c967813
Refactor to ensure we call check_consistency ( #9470 )
...
The idea here is to stop people forgetting to call `check_consistency`. Folks can still just pass in `None` to the new args in `build_sequence_generator`, but hopefully they won't.
2021-02-24 10:13:53 +00:00
Patrick Cloke
7292b7c0eb
Add back the deprecated SAML endpoint. ( #9474 )
2021-02-23 12:57:37 -05:00
Richard van der Hoff
713145d3de
Add a comment about systemd-python. ( #9464 )
...
This confused me for a while.
2021-02-23 13:42:36 +00:00
Patrick Cloke
65a9eb8994
Include newly added sequences in the port DB script. ( #9449 )
...
And ensure the consistency of `event_auth_chain_id`.
2021-02-23 07:33:24 -05:00
Erik Johnston
66f4949e7f
Fix deleting pushers when using sharded pushers. ( #9465 )
2021-02-22 21:14:42 +00:00
Richard van der Hoff
1b2d6d55c5
Remove vestiges of uploads_path config ( #9462 )
...
`uploads_path` was a thing that was never used; most of it was removed in #6628
but a few vestiges remained.
2021-02-22 19:54:49 +00:00
Dirk Klimpel
71c9f8de6d
Add an order_by field to list users' media admin API. ( #8978 )
2021-02-22 14:38:51 -05:00
Richard van der Hoff
70ea9593ff
example systemd config: propagate reloads to units ( #9463 )
...
It should be possible to reload `synapse.target` to have the reload propagate
to all the synapse units.
2021-02-22 18:43:17 +00:00
Andrew Morgan
0a363f9ca4
Remove cache for get_shared_rooms_for_users ( #9416 )
...
This PR remove the cache for the `get_shared_rooms_for_users` storage method (the db method driving the experimental "what rooms do I share with this user?" feature: [MSC2666](https://github.com/matrix-org/matrix-doc/pull/2666 )). Currently subsequent requests to the endpoint will return the same result, even if your shared rooms with that user have changed.
The cache was added in https://github.com/matrix-org/synapse/pull/7785 , but we forgot to ensure it was invalidated appropriately.
Upon attempting to invalidate it, I found that the cache had to be entirely invalidated whenever a user (remote or local) joined or left a room. This didn't make for a very useful cache, especially for a function that may or may not be called very often. Thus, I've opted to remove it instead of invalidating it.
2021-02-22 16:52:45 +00:00
Erik Johnston
5d405f7e7a
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-02-22 12:55:32 +00:00
Andrew Morgan
e22b71810e
Clean up the user directory sample config section ( #9385 )
...
The user directory sample config section was a little messy, and didn't adhere to our [recommended config format guidelines](https://github.com/matrix-org/synapse/blob/develop/docs/code_style.md#configuration-file-format ).
This PR cleans that up a bit.
2021-02-22 11:44:31 +00:00
Patrick Cloke
fc8b3d8809
Ratelimit cross-user key sharing requests. ( #8957 )
2021-02-19 13:20:34 -05:00
Erik Johnston
179c0953ff
Regenerate exact thumbnails if missing ( #9438 )
2021-02-19 17:09:57 +00:00
Erik Johnston
3a2fe5054f
Add test
2021-02-19 15:52:04 +00:00
Patrick Cloke
a1901abd6b
Add documentation and type hints to parse_duration. ( #9432 )
2021-02-19 08:32:21 -05:00
Patrick Cloke
c4a55ac4a4
Fix style checking due to updated black.
2021-02-19 08:19:54 -05:00
Patrick Cloke
d9f1dccba9
Merge tag 'v1.28.0rc1' into develop
...
Synapse 1.28.0rc1 (2021-02-19)
==============================
Note that this release drops support for ARMv7 in the official Docker images, due to repeated problems building for ARMv7 (and the associated maintenance burden this entails).
This release also fixes the documentation included in v1.27.0 around the callback URI for SAML2 identity providers. If your server is configured to use single sign-on via a SAML2 IdP, you may need to make configuration changes. Please review [UPGRADE.rst](UPGRADE.rst) for more details on these changes.
Removal warning
---------------
The v1 list accounts API is deprecated and will be removed in a future release.
This API was undocumented and misleading. It can be replaced by the
[v2 list accounts API](https://github.com/matrix-org/synapse/blob/release-v1.28.0/docs/admin_api/user_admin_api.rst#list-accounts ),
which has been available since Synapse 1.7.0 (2019-12-13).
Please check if you're using any scripts which use the admin API and replace
`GET /_synapse/admin/v1/users/<user_id>` with `GET /_synapse/admin/v2/users`.
Features
--------
- New admin API to get the context of an event: `/_synapse/admin/rooms/{roomId}/context/{eventId}`. ([\#9150](https://github.com/matrix-org/synapse/issues/9150 ))
- Further improvements to the user experience of registration via single sign-on. ([\#9300](https://github.com/matrix-org/synapse/issues/9300 ), [\#9301](https://github.com/matrix-org/synapse/issues/9301 ))
- Add hook to spam checker modules that allow checking file uploads and remote downloads. ([\#9311](https://github.com/matrix-org/synapse/issues/9311 ))
- Add support for receiving OpenID Connect authentication responses via form `POST`s rather than `GET`s. ([\#9376](https://github.com/matrix-org/synapse/issues/9376 ))
- Add the shadow-banning status to the admin API for user info. ([\#9400](https://github.com/matrix-org/synapse/issues/9400 ))
Bugfixes
--------
- Fix long-standing bug where sending email notifications would fail for rooms that the server had since left. ([\#9257](https://github.com/matrix-org/synapse/issues/9257 ))
- Fix bug in Synapse 1.27.0rc1 which meant the "session expired" error page during SSO registration was badly formatted. ([\#9296](https://github.com/matrix-org/synapse/issues/9296 ))
- Assert a maximum length for some parameters for spec compliance. ([\#9321](https://github.com/matrix-org/synapse/issues/9321 ), [\#9393](https://github.com/matrix-org/synapse/issues/9393 ))
- Fix additional errors when previewing URLs: "AttributeError 'NoneType' object has no attribute 'xpath'" and "ValueError: Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.". ([\#9333](https://github.com/matrix-org/synapse/issues/9333 ))
- Fix a bug causing Synapse to impose the wrong type constraints on fields when processing responses from appservices to `/_matrix/app/v1/thirdparty/user/{protocol}`. ([\#9361](https://github.com/matrix-org/synapse/issues/9361 ))
- Fix bug where Synapse would occasionally stop reconnecting to Redis after the connection was lost. ([\#9391](https://github.com/matrix-org/synapse/issues/9391 ))
- Fix a long-standing bug when upgrading a room: "TypeError: '>' not supported between instances of 'NoneType' and 'int'". ([\#9395](https://github.com/matrix-org/synapse/issues/9395 ))
- Reduce the amount of memory used when generating the URL preview of a file that is larger than the `max_spider_size`. ([\#9421](https://github.com/matrix-org/synapse/issues/9421 ))
- Fix a long-standing bug in the deduplication of old presence, resulting in no deduplication. ([\#9425](https://github.com/matrix-org/synapse/issues/9425 ))
- The `ui_auth.session_timeout` config option can now be specified in terms of number of seconds/minutes/etc/. Contributed by Rishabh Arya. ([\#9426](https://github.com/matrix-org/synapse/issues/9426 ))
- Fix a bug introduced in v1.27.0: "TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType." related to the user directory. ([\#9428](https://github.com/matrix-org/synapse/issues/9428 ))
Updates to the Docker image
---------------------------
- Drop support for ARMv7 in Docker images. ([\#9433](https://github.com/matrix-org/synapse/issues/9433 ))
Improved Documentation
----------------------
- Reorganize CHANGELOG.md. ([\#9281](https://github.com/matrix-org/synapse/issues/9281 ))
- Add note to `auto_join_rooms` config option explaining existing rooms must be publicly joinable. ([\#9291](https://github.com/matrix-org/synapse/issues/9291 ))
- Correct name of Synapse's service file in TURN howto. ([\#9308](https://github.com/matrix-org/synapse/issues/9308 ))
- Fix the braces in the `oidc_providers` section of the sample config. ([\#9317](https://github.com/matrix-org/synapse/issues/9317 ))
- Update installation instructions on Fedora. ([\#9322](https://github.com/matrix-org/synapse/issues/9322 ))
- Add HTTP/2 support to the nginx example configuration. Contributed by David Vo. ([\#9390](https://github.com/matrix-org/synapse/issues/9390 ))
- Update docs for using Gitea as OpenID provider. ([\#9404](https://github.com/matrix-org/synapse/issues/9404 ))
- Document that pusher instances are shardable. ([\#9407](https://github.com/matrix-org/synapse/issues/9407 ))
- Fix erroneous documentation from v1.27.0 about updating the SAML2 callback URL. ([\#9434](https://github.com/matrix-org/synapse/issues/9434 ))
Deprecations and Removals
-------------------------
- Deprecate old admin API `GET /_synapse/admin/v1/users/<user_id>`. ([\#9429](https://github.com/matrix-org/synapse/issues/9429 ))
Internal Changes
----------------
- Fix 'object name reserved for internal use' errors with recent versions of SQLite. ([\#9003](https://github.com/matrix-org/synapse/issues/9003 ))
- Add experimental support for running Synapse with PyPy. ([\#9123](https://github.com/matrix-org/synapse/issues/9123 ))
- Deny access to additional IP addresses by default. ([\#9240](https://github.com/matrix-org/synapse/issues/9240 ))
- Update the `Cursor` type hints to better match PEP 249. ([\#9299](https://github.com/matrix-org/synapse/issues/9299 ))
- Add debug logging for SRV lookups. Contributed by @Bubu. ([\#9305](https://github.com/matrix-org/synapse/issues/9305 ))
- Improve logging for OIDC login flow. ([\#9307](https://github.com/matrix-org/synapse/issues/9307 ))
- Share the code for handling required attributes between the CAS and SAML handlers. ([\#9326](https://github.com/matrix-org/synapse/issues/9326 ))
- Clean up the code to load the metadata for OpenID Connect identity providers. ([\#9362](https://github.com/matrix-org/synapse/issues/9362 ))
- Convert tests to use `HomeserverTestCase`. ([\#9377](https://github.com/matrix-org/synapse/issues/9377 ), [\#9396](https://github.com/matrix-org/synapse/issues/9396 ))
- Update the version of black used to 20.8b1. ([\#9381](https://github.com/matrix-org/synapse/issues/9381 ))
- Allow OIDC config to override discovered values. ([\#9384](https://github.com/matrix-org/synapse/issues/9384 ))
- Remove some dead code from the acceptance of room invites path. ([\#9394](https://github.com/matrix-org/synapse/issues/9394 ))
- Clean up an unused method in the presence handler code. ([\#9408](https://github.com/matrix-org/synapse/issues/9408 ))
2021-02-19 08:10:19 -05:00
Patrick Cloke
d0365bc8b0
Update release date.
2021-02-19 08:01:17 -05:00
Patrick Cloke
b114a45f5f
Support not providing an IdP icon when choosing a username. ( #9440 )
2021-02-19 07:48:46 -05:00
Andrew Morgan
8bcfc2eaad
Be smarter about which hosts to send presence to when processing room joins ( #9402 )
...
This PR attempts to eliminate unnecessary presence sending work when your local server joins a room, or when a remote server joins a room your server is participating in by processing state deltas in chunks rather than individually.
---
When your server joins a room for the first time, it requests the historical state as well. This chunk of new state is passed to the presence handler which, after filtering that state down to only membership joins, will send presence updates to homeservers for each join processed.
It turns out that we were being a bit naive and processing each event individually, and sending out presence updates for every one of those joins. Even if many different joins were users on the same server (hello IRC bridges), we'd send presence to that same homeserver for every remote user join we saw.
This PR attempts to deduplicate all of that by processing the entire batch of state deltas at once, instead of only doing each join individually. We process the joins and note down which servers need which presence:
* If it was a local user join, send that user's latest presence to all servers in the room
* If it was a remote user join, send the presence for all local users in the room to that homeserver
We deduplicate by inserting all of those pending updates into a dictionary of the form:
```
{
server_name1: {presence_update1, ...},
server_name2: {presence_update1, presence_update2, ...}
}
```
Only after building this dict do we then start sending out presence updates.
2021-02-19 11:37:29 +00:00
Andrew Morgan
13e9029f44
Add a config option to prioritise local users in user directory search results ( #9383 )
...
This PR adds a homeserver config option, `user_directory.prefer_local_users`, that when enabled will show local users higher in user directory search results than remote users. This option is off by default.
Note that turning this on doesn't necessarily mean that remote users will always be put below local users, but they should be assuming all other ranking factors (search query match, profile information present etc) are identical.
This is useful for, say, University networks that are openly federating, but want to prioritise local students and staff in the user directory over other random users.
2021-02-19 11:02:03 +00:00
Erik Johnston
3d2acc930f
Return a 404 if we don't have the original file
2021-02-19 10:46:18 +00:00
Erik Johnston
5054eb291e
Merge remote-tracking branch 'origin/release-v1.28.0' into matrix-org-hotfixes
2021-02-19 10:06:01 +00:00
AndrewFerr
9bc74743d5
Add configs to make profile data more private ( #9203 )
...
Add off-by-default configuration settings to:
- disable putting an invitee's profile info in invite events
- disable profile lookup via federation
Signed-off-by: Andrew Ferrazzutti <fair@miscworks.net >
2021-02-19 09:50:41 +00:00
Patrick Cloke
1c5e715e5e
Update the CHANGES document.
2021-02-18 12:37:27 -05:00
Patrick Cloke
1381cd05b0
1.28.0rc1
2021-02-18 12:32:49 -05:00
Erik Johnston
2d577283ab
Newsfile
2021-02-18 17:05:32 +00:00
Erik Johnston
b106080fb4
Regenerate exact thumbnails if missing
2021-02-18 17:05:32 +00:00
Patrick Cloke
84a7191410
Merge branch 'master' into develop
2021-02-18 11:27:15 -05:00
Patrick Cloke
d804285139
Clarify the release notes around SAML2 for v1.27.0.
2021-02-18 11:25:27 -05:00
Patrick Cloke
9ee3b9775f
Remove deprecated SAML2 callback URL since it does not work. ( #9434 )
...
Updates documentation from #9289 and removes a deprecated
endpoint which didn't work as expected.
2021-02-18 11:20:33 -05:00
Patrick Cloke
90550f598e
Revert "Newsfragment", which was meant to be part of #9434 .
...
This reverts commit 8ad4676f35 .
2021-02-18 10:15:59 -05:00
Patrick Cloke
8ad4676f35
Newsfragment
2021-02-18 10:04:46 -05:00
Erik Johnston
9d64e4dbd6
Drop ARMv7 from docker ( #9433 )
...
It's proving incredibly hard to build in CircleCI infra.
2021-02-18 14:46:22 +00:00
Richard van der Hoff
47d2b49e2b
more login hacking
2021-02-18 14:29:48 +00:00
Rishabh Arya
e17553e185
Parse ui_auth.session_timeout as a duration (instead of treating it as ms) ( #9426 )
2021-02-18 09:18:14 -05:00
Dirk Klimpel
e8e7012265
Deprecate old admin API GET /_synapse/admin/v1/users/<user_id> ( #9429 )
...
This API was undocumented and nonsensical.
2021-02-18 09:05:41 -05:00
Richard van der Hoff
1f507c2515
Merge branch 'rav/fix_cookie_path' into matrix-org-hotfixes
...
Merge the cookie fix to hotfixes
2021-02-18 14:03:43 +00:00
Patrick Cloke
8ec2217103
Reduce the memory usage of previewing media files. ( #9421 )
...
This reduces the memory usage of previewing media files which
end up larger than the `max_spider_size` by avoiding buffering
content internally in treq.
It also checks the `Content-Length` header in additional places
instead of streaming the content to check the body length.
2021-02-18 09:01:29 -05:00
Richard van der Hoff
5ee8a1c50a
Redirect redirect requests if they arrive on the wrong URI
2021-02-18 14:01:23 +00:00
David Vo
bb2577f6b7
Add http2 to the nginx example config ( #9390 )
2021-02-18 08:46:16 -05:00
Patrick Cloke
43f1c82457
Add back the guard against the user directory stream position not existing. ( #9428 )
...
As the comment says, this guard was there for when the
initial user directory update has yet to happen.
2021-02-18 08:44:19 -05:00
Richard van der Hoff
626afd7e89
Revert "Update workers.md"
...
This reverts commit a8878960c0 .
2021-02-18 11:56:25 +00:00
Dirk Klimpel
c8d9383cfb
Add the shadow-banning status to the display user admin API. ( #9400 )
2021-02-17 15:19:23 -05:00
Andrew Morgan
a25661b2eb
Remove dead notify_for_states presence method ( #9408 )
2021-02-17 17:32:26 +00:00
Andrew Morgan
3e5749b99f
Fix only handling the last presence state for each user ( #9425 )
...
This is a small bug that I noticed while working on #8956 .
We have a for-loop which attempts to strip all presence changes for each user except for the final one, as we don't really care about older presence:
9e19c6aab4/synapse/handlers/presence.py (L368-L371)
`new_states_dict` stores this stripped copy of latest presence state for each user, before it is... put into a new variable `new_state`, which is just overridden by the subsequent for loop.
I believe this was instead meant to override `new_states`. Without doing so, it effectively meant:
1. The for loop had no effect.
2. We were still processing old presence state for users.
2021-02-17 17:31:37 +00:00
Richard van der Hoff
53f1c4da81
Update workers.md
2021-02-17 17:14:23 +00:00
Richard van der Hoff
a8878960c0
Update workers.md
...
tiny typo in sso paths
2021-02-17 17:11:24 +00:00
Richard van der Hoff
7b7831bb63
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-02-17 16:31:57 +00:00
David Teller
9e19c6aab4
Reorganize CONTRIBUTING.md documentation. ( #9281 )
2021-02-17 11:23:57 -05:00
Patrick Cloke
d2f0ec12d5
Add type hints to groups code. ( #9393 )
2021-02-17 08:41:47 -05:00
Richard van der Hoff
e1071fd625
Support for form_post in OIDC responses ( #9376 )
...
Apple want to POST the OIDC auth response back to us rather than using query-params; add the necessary support to make that work.
2021-02-17 10:15:14 +00:00
Richard van der Hoff
33f64ca7d6
Allow OIDC config to override discovered values ( #9384 )
...
Fixes #9347
2021-02-16 22:33:09 +00:00
Eric Eastwood
0a00b7ff14
Update black, and run auto formatting over the codebase ( #9381 )
...
- Update black version to the latest
- Run black auto formatting over the codebase
- Run autoformatting according to [`docs/code_style.md
`](80d6dc9783/docs/code_style.md )
- Update `code_style.md` docs around installing black to use the correct version
2021-02-16 22:32:34 +00:00
Marcus
5636e597c3
Fix OIDC gitiea redirect URL. ( #9404 )
...
Fixes a "conflict" from 846b9d3df0
and d1f13c7485 .
2021-02-16 14:06:55 -05:00
Richard van der Hoff
3b754aea27
Clean up caching/locking of OIDC metadata load ( #9362 )
...
Ensure that we lock correctly to prevent multiple concurrent metadata load
requests, and generally clean up the way we construct the metadata cache.
2021-02-16 16:27:38 +00:00
Erik Johnston
0ad087273c
Merge branch 'master' into develop
2021-02-16 13:39:30 +00:00
Patrick Cloke
731e08c63a
Handle missing data in power levels events during room upgrade. ( #9395 )
2021-02-16 08:31:39 -05:00
Erik Johnston
ddfdf94506
Document that pusher instances are shardable ( #9407 )
2021-02-16 13:27:49 +00:00
Erik Johnston
6600f0bd57
Fixup CHANGES
2021-02-16 13:16:17 +00:00
Erik Johnston
a27c1fd74b
1.27.0
2021-02-16 13:12:02 +00:00
Patrick Cloke
74af356baf
Convert additional test-cases to homeserver test case. ( #9396 )
...
And convert some inlineDeferreds to async-friendly functions.
2021-02-16 08:04:15 -05:00
Dan Callahan
b8b172466f
Add rustc to Docker image build environment ( #9405 )
...
This is needed to build the cryptography library, since it does not
provide wheels for ARMv7.
Fixes #9403
Signed-off-by: Dan Callahan <danc@element.io >
2021-02-15 15:30:16 +00:00
Andrew Morgan
ff40c8099d
Fix sample config
...
Just a small change missed in 7950aa8a27 .
2021-02-12 22:18:40 +00:00
Andrew Morgan
594f2853e0
Remove dead handled_events set in invite_join ( #9394 )
...
This PR removes a set that was created and [initially used](1d2a0040cf (diff-0bc92da3d703202f5b9be2d3f845e375f5b1a6bc6ba61705a8af9be1121f5e42R435-R436) ), but is no longer today.
May help cut down a bit on the time it takes to accept invites.
2021-02-12 22:15:50 +00:00
Patrick Cloke
7950aa8a27
Fix some typos.
2021-02-12 11:14:12 -05:00
Erik Johnston
a4aa56a0eb
Ensure that we never stop reconnecting to redis ( #9391 )
2021-02-11 17:39:56 +00:00
Patrick Cloke
2c9b4a5f16
Merge tag 'v1.27.0rc2' into develop
...
Synapse 1.27.0rc2 (2021-02-11)
==============================
Features
--------
- Further improvements to the user experience of registration via single sign-on. ([\#9297](https://github.com/matrix-org/synapse/issues/9297 ))
Bugfixes
--------
- Fix ratelimiting introduced in v1.27.0rc1 for invites to respect the `ratelimit` flag on application services. ([\#9302](https://github.com/matrix-org/synapse/issues/9302 ))
- Do not automatically calculate `public_baseurl` since it can be wrong in some situations. Reverts behaviour introduced in v1.26.0. ([\#9313](https://github.com/matrix-org/synapse/issues/9313 ))
Improved Documentation
----------------------
- Clarify the sample configuration for changes made to the template loading code. ([\#9310](https://github.com/matrix-org/synapse/issues/9310 ))
2021-02-11 11:56:03 -05:00
Patrick Cloke
fa0f99e4f2
Merge branch 'release-v1.27.0' into matrix-org-hotfixes
2021-02-11 11:30:16 -05:00
Patrick Cloke
dcb9c2e8ae
Clarify when new ratelimiting was added.
2021-02-11 11:29:23 -05:00
Patrick Cloke
3f2f7efb87
Update changelog.
2021-02-11 11:24:12 -05:00
Patrick Cloke
40de534238
1.27.0rc2
2021-02-11 11:22:29 -05:00
Patrick Cloke
e40d88cff3
Backout changes for automatically calculating the public baseurl. ( #9313 )
...
This breaks some people's configurations (if their Client-Server API
is not accessed via port 443).
2021-02-11 11:16:54 -05:00
Erik Johnston
6aa87f8ce3
Ensure that we never stop reconnecting to redis ( #9391 )
2021-02-11 16:06:29 +00:00
Patrick Cloke
8a33d217bd
Convert some test cases to use HomeserverTestCase. ( #9377 )
...
This has the side-effect of being able to remove use of `inlineCallbacks`
in the test-cases for cleaner tracebacks.
2021-02-11 10:29:09 -05:00
Patrick Cloke
6dade80048
Combine the CAS & SAML implementations for required attributes. ( #9326 )
2021-02-11 10:05:15 -05:00
Eric Eastwood
80d6dc9783
Remove conflicting sqlite tables that are "reserved" (shadow fts4 tables) ( #9003 )
...
Remove conflicting sqlite tables that throw sqlite3.OperationalError: object name reserved for internal use: event_search_content when running the twisted unit tests.
Fix #8996
2021-02-10 20:12:57 +00:00
Brendan Abolivier
fb0e14ee9a
Merge pull request #9361 from matrix-org/babolivier/third_party_validation
...
Remove unneeded type constraints on 3rd party protocol lookup responses
2021-02-09 18:51:44 +01:00
Thomas Mortagne
5f716fa777
Add XWiki OIDC provider example. ( #9324 )
2021-02-09 11:54:52 -05:00
Brendan Abolivier
29ae04af3b
Remove unneeded type constraints on 3rd party protocol lookup responses
2021-02-09 17:50:25 +01:00
Patrick Cloke
3f58fc848d
Type hints and validation improvements. ( #9321 )
...
* Adds type hints to the groups servlet and stringutils code.
* Assert the maximum length of some input values for spec compliance.
2021-02-08 13:59:54 -05:00
Patrick Cloke
0963d39ea6
Handle additional errors when previewing URLs. ( #9333 )
...
* Handle the case of lxml not finding a document tree.
* Parse the document encoding from the XML tag.
2021-02-08 12:33:30 -05:00
David Teller
b0b2cac057
Merge pull request #9150 from Yoric/develop-context
...
New API /_synapse/admin/rooms/{roomId}/context/{eventId}
2021-02-08 15:53:44 +01:00
Richard van der Hoff
844b3e3f65
Revert "block groups requests to fosdem"
...
This reverts commit 3f6530ed55 .
2021-02-06 12:03:46 +00:00
Richard van der Hoff
3f6530ed55
block groups requests to fosdem
2021-02-06 11:04:32 +00:00
Jonathan de Jong
d882fbca38
Update type hints for Cursor to match PEP 249. ( #9299 )
2021-02-05 15:39:19 -05:00
Dan Callahan
5a9cdaa6e9
Update installation instructions on Fedora ( #9322 )
...
Signed-off-by: Joseph Arnault <computerdude90042@outlook.com >
Signed-off-by: Dan Callahan <danc@element.io >
Co-authored-by: compu42 <56663749+compu42@users.noreply.github.com >
2021-02-05 14:20:38 +00:00
Erik Johnston
25757a3d47
Merge branch 'erikj/media_spam_checker' into matrix-org-hotfixes
2021-02-05 10:13:55 +00:00
Erik Johnston
adc96d4236
Merge branch 'erikj/media_spam_checker' into develop
2021-02-04 17:01:59 +00:00
Erik Johnston
7e8083eb48
Add check_media_file_for_spam spam checker hook
2021-02-04 17:01:30 +00:00
dykstranet
982d9eb211
Correct matrix-synapse.service reference in TURN howto docs. ( #9308 )
2021-02-04 11:22:44 -05:00
Patrick Cloke
792263c97c
Handle empty rooms when generating email notifications. ( #9257 )
...
Fixes some exceptions if the room state isn't quite as expected.
If the expected state events aren't found, try to find them in the
historical room state. If they still aren't found, fallback to a reasonable,
although ugly, value.
2021-02-04 10:18:25 -05:00
Patrick Cloke
2ab6e67ab7
Fix escaping of braces in OIDC sample config. ( #9317 )
...
This fixes the Jinja2 templates for the mapping provider.
2021-02-04 09:06:20 -05:00
Jonathan de Jong
2814028ce5
Add experimental support for PyPy. ( #9123 )
...
* Adds proper dependencies.
* Minor fixes in database layer.
2021-02-04 08:29:47 -05:00
Marcus
b0f4119b8b
Add debug logging to DNS SRV requests. ( #9305 )
2021-02-03 16:47:30 -05:00
Richard van der Hoff
3f534d3fdf
Merge branch 'social_login_hotfixes' into develop
2021-02-03 20:34:27 +00:00
Richard van der Hoff
17f2a512f3
Merge remote-tracking branch 'origin/release-v1.27.0' into social_login_hotfixes
2021-02-03 20:33:32 +00:00
Richard van der Hoff
e288499c60
Social login UI polish ( #9301 )
2021-02-03 20:31:23 +00:00
Patrick Cloke
afa18f1baa
Clarify documentation about escaping URLs in templates. ( #9310 )
2021-02-03 14:51:38 -05:00
Richard van der Hoff
ce669863b9
Add debug for OIDC flow ( #9307 )
2021-02-03 19:45:34 +00:00
Richard van der Hoff
7a0dcea3e5
social login Fix username validation javascript ( #9297 )
...
* fix validation and don't use built-in validation UI
Co-authored-by: Bruno Windels <brunow@element.io >
2021-02-03 17:52:55 +00:00
Richard van der Hoff
f20dadb649
Fix formatting for "bad session" error during sso registration flow ( #9296 )
2021-02-03 16:13:09 +00:00
dykstranet
e4cdecb310
config: Add detail to auto_join_rooms comment ( #9291 )
...
config: Add detail to auto_join_rooms comment
Signed-off-by: Gary Dykstra <gary@dykstranet.com >
2021-02-03 15:21:30 +00:00
Tim Gates
e1943d1353
Typo fix in a comment: subequently -> subsequently. ( #8988 )
2021-02-03 07:24:53 -05:00
Patrick Cloke
4ca054a4ea
Convert blacklisted IPv4 addresses to compatible IPv6 addresses. ( #9240 )
...
Also add a few more IP ranges to the default blacklist.
2021-02-03 07:13:46 -05:00
Erik Johnston
ff55300b91
Honour ratelimit flag for application services for invite ratelimiting ( #9302 )
2021-02-03 10:17:37 +00:00
Richard van der Hoff
96e460df2e
social login: add noopener to terms link ( #9300 )
2021-02-02 18:35:28 +00:00
Erik Johnston
6e774373c2
Merge remote-tracking branch 'origin/release-v1.27.0' into matrix-org-hotfixes
2021-02-02 16:06:59 +00:00
Erik Johnston
eec9ab3225
Update changelog
2021-02-02 13:51:20 +00:00
Erik Johnston
2610930721
1.27.0rc1
2021-02-02 13:32:05 +00:00
Travis Ralston
b60bb28bbc
Add an admin API to get the current room state ( #9168 )
...
This could arguably replace the existing admin API for `/members`, however that is out of scope of this change.
This sort of endpoint is ideal for moderation use cases as well as other applications, such as needing to retrieve various bits of information about a room to perform a task (like syncing power levels between two places). This endpoint exposes nothing more than an admin would be able to access with a `select *` query on their database.
2021-02-02 11:16:29 +00:00
Richard van der Hoff
8f75bf1df7
Put SAML callback URI under /_synapse/client. ( #9289 )
2021-02-02 09:43:50 +00:00
Richard van der Hoff
846b9d3df0
Put OIDC callback URI under /_synapse/client. ( #9288 )
2021-02-01 22:56:01 +00:00
Oliver Hanikel
d1f13c7485
Add an OpenID example config for Gitea. ( #9134 )
2021-02-01 16:21:09 -05:00
Richard van der Hoff
8fee6a3ab2
Merge branch 'social_login' into develop
2021-02-01 18:48:11 +00:00
Richard van der Hoff
351845452c
fix broken HTML tag
2021-02-01 18:47:01 +00:00
Richard van der Hoff
5963426b95
Merge branch 'social_login' into develop
2021-02-01 18:46:12 +00:00
Bruno Windels
f30c3a99be
make primary button not wider than viewport
2021-02-01 18:39:17 +00:00
Richard van der Hoff
c543bf87ec
Collect terms consent from the user during SSO registration ( #9276 )
2021-02-01 18:37:41 +00:00
Richard van der Hoff
e5d70c8a82
Improve styling and wording of SSO UIA templates ( #9286 )
...
fixes #9171
2021-02-01 18:36:04 +00:00
Patrick Cloke
5d38a3c97f
Refactor email summary generation. ( #9260 )
...
* Fixes a case where no summary text was returned.
* The use of messages_from_person vs. messages_from_person_and_others
was tweaked to depend on whether there was 1 sender or multiple senders,
not based on if there was 1 room or multiple rooms.
2021-02-01 13:09:39 -05:00
Richard van der Hoff
419313b06a
Improve styling and wording of SSO error templates ( #9287 )
2021-02-01 18:01:15 +00:00
Richard van der Hoff
85c56b5a67
Make importing display name and email optional ( #9277 )
2021-02-01 17:30:42 +00:00
Richard van der Hoff
18ab35284a
Merge branch 'social_login' into develop
2021-02-01 17:28:37 +00:00
Jan Christian Grünhage
43dd93bb26
Add phone home stats for encrypted messages. ( #9283 )
...
Signed-off-by: Jan Christian Grünhage <jan.christian@gruenhage.xyz >
2021-02-01 17:06:22 +00:00
Andrew Morgan
a800603561
Prevent email UIA failures from raising a LoginError ( #9265 )
...
Context, Fixes: https://github.com/matrix-org/synapse/issues/9263
In the past to fix an issue with old Riots re-requesting threepid validation tokens, we raised a `LoginError` during UIA instead of `InteractiveAuthIncompleteError`. This is now breaking the way Tchap logs in - which isn't standard, but also isn't disallowed by the spec.
An easy fix is just to remove the 4 year old workaround.
2021-02-01 15:54:39 +00:00
Richard van der Hoff
4167494c90
Replace username picker with a template ( #9275 )
...
There's some prelimiary work here to pull out the construction of a jinja environment to a separate function.
I wanted to load the template at display time rather than load time, so that it's easy to update on the fly. Honestly, I think we should do this with all our templates: the risk of ending up with malformed templates is far outweighed by the improved turnaround time for an admin trying to update them.
2021-02-01 15:52:50 +00:00
Richard van der Hoff
8aed29dc61
Improve styling and wording of SSO redirect confirm template ( #9272 )
2021-02-01 15:50:56 +00:00
Richard van der Hoff
9c715a5f19
Fix SSO on workers ( #9271 )
...
Fixes #8966 .
* Factor out build_synapse_client_resource_tree
Start a function which will mount resources common to all workers.
* Move sso init into build_synapse_client_resource_tree
... so that we don't have to do it for each worker
* Fix SSO-login-via-a-worker
Expose the SSO login endpoints on workers, like the documentation says.
* Update workers config for new endpoints
Add documentation for endpoints recently added (#8942 , #9017 , #9262 )
* remove submit_token from workers endpoints list
this *doesn't* work on workers (yet).
* changelog
* Add a comment about the odd path for SAML2Resource
2021-02-01 15:47:59 +00:00
Richard van der Hoff
f78d07bf00
Split out a separate endpoint to complete SSO registration ( #9262 )
...
There are going to be a couple of paths to get to the final step of SSO reg, and I want the URL in the browser to consistent. So, let's move the final step onto a separate path, which we redirect to.
2021-02-01 13:15:51 +00:00
Ivan Shapovalov
13c7ab8181
Fixes for PyPy compatibility ( #9270 )
...
* synapse.app.base: only call gc.freeze() on CPython
gc.freeze() is an implementation detail of CPython garbage collector,
and notably does not exist on PyPy.
Rather than playing whack-a-mole and skipping the call when under PyPy,
simply restrict it to CPython because the whole gc module is
implementation-defined.
Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name >
2021-01-30 17:22:05 +00:00
Erik Johnston
f2c1560eca
Ratelimit invites by room and target user ( #9258 )
2021-01-29 16:38:29 +00:00
Dan Callahan
e19396d622
Fix Debian builds on Xenial ( #9254 )
...
Adds note about updating dh-virtualenv once we drop support for Xenial.
We can't update now, because it needs debhelper 12, while Xenial only
backports 10.
Signed-off-by: Dan Callahan <danc@element.io >
2021-01-29 14:56:04 +00:00
Denis Kasak
c14688d44a
Fix typo in UPGRADE.rst
2021-01-29 11:27:43 +01:00
Richard van der Hoff
0d81a6fa3e
Merge branch 'social_login' into develop
2021-01-28 22:08:11 +00:00
Erik Johnston
4b73488e81
Ratelimit 3PID /requestToken API ( #9238 )
2021-01-28 17:39:21 +00:00
Erik Johnston
54a6afeee3
Cache config options in SSL verification ( #9255 )
...
Reading from the config object is *slow*.
2021-01-28 17:38:59 +00:00
David Teller
31d072aea0
FIXUP: linter
2021-01-28 16:53:40 +01:00
Patrick Cloke
a78016dadf
Add type hints to E2E handler. ( #9232 )
...
This finishes adding type hints to the `synapse.handlers` module.
2021-01-28 08:34:19 -05:00
David Teller
93f84e0373
FIXUP: Making get_event_context a bit more paranoid
2021-01-28 12:31:07 +01:00
David Teller
b755f60ce2
FIXUP: Removing awaitable
2021-01-28 12:31:07 +01:00
David Teller
a764869623
FIXUP: Doc
2021-01-28 12:31:07 +01:00
David Teller
b859919acc
FIXUP: Now testing that the user is admin!
2021-01-28 12:31:07 +01:00
David Teller
de7f049527
FIXUP: Don't filter events at all for admin/v1/rooms/.../context/...
2021-01-28 12:31:07 +01:00
David Teller
fe52dae6bd
FIXUP: Documenting /_synapse/admin/v1/rooms/<room_id>/context/<event_id>
2021-01-28 12:30:21 +01:00
David Teller
10332c175c
New API /_synapse/admin/rooms/{roomId}/context/{eventId}
...
Signed-off-by: David Teller <davidt@element.io >
2021-01-28 12:29:49 +01:00
Richard van der Hoff
34efb4c604
Add notes on integrating with Facebook for SSO login. ( #9244 )
2021-01-27 22:57:16 +00:00
Richard van der Hoff
a083aea396
Add 'brand' field to MSC2858 response ( #9242 )
...
We've decided to add a 'brand' field to help clients decide how to style the
buttons.
Also, fix up the allowed characters for idp_id, while I'm in the area.
2021-01-27 21:31:45 +00:00
Richard van der Hoff
869667760f
Support for scraping email addresses from OIDC providers ( #9245 )
2021-01-27 21:28:59 +00:00
Patrick Cloke
00e97a7774
Merge branch 'master' into develop
2021-01-27 12:51:49 -05:00
Patrick Cloke
ccb9616f26
Update debian changelog.
2021-01-27 12:45:02 -05:00
Pankaj Yadav
2e537a0280
Check if a user is in the room before sending a PowerLevel event on their behalf ( #9235 )
2021-01-27 17:38:08 +00:00
Richard van der Hoff
300d0d756a
Merge branch 'social_login' into develop
2021-01-27 17:28:39 +00:00
Richard van der Hoff
fbd9de6d1f
Merge tag 'v1.26.0' into social_login
...
Synapse 1.26.0 (2021-01-27)
===========================
This release brings a new schema version for Synapse and rolling back to a previous
version is not trivial. Please review [UPGRADE.rst](UPGRADE.rst) for more details
on these changes and for general upgrade guidance.
No significant changes since 1.26.0rc2.
Synapse 1.26.0rc2 (2021-01-25)
==============================
Bugfixes
--------
- Fix receipts and account data not being sent down sync. Introduced in v1.26.0rc1. ([\#9193](https://github.com/matrix-org/synapse/issues/9193 ), [\#9195](https://github.com/matrix-org/synapse/issues/9195 ))
- Fix chain cover update to handle events with duplicate auth events. Introduced in v1.26.0rc1. ([\#9210](https://github.com/matrix-org/synapse/issues/9210 ))
Internal Changes
----------------
- Add an `oidc-` prefix to any `idp_id`s which are given in the `oidc_providers` configuration. ([\#9189](https://github.com/matrix-org/synapse/issues/9189 ))
- Bump minimum `psycopg2` version to v2.8. ([\#9204](https://github.com/matrix-org/synapse/issues/9204 ))
Synapse 1.26.0rc1 (2021-01-20)
==============================
This release brings a new schema version for Synapse and rolling back to a previous
version is not trivial. Please review [UPGRADE.rst](UPGRADE.rst) for more details
on these changes and for general upgrade guidance.
Features
--------
- Add support for multiple SSO Identity Providers. ([\#9015](https://github.com/matrix-org/synapse/issues/9015 ), [\#9017](https://github.com/matrix-org/synapse/issues/9017 ), [\#9036](https://github.com/matrix-org/synapse/issues/9036 ), [\#9067](https://github.com/matrix-org/synapse/issues/9067 ), [\#9081](https://github.com/matrix-org/synapse/issues/9081 ), [\#9082](https://github.com/matrix-org/synapse/issues/9082 ), [\#9105](https://github.com/matrix-org/synapse/issues/9105 ), [\#9107](https://github.com/matrix-org/synapse/issues/9107 ), [\#9109](https://github.com/matrix-org/synapse/issues/9109 ), [\#9110](https://github.com/matrix-org/synapse/issues/9110 ), [\#9127](https://github.com/matrix-org/synapse/issues/9127 ), [\#9153](https://github.com/matrix-org/synapse/issues/9153 ), [\#9154](https://github.com/matrix-org/synapse/issues/9154 ), [\#9177](https://github.com/matrix-org/synapse/issues/9177 ))
- During user-interactive authentication via single-sign-on, give a better error if the user uses the wrong account on the SSO IdP. ([\#9091](https://github.com/matrix-org/synapse/issues/9091 ))
- Give the `public_baseurl` a default value, if it is not explicitly set in the configuration file. ([\#9159](https://github.com/matrix-org/synapse/issues/9159 ))
- Improve performance when calculating ignored users in large rooms. ([\#9024](https://github.com/matrix-org/synapse/issues/9024 ))
- Implement [MSC2176](https://github.com/matrix-org/matrix-doc/pull/2176 ) in an experimental room version. ([\#8984](https://github.com/matrix-org/synapse/issues/8984 ))
- Add an admin API for protecting local media from quarantine. ([\#9086](https://github.com/matrix-org/synapse/issues/9086 ))
- Remove a user's avatar URL and display name when deactivated with the Admin API. ([\#8932](https://github.com/matrix-org/synapse/issues/8932 ))
- Update `/_synapse/admin/v1/users/<user_id>/joined_rooms` to work for both local and remote users. ([\#8948](https://github.com/matrix-org/synapse/issues/8948 ))
- Add experimental support for handling to-device messages on worker processes. ([\#9042](https://github.com/matrix-org/synapse/issues/9042 ), [\#9043](https://github.com/matrix-org/synapse/issues/9043 ), [\#9044](https://github.com/matrix-org/synapse/issues/9044 ), [\#9130](https://github.com/matrix-org/synapse/issues/9130 ))
- Add experimental support for handling `/keys/claim` and `/room_keys` APIs on worker processes. ([\#9068](https://github.com/matrix-org/synapse/issues/9068 ))
- Add experimental support for handling `/devices` API on worker processes. ([\#9092](https://github.com/matrix-org/synapse/issues/9092 ))
- Add experimental support for moving off receipts and account data persistence off master. ([\#9104](https://github.com/matrix-org/synapse/issues/9104 ), [\#9166](https://github.com/matrix-org/synapse/issues/9166 ))
Bugfixes
--------
- Fix a long-standing issue where an internal server error would occur when requesting a profile over federation that did not include a display name / avatar URL. ([\#9023](https://github.com/matrix-org/synapse/issues/9023 ))
- Fix a long-standing bug where some caches could grow larger than configured. ([\#9028](https://github.com/matrix-org/synapse/issues/9028 ))
- Fix error handling during insertion of client IPs into the database. ([\#9051](https://github.com/matrix-org/synapse/issues/9051 ))
- Fix bug where we didn't correctly record CPU time spent in `on_new_event` block. ([\#9053](https://github.com/matrix-org/synapse/issues/9053 ))
- Fix a minor bug which could cause confusing error messages from invalid configurations. ([\#9054](https://github.com/matrix-org/synapse/issues/9054 ))
- Fix incorrect exit code when there is an error at startup. ([\#9059](https://github.com/matrix-org/synapse/issues/9059 ))
- Fix `JSONDecodeError` spamming the logs when sending transactions to remote servers. ([\#9070](https://github.com/matrix-org/synapse/issues/9070 ))
- Fix "Failed to send request" errors when a client provides an invalid room alias. ([\#9071](https://github.com/matrix-org/synapse/issues/9071 ))
- Fix bugs in federation catchup logic that caused outbound federation to be delayed for large servers after start up. Introduced in v1.8.0 and v1.21.0. ([\#9114](https://github.com/matrix-org/synapse/issues/9114 ), [\#9116](https://github.com/matrix-org/synapse/issues/9116 ))
- Fix corruption of `pushers` data when a postgres bouncer is used. ([\#9117](https://github.com/matrix-org/synapse/issues/9117 ))
- Fix minor bugs in handling the `clientRedirectUrl` parameter for SSO login. ([\#9128](https://github.com/matrix-org/synapse/issues/9128 ))
- Fix "Unhandled error in Deferred: BodyExceededMaxSize" errors when .well-known files that are too large. ([\#9108](https://github.com/matrix-org/synapse/issues/9108 ))
- Fix "UnboundLocalError: local variable 'length' referenced before assignment" errors when the response body exceeds the expected size. This bug was introduced in v1.25.0. ([\#9145](https://github.com/matrix-org/synapse/issues/9145 ))
- Fix a long-standing bug "ValueError: invalid literal for int() with base 10" when `/publicRooms` is requested with an invalid `server` parameter. ([\#9161](https://github.com/matrix-org/synapse/issues/9161 ))
Improved Documentation
----------------------
- Add some extra docs for getting Synapse running on macOS. ([\#8997](https://github.com/matrix-org/synapse/issues/8997 ))
- Correct a typo in the `systemd-with-workers` documentation. ([\#9035](https://github.com/matrix-org/synapse/issues/9035 ))
- Correct a typo in `INSTALL.md`. ([\#9040](https://github.com/matrix-org/synapse/issues/9040 ))
- Add missing `user_mapping_provider` configuration to the Keycloak OIDC example. Contributed by @chris-ruecker. ([\#9057](https://github.com/matrix-org/synapse/issues/9057 ))
- Quote `pip install` packages when extras are used to avoid shells interpreting bracket characters. ([\#9151](https://github.com/matrix-org/synapse/issues/9151 ))
Deprecations and Removals
-------------------------
- Remove broken and unmaintained `demo/webserver.py` script. ([\#9039](https://github.com/matrix-org/synapse/issues/9039 ))
Internal Changes
----------------
- Improve efficiency of large state resolutions. ([\#8868](https://github.com/matrix-org/synapse/issues/8868 ), [\#9029](https://github.com/matrix-org/synapse/issues/9029 ), [\#9115](https://github.com/matrix-org/synapse/issues/9115 ), [\#9118](https://github.com/matrix-org/synapse/issues/9118 ), [\#9124](https://github.com/matrix-org/synapse/issues/9124 ))
- Various clean-ups to the structured logging and logging context code. ([\#8939](https://github.com/matrix-org/synapse/issues/8939 ))
- Ensure rejected events get added to some metadata tables. ([\#9016](https://github.com/matrix-org/synapse/issues/9016 ))
- Ignore date-rotated homeserver logs saved to disk. ([\#9018](https://github.com/matrix-org/synapse/issues/9018 ))
- Remove an unused column from `access_tokens` table. ([\#9025](https://github.com/matrix-org/synapse/issues/9025 ))
- Add a `-noextras` factor to `tox.ini`, to support running the tests with no optional dependencies. ([\#9030](https://github.com/matrix-org/synapse/issues/9030 ))
- Fix running unit tests when optional dependencies are not installed. ([\#9031](https://github.com/matrix-org/synapse/issues/9031 ))
- Allow bumping schema version when using split out state database. ([\#9033](https://github.com/matrix-org/synapse/issues/9033 ))
- Configure the linters to run on a consistent set of files. ([\#9038](https://github.com/matrix-org/synapse/issues/9038 ))
- Various cleanups to device inbox store. ([\#9041](https://github.com/matrix-org/synapse/issues/9041 ))
- Drop unused database tables. ([\#9055](https://github.com/matrix-org/synapse/issues/9055 ))
- Remove unused `SynapseService` class. ([\#9058](https://github.com/matrix-org/synapse/issues/9058 ))
- Remove unnecessary declarations in the tests for the admin API. ([\#9063](https://github.com/matrix-org/synapse/issues/9063 ))
- Remove `SynapseRequest.get_user_agent`. ([\#9069](https://github.com/matrix-org/synapse/issues/9069 ))
- Remove redundant `Homeserver.get_ip_from_request` method. ([\#9080](https://github.com/matrix-org/synapse/issues/9080 ))
- Add type hints to media repository. ([\#9093](https://github.com/matrix-org/synapse/issues/9093 ))
- Fix the wrong arguments being passed to `BlacklistingAgentWrapper` from `MatrixFederationAgent`. Contributed by Timothy Leung. ([\#9098](https://github.com/matrix-org/synapse/issues/9098 ))
- Reduce the scope of caught exceptions in `BlacklistingAgentWrapper`. ([\#9106](https://github.com/matrix-org/synapse/issues/9106 ))
- Improve `UsernamePickerTestCase`. ([\#9112](https://github.com/matrix-org/synapse/issues/9112 ))
- Remove dependency on `distutils`. ([\#9125](https://github.com/matrix-org/synapse/issues/9125 ))
- Enforce that replication HTTP clients are called with keyword arguments only. ([\#9144](https://github.com/matrix-org/synapse/issues/9144 ))
- Fix the Python 3.5 / old dependencies build in CI. ([\#9146](https://github.com/matrix-org/synapse/issues/9146 ))
- Replace the old `perspectives` option in the Synapse docker config file template with `trusted_key_servers`. ([\#9157](https://github.com/matrix-org/synapse/issues/9157 ))
2021-01-27 17:27:58 +00:00
Richard van der Hoff
7fa1346f93
Merge branch 'social_login' into develop
2021-01-27 17:27:24 +00:00
Patrick Cloke
17b713850f
Merge branch 'master' into develop
2021-01-27 11:13:21 -05:00
Patrick Cloke
b685c5e7f1
Move note above changes.
2021-01-27 11:02:04 -05:00
Patrick Cloke
e54746bdf7
Clean-up the template loading code. ( #9200 )
...
* Enables autoescape by default for HTML files.
* Adds a new read_template method for reading a single template.
* Some logic clean-up.
2021-01-27 10:59:50 -05:00
Patrick Cloke
71c46652a2
Copy the upgrade note to 1.26.0.
2021-01-27 10:52:45 -05:00
Patrick Cloke
73ed289bd2
1.26.0
2021-01-27 10:50:37 -05:00
Erik Johnston
93b61589b0
Add a note to changelog about redis usage ( #9227 )
2021-01-27 14:06:27 +00:00
Richard van der Hoff
cfcc4bfcaf
Merge branch 'social_login' into develop
2021-01-27 12:41:51 +00:00
Richard van der Hoff
a737cc2713
Implement MSC2858 support ( #9183 )
...
Fixes #8928 .
2021-01-27 12:41:24 +00:00
Andrew Morgan
a64c29926e
Pass a dict, instead of None, to modules if a None config is specified in the homeserver config ( #9229 )
...
If a Synapse module's config block were empty in YAML, thus being translated to a `Nonetype` in Python, then some modules could fail as that None ends up getting passed to their `parse_config` method. Modules are expected to accept a `dict` instead.
This PR ensures that if the user does end up specifying an empty config block (such as what [the default oidc config in the sample config](5310808d3b/docs/sample_config.yaml (L1816-L1845) ) states) then `None` is not passed to the module. An empty dict is passed instead.
This code assumes that no existing modules are relying on receiving a `None` config block, but I'd really hope that they aren't.
2021-01-27 11:49:31 +00:00
Patrick Cloke
1baab20352
Add type hints to various handlers. ( #9223 )
...
With this change all handlers except the e2e_* ones have
type hints enabled.
2021-01-26 10:50:21 -05:00
Patrick Cloke
26837d5dbe
Do not require the CAS service URL setting (use public_baseurl instead). ( #9199 )
...
The current configuration is handled for backwards compatibility,
but is considered deprecated.
2021-01-26 10:49:25 -05:00
Erik Johnston
512e313f18
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-01-26 14:15:26 +00:00
Erik Johnston
dd8da8c5f6
Precompute joined hosts and store in Redis ( #9198 )
2021-01-26 13:57:31 +00:00
Patrick Cloke
4937fe3d6b
Try to recover from unknown encodings when previewing media. ( #9164 )
...
Treat unknown encodings (according to lxml) as UTF-8
when generating a preview for HTML documents. This
isn't fully accurate, but will hopefully give a reasonable
title and summary.
2021-01-26 07:32:17 -05:00
Andrew Morgan
e74bb96733
Update isort to v5.7.0 ( #9222 )
...
This new version no longer has the problem of adding/removing a blank line in `.pyi` files, which black disagrees with. This would cause `isort` to slightly modify `.pyi` files, before `black` would subsequently modify back directly afterwards.
Relevant `isort` issue: https://github.com/pycqa/isort/issues/1284
2021-01-26 11:36:12 +00:00
Jason Robinson
e5b659e9e1
Merge pull request #9062 from matrix-org/jaywink/admin-forward-extremities
...
Add forward extremities endpoint to rooms admin API
2021-01-26 12:57:38 +02:00
Erik Johnston
a1ff1e967f
Periodically send pings to detect dead Redis connections ( #9218 )
...
This is done by creating a custom `RedisFactory` subclass that
periodically pings all connections in its pool.
We also ensure that the `replyTimeout` param is non-null, so that we
timeout waiting for the reply to those pings (and thus triggering a
reconnect).
2021-01-26 10:54:54 +00:00
Jason Robinson
4936fc59fc
Fix get forward extremities query
...
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2021-01-26 10:21:02 +02:00
Jason Robinson
cee4010f94
Merge branch 'develop' into jaywink/admin-forward-extremities
...
# Conflicts:
# synapse/rest/admin/__init__.py
2021-01-26 10:15:32 +02:00
Jason Robinson
e20f18a766
Make natural join inner join
...
Co-authored-by: Erik Johnston <erik@matrix.org >
2021-01-26 10:13:35 +02:00
Patrick Cloke
fdf8346944
Merge remote-tracking branch 'origin/develop' into jaywink/admin-forward-extremities
2021-01-25 14:59:48 -05:00
Patrick Cloke
5b857b77f7
Don't error if deleting a non-existent pusher. ( #9121 )
2021-01-25 14:52:30 -05:00
Patrick Cloke
4a55d267ee
Add an admin API for shadow-banning users. ( #9209 )
...
This expands the current shadow-banning feature to be usable via
the admin API and adds documentation for it.
A shadow-banned users receives successful responses to their
client-server API requests, but the events are not propagated into rooms.
Shadow-banning a user should be used as a tool of last resort and may lead
to confusing or broken behaviour for the client.
2021-01-25 14:49:39 -05:00
Patrick Cloke
2547d9d4d7
Fix Python 3.5 old deps build by using a compatible pip version. ( #9217 )
...
Co-authored-by: Dan Callahan <danc@element.io >
pip 21.0 stopped supporting Python 3.5.
2021-01-25 19:38:31 +00:00
Richard van der Hoff
65fb3b2e25
Merge tag 'v1.26.0rc2' into social_login
...
Synapse 1.26.0rc2 (2021-01-25)
==============================
Bugfixes
--------
- Fix receipts and account data not being sent down sync. Introduced in v1.26.0rc1. ([\#9193](https://github.com/matrix-org/synapse/issues/9193 ), [\#9195](https://github.com/matrix-org/synapse/issues/9195 ))
- Fix chain cover update to handle events with duplicate auth events. Introduced in v1.26.0rc1. ([\#9210](https://github.com/matrix-org/synapse/issues/9210 ))
Internal Changes
----------------
- Add an `oidc-` prefix to any `idp_id`s which are given in the `oidc_providers` configuration. ([\#9189](https://github.com/matrix-org/synapse/issues/9189 ))
- Bump minimum `psycopg2` version to v2.8. ([\#9204](https://github.com/matrix-org/synapse/issues/9204 ))
2021-01-25 19:37:58 +00:00
Patrick Cloke
a71be9d62d
Fix Python 3.5 old deps build by using a compatible pip version. ( #9217 )
...
Co-authored-by: Dan Callahan <danc@element.io >
pip 21.0 stopped supporting Python 3.5.
2021-01-25 14:22:35 -05:00
Jason Robinson
fe18882bb5
Merge remote-tracking branch 'origin/develop' into jaywink/admin-forward-extremities
2021-01-25 15:55:54 +02:00
Patrick Cloke
e448dbbf5b
Merge tag 'v1.26.0rc2' into develop
...
Synapse 1.26.0rc2 (2021-01-25)
==============================
Bugfixes
--------
- Fix receipts and account data not being sent down sync. Introduced in v1.26.0rc1. ([\#9193](https://github.com/matrix-org/synapse/issues/9193 ), [\#9195](https://github.com/matrix-org/synapse/issues/9195 ))
- Fix chain cover update to handle events with duplicate auth events. Introduced in v1.26.0rc1. ([\#9210](https://github.com/matrix-org/synapse/issues/9210 ))
Internal Changes
----------------
- Add an `oidc-` prefix to any `idp_id`s which are given in the `oidc_providers` configuration. ([\#9189](https://github.com/matrix-org/synapse/issues/9189 ))
- Bump minimum `psycopg2` version to v2.8. ([\#9204](https://github.com/matrix-org/synapse/issues/9204 ))
2021-01-25 08:51:45 -05:00
Patrick Cloke
69961c7e9f
Tweak changes.
2021-01-25 08:26:42 -05:00
Patrick Cloke
a01605c136
1.26.0rc2
2021-01-25 08:25:40 -05:00
Patrick Cloke
a574751a87
Merge remote-tracking branch 'origin/release-v1.26.0' into matrix-org-hotfixes
2021-01-25 08:07:39 -05:00
Patrick Cloke
6f7417c3db
Handle missing content keys when calculating presentable names. ( #9165 )
...
Treat the content as untrusted and do not assume it is of
the proper form.
2021-01-25 07:27:16 -05:00
Jason Robinson
8965b6cfec
Merge branch 'develop' into jaywink/admin-forward-extremities
2021-01-23 21:41:35 +02:00
Jason Robinson
930ba00971
Add depth and received_ts to forward_extremities admin API response
...
Also add a warning on the admin API documentation.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2021-01-23 21:34:32 +02:00
Erik Johnston
056327457f
Fix chain cover update to handle events with duplicate auth events ( #9210 )
2021-01-22 19:44:08 +00:00
Erik Johnston
28f255d5f3
Bump psycopg2 version ( #9204 )
...
As we use `execute_values` with the `fetch` parameter.
2021-01-22 11:14:49 +00:00
Patrick Cloke
a7882f9887
Return a 404 if no valid thumbnail is found. ( #9163 )
...
If no thumbnail of the requested type exists, return a 404 instead
of erroring. This doesn't quite match the spec (which does not define
what happens if no thumbnail can be found), but is consistent with
what Synapse already does.
2021-01-21 14:53:58 -05:00
Andrew Morgan
31c5382d7a
Align the directories linted in CI with the defaults in scripts-dev/lint.sh ( #9191 )
...
The lists of source directories to lint between `tox.ini` and `lint.sh` became out of sync. This PR tightens them up and adds some comments reminding any future readers to keep the list in sync.
2021-01-21 18:26:52 +00:00
Erik Johnston
758ed5f1bc
Speed up chain cover calculation ( #9176 )
2021-01-21 17:00:12 +00:00
Erik Johnston
12ec55bfaa
Increase perf of handling concurrent use of StreamIDGenerators. ( #9190 )
...
We have seen a failure mode here where if there are many in flight
unfinished IDs then marking an ID as finished takes a lot of CPU (as
calling deque.remove iterates over the list)
2021-01-21 16:31:51 +00:00
Erik Johnston
bde75f5f66
Merge remote-tracking branch 'origin/release-v1.26.0' into matrix-org-hotfixes
2021-01-21 16:05:34 +00:00
Erik Johnston
939ef657ce
Merge remote-tracking branch 'origin/release-v1.26.0' into develop
2021-01-21 16:05:13 +00:00
Erik Johnston
ccfafac882
Add schema update to fix existing DBs affected by #9193 ( #9195 )
2021-01-21 16:03:25 +00:00
Erik Johnston
b249f002b8
Merge remote-tracking branch 'origin/release-v1.26.0' into develop
2021-01-21 15:09:30 +00:00
Erik Johnston
2506074ef0
Fix receipts or account data not being sent down sync ( #9193 )
...
Introduced in #9104
This wasn't picked up by the tests as this is all fine the first time you run Synapse (after upgrading), but then when you restart the wrong value is pulled from `stream_positions`.
2021-01-21 15:09:09 +00:00
Erik Johnston
7a43482f19
Use execute_batch in more places ( #9188 )
...
* Use execute_batch in more places
* Newsfile
2021-01-21 14:44:12 +00:00
Dirk Klimpel
c55e62548c
Add tests for List Users Admin API ( #9045 )
2021-01-21 09:18:46 -05:00
Richard van der Hoff
42a8e81370
Add a check for duplicate IdP ids ( #9184 )
2021-01-21 13:20:58 +00:00
Richard van der Hoff
b5120f09f1
Merge remote-tracking branch 'origin/release-v1.26.0' into develop
2021-01-21 13:17:07 +00:00
Richard van der Hoff
7447f19702
Prefix idp_id with "oidc-" ( #9189 )
...
... to avoid clashes with other SSO mechanisms
2021-01-21 12:25:02 +00:00
Erik Johnston
eee6fcf5fa
Use execute_batch instead of executemany in places ( #9181 )
...
`execute_batch` does fewer round trips in postgres than `executemany`, but does not give a correct `txn.rowcount` result after.
2021-01-21 10:22:53 +00:00
Patrick Cloke
1fa15b74e0
Specify that the long description is rST in the package metadata. ( #9180 )
...
This avoids a warning when uploading packages to PyPI via twine.
2021-01-20 16:00:59 -05:00
Patrick Cloke
937b849a2e
Fix a typo in the release notes.
2021-01-20 11:34:34 -05:00
Patrick Cloke
818bf313bc
Merge branch 'release-v1.26.0' into develop
2021-01-20 11:32:06 -05:00
Patrick Cloke
f81d02d75b
Merge tag 'v1.26.0rc1' into develop
...
Synapse 1.26.0rc1 (2021-01-20)
==============================
This release brings a new schema version for Synapse and rolling back to a previous
verious is not trivial. Please review [UPGRADE.rst](UPGRADE.rst) for more details
on these changes and for general upgrade guidance.
Features
--------
- Add support for multiple SSO Identity Providers. ([\#9015](https://github.com/matrix-org/synapse/issues/9015 ), [\#9017](https://github.com/matrix-org/synapse/issues/9017 ), [\#9036](https://github.com/matrix-org/synapse/issues/9036 ), [\#9067](https://github.com/matrix-org/synapse/issues/9067 ), [\#9081](https://github.com/matrix-org/synapse/issues/9081 ), [\#9082](https://github.com/matrix-org/synapse/issues/9082 ), [\#9105](https://github.com/matrix-org/synapse/issues/9105 ), [\#9107](https://github.com/matrix-org/synapse/issues/9107 ), [\#9109](https://github.com/matrix-org/synapse/issues/9109 ), [\#9110](https://github.com/matrix-org/synapse/issues/9110 ), [\#9127](https://github.com/matrix-org/synapse/issues/9127 ), [\#9153](https://github.com/matrix-org/synapse/issues/9153 ), [\#9154](https://github.com/matrix-org/synapse/issues/9154 ), [\#9177](https://github.com/matrix-org/synapse/issues/9177 ))
- During user-interactive authentication via single-sign-on, give a better error if the user uses the wrong account on the SSO IdP. ([\#9091](https://github.com/matrix-org/synapse/issues/9091 ))
- Give the `public_baseurl` a default value, if it is not explicitly set in the configuration file. ([\#9159](https://github.com/matrix-org/synapse/issues/9159 ))
- Improve performance when calculating ignored users in large rooms. ([\#9024](https://github.com/matrix-org/synapse/issues/9024 ))
- Implement [MSC2176](https://github.com/matrix-org/matrix-doc/pull/2176 ) in an experimental room version. ([\#8984](https://github.com/matrix-org/synapse/issues/8984 ))
- Add an admin API for protecting local media from quarantine. ([\#9086](https://github.com/matrix-org/synapse/issues/9086 ))
- Remove a user's avatar URL and display name when deactivated with the Admin API. ([\#8932](https://github.com/matrix-org/synapse/issues/8932 ))
- Update `/_synapse/admin/v1/users/<user_id>/joined_rooms` to work for both local and remote users. ([\#8948](https://github.com/matrix-org/synapse/issues/8948 ))
- Add experimental support for handling to-device messages on worker processes. ([\#9042](https://github.com/matrix-org/synapse/issues/9042 ), [\#9043](https://github.com/matrix-org/synapse/issues/9043 ), [\#9044](https://github.com/matrix-org/synapse/issues/9044 ), [\#9130](https://github.com/matrix-org/synapse/issues/9130 ))
- Add experimental support for handling `/keys/claim` and `/room_keys` APIs on worker processes. ([\#9068](https://github.com/matrix-org/synapse/issues/9068 ))
- Add experimental support for handling `/devices` API on worker processes. ([\#9092](https://github.com/matrix-org/synapse/issues/9092 ))
- Add experimental support for moving off receipts and account data persistence off master. ([\#9104](https://github.com/matrix-org/synapse/issues/9104 ), [\#9166](https://github.com/matrix-org/synapse/issues/9166 ))
Bugfixes
--------
- Fix a long-standing issue where an internal server error would occur when requesting a profile over federation that did not include a display name / avatar URL. ([\#9023](https://github.com/matrix-org/synapse/issues/9023 ))
- Fix a long-standing bug where some caches could grow larger than configured. ([\#9028](https://github.com/matrix-org/synapse/issues/9028 ))
- Fix error handling during insertion of client IPs into the database. ([\#9051](https://github.com/matrix-org/synapse/issues/9051 ))
- Fix bug where we didn't correctly record CPU time spent in `on_new_event` block. ([\#9053](https://github.com/matrix-org/synapse/issues/9053 ))
- Fix a minor bug which could cause confusing error messages from invalid configurations. ([\#9054](https://github.com/matrix-org/synapse/issues/9054 ))
- Fix incorrect exit code when there is an error at startup. ([\#9059](https://github.com/matrix-org/synapse/issues/9059 ))
- Fix `JSONDecodeError` spamming the logs when sending transactions to remote servers. ([\#9070](https://github.com/matrix-org/synapse/issues/9070 ))
- Fix "Failed to send request" errors when a client provides an invalid room alias. ([\#9071](https://github.com/matrix-org/synapse/issues/9071 ))
- Fix bugs in federation catchup logic that caused outbound federation to be delayed for large servers after start up. Introduced in v1.8.0 and v1.21.0. ([\#9114](https://github.com/matrix-org/synapse/issues/9114 ), [\#9116](https://github.com/matrix-org/synapse/issues/9116 ))
- Fix corruption of `pushers` data when a postgres bouncer is used. ([\#9117](https://github.com/matrix-org/synapse/issues/9117 ))
- Fix minor bugs in handling the `clientRedirectUrl` parameter for SSO login. ([\#9128](https://github.com/matrix-org/synapse/issues/9128 ))
- Fix "Unhandled error in Deferred: BodyExceededMaxSize" errors when .well-known files that are too large. ([\#9108](https://github.com/matrix-org/synapse/issues/9108 ))
- Fix "UnboundLocalError: local variable 'length' referenced before assignment" errors when the response body exceeds the expected size. This bug was introduced in v1.25.0. ([\#9145](https://github.com/matrix-org/synapse/issues/9145 ))
- Fix a long-standing bug "ValueError: invalid literal for int() with base 10" when `/publicRooms` is requested with an invalid `server` parameter. ([\#9161](https://github.com/matrix-org/synapse/issues/9161 ))
Improved Documentation
----------------------
- Add some extra docs for getting Synapse running on macOS. ([\#8997](https://github.com/matrix-org/synapse/issues/8997 ))
- Correct a typo in the `systemd-with-workers` documentation. ([\#9035](https://github.com/matrix-org/synapse/issues/9035 ))
- Correct a typo in `INSTALL.md`. ([\#9040](https://github.com/matrix-org/synapse/issues/9040 ))
- Add missing `user_mapping_provider` configuration to the Keycloak OIDC example. Contributed by @chris-ruecker. ([\#9057](https://github.com/matrix-org/synapse/issues/9057 ))
- Quote `pip install` packages when extras are used to avoid shells interpreting bracket characters. ([\#9151](https://github.com/matrix-org/synapse/issues/9151 ))
Deprecations and Removals
-------------------------
- Remove broken and unmaintained `demo/webserver.py` script. ([\#9039](https://github.com/matrix-org/synapse/issues/9039 ))
Internal Changes
----------------
- Improve efficiency of large state resolutions. ([\#8868](https://github.com/matrix-org/synapse/issues/8868 ), [\#9029](https://github.com/matrix-org/synapse/issues/9029 ), [\#9115](https://github.com/matrix-org/synapse/issues/9115 ), [\#9118](https://github.com/matrix-org/synapse/issues/9118 ), [\#9124](https://github.com/matrix-org/synapse/issues/9124 ))
- Various clean-ups to the structured logging and logging context code. ([\#8939](https://github.com/matrix-org/synapse/issues/8939 ))
- Ensure rejected events get added to some metadata tables. ([\#9016](https://github.com/matrix-org/synapse/issues/9016 ))
- Ignore date-rotated homeserver logs saved to disk. ([\#9018](https://github.com/matrix-org/synapse/issues/9018 ))
- Remove an unused column from `access_tokens` table. ([\#9025](https://github.com/matrix-org/synapse/issues/9025 ))
- Add a `-noextras` factor to `tox.ini`, to support running the tests with no optional dependencies. ([\#9030](https://github.com/matrix-org/synapse/issues/9030 ))
- Fix running unit tests when optional dependencies are not installed. ([\#9031](https://github.com/matrix-org/synapse/issues/9031 ))
- Allow bumping schema version when using split out state database. ([\#9033](https://github.com/matrix-org/synapse/issues/9033 ))
- Configure the linters to run on a consistent set of files. ([\#9038](https://github.com/matrix-org/synapse/issues/9038 ))
- Various cleanups to device inbox store. ([\#9041](https://github.com/matrix-org/synapse/issues/9041 ))
- Drop unused database tables. ([\#9055](https://github.com/matrix-org/synapse/issues/9055 ))
- Remove unused `SynapseService` class. ([\#9058](https://github.com/matrix-org/synapse/issues/9058 ))
- Remove unnecessary declarations in the tests for the admin API. ([\#9063](https://github.com/matrix-org/synapse/issues/9063 ))
- Remove `SynapseRequest.get_user_agent`. ([\#9069](https://github.com/matrix-org/synapse/issues/9069 ))
- Remove redundant `Homeserver.get_ip_from_request` method. ([\#9080](https://github.com/matrix-org/synapse/issues/9080 ))
- Add type hints to media repository. ([\#9093](https://github.com/matrix-org/synapse/issues/9093 ))
- Fix the wrong arguments being passed to `BlacklistingAgentWrapper` from `MatrixFederationAgent`. Contributed by Timothy Leung. ([\#9098](https://github.com/matrix-org/synapse/issues/9098 ))
- Reduce the scope of caught exceptions in `BlacklistingAgentWrapper`. ([\#9106](https://github.com/matrix-org/synapse/issues/9106 ))
- Improve `UsernamePickerTestCase`. ([\#9112](https://github.com/matrix-org/synapse/issues/9112 ))
- Remove dependency on `distutils`. ([\#9125](https://github.com/matrix-org/synapse/issues/9125 ))
- Enforce that replication HTTP clients are called with keyword arguments only. ([\#9144](https://github.com/matrix-org/synapse/issues/9144 ))
- Fix the Python 3.5 / old dependencies build in CI. ([\#9146](https://github.com/matrix-org/synapse/issues/9146 ))
- Replace the old `perspectives` option in the Synapse docker config file template with `trusted_key_servers`. ([\#9157](https://github.com/matrix-org/synapse/issues/9157 ))
2021-01-20 11:27:39 -05:00
Patrick Cloke
4c37d2acd5
Fix reStructuredText formatting.
2021-01-20 11:10:00 -05:00
Patrick Cloke
adabf328ac
Point people to the upgrade notes.
2021-01-20 11:01:04 -05:00
Patrick Cloke
933f258967
Formatting.
2021-01-20 10:54:06 -05:00
Patrick Cloke
d5349959f4
SQL formatting in UPGRADE.
2021-01-20 10:53:39 -05:00
Patrick Cloke
1b37107cac
Add upgrade notes about chain cover.
2021-01-20 10:52:55 -05:00
Patrick Cloke
c8e6e05842
Include upgrade notes.
2021-01-20 10:37:09 -05:00
Patrick Cloke
7e072d38b1
Re-run towncrier.
2021-01-20 08:56:25 -05:00
Richard van der Hoff
e51b2f3f91
Tighten the restrictions on idp_id ( #9177 )
2021-01-20 08:55:14 -05:00
Richard van der Hoff
0cd2938bc8
Support icons for Identity Providers ( #9154 )
2021-01-20 08:15:14 -05:00
Patrick Cloke
620ecf13b0
Various improvements to the federation client. ( #9129 )
...
* Type hints for `FederationClient`.
* Using `async` functions instead of returning `Awaitable` instances.
2021-01-20 07:59:18 -05:00
rht
a5b9c87ac6
docs: Add link to Matrix VoIP tester for turn-howto ( #9135 )
...
Signed-off-by: rht <rhtbot@protonmail.com >
2021-01-20 12:41:57 +00:00
Richard van der Hoff
6c0dfd2e8e
Merge remote-tracking branch 'origin/develop' into release-v1.26.0
2021-01-20 12:33:05 +00:00
Richard van der Hoff
fa50e4bf4d
Give public_baseurl a default value ( #9159 )
2021-01-20 12:30:41 +00:00
Patrick Cloke
5b8ee181b7
Reword confusing sentence in CHANGES.
2021-01-20 07:30:34 -05:00
Patrick Cloke
74ced7d070
Fix tenses in CHANGES.
2021-01-20 07:24:37 -05:00
Patrick Cloke
3005a2816c
Re-arrange CHANGES.md.
2021-01-20 07:19:42 -05:00
Patrick Cloke
72822e60be
1.26.0rc1
2021-01-20 07:14:25 -05:00
Erik Johnston
e33124a642
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-01-20 10:45:19 +00:00
Patrick Cloke
fa842a9866
Use the account handler in additional places. ( #9166 )
2021-01-20 10:44:52 +00:00
Patrick Cloke
47d48a5853
Validate the server name for the /publicRooms endpoint. ( #9161 )
...
If a remote server name is provided, ensure it is something reasonable
before making remote connections to it.
2021-01-19 14:21:59 -05:00
Andrew Morgan
94549771f7
Replace 'perspectives' config block with 'trusted_key_servers' in docker homeserver.yaml template ( #9157 )
2021-01-19 16:19:32 +00:00
Richard van der Hoff
73b03722f4
Fix error messages from OIDC config parsing ( #9153 )
...
Make sure we report the correct config path for errors in the OIDC configs.
2021-01-19 14:56:54 +00:00
Erik Johnston
bed4fa29fd
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-01-19 10:19:25 +00:00
Patrick Cloke
de45bf5b5b
Quote pip install with brackets to avoid shell interpretation. ( #9151 )
2021-01-18 11:12:20 -05:00
Erik Johnston
6633a4015a
Allow moving account data and receipts streams off master ( #9104 )
2021-01-18 15:47:59 +00:00
Erik Johnston
f08ef64926
Enforce all replication HTTP clients calls use kwargs ( #9144 )
2021-01-18 15:24:04 +00:00
Patrick Cloke
2b467d0b61
Properly raise an exception when the body exceeds the max size. ( #9145 )
...
...instead of just creating the exception object and doing nothing with it.
2021-01-18 10:21:42 -05:00
Richard van der Hoff
02070c69fa
Fix bugs in handling clientRedirectUrl, and improve OIDC tests ( #9127 , #9128 )
...
* Factor out a common TestHtmlParser
Looks like I'm doing this in a few different places.
* Improve OIDC login test
Complete the OIDC login flow, rather than giving up halfway through.
* Ensure that OIDC login works with multiple OIDC providers
* Fix bugs in handling clientRedirectUrl
- don't drop duplicate query-params, or params with no value
- allow utf-8 in query-params
2021-01-18 14:52:49 +00:00
Patrick Cloke
a8703819eb
Fix the Python 3.5 old-deps build. ( #9146 )
...
setuptools 51.0.0 dropped support for Python 3.5.
2021-01-18 09:35:42 -05:00
Erik Johnston
f5ab7d8306
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-01-18 11:14:37 +00:00
Patrick Cloke
de1f8de319
Ensure the user ID is serialized in the payload instead of used as an instance name. ( #9130 )
2021-01-18 11:08:26 +00:00
Matthew Hodgson
883d4e6f2b
link to the scalability blog post from workers.md
2021-01-18 00:27:27 +00:00
Richard van der Hoff
b5dea8702d
Fix test failure due to bad merge
...
0dd2649c1 (#9112 ) changed the signature of `auth_via_oidc`. Meanwhile,
26d10331e (#9091 ) introduced a new test which relied on the old signature of
`auth_via_oidc`. The two branches were never tested together until they landed
in develop.
2021-01-15 18:03:33 +00:00
Erik Johnston
350d9923cd
Make chain cover index bg update go faster ( #9124 )
...
We do this by allowing a single iteration to process multiple rooms at a
time, as there are often a lot of really tiny rooms, which can massively
slow things down.
2021-01-15 17:18:37 +00:00
Richard van der Hoff
2de7e263ed
Ensure we store pusher data as text ( #9117 )
...
I don't think there's any need to use canonicaljson here.
Fixes : #4475 .
2021-01-15 16:57:23 +00:00
Richard van der Hoff
9de6b94117
Land support for multiple OIDC providers ( #9110 )
...
This is the final step for supporting multiple OIDC providers concurrently.
First of all, we reorganise the config so that you can specify a list of OIDC providers, instead of a single one. Before:
oidc_config:
enabled: true
issuer: "https://oidc_provider "
# etc
After:
oidc_providers:
- idp_id: prov1
issuer: "https://oidc_provider "
- idp_id: prov2
issuer: "https://another_oidc_provider "
The old format is still grandfathered in.
With that done, it's then simply a matter of having OidcHandler instantiate a new OidcProvider for each configured provider.
2021-01-15 16:55:29 +00:00
Patrick Cloke
3e4cdfe5d9
Add an admin API endpoint to protect media. ( #9086 )
...
Protecting media stops it from being quarantined when
e.g. all media in a room is quarantined. This is useful
for sticker packs and other media that is uploaded by
server administrators, but used by many people.
2021-01-15 11:18:09 -05:00
Patrick Cloke
74dd906041
Avoid raising the body exceeded error multiple times. ( #9108 )
...
Previously this code generated unreferenced `Deferred` instances
which caused "Unhandled Deferreds" errors to appear in error
situations.
2021-01-15 11:00:13 -05:00
Richard van der Hoff
9ffac2bef1
Remote dependency on distutils ( #9125 )
...
`distutils` is pretty much deprecated these days, and replaced with
`setuptools`. It's also annoying because it's you can't `pip install` it, and
it's hard to figure out which debian package we should depend on to make sure
it's there.
Since we only use it for a tiny function anyway, let's just vendor said
function into our codebase.
2021-01-15 15:59:20 +00:00
Patrick Cloke
d34c6e1279
Add type hints to media rest resources. ( #9093 )
2021-01-15 10:57:37 -05:00
Erik Johnston
029c9ef967
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-01-15 14:05:55 +00:00
Richard van der Hoff
0dd2649c12
Improve UsernamePickerTestCase ( #9112 )
...
* make the OIDC bits of the test work at a higher level - via the REST api instead of poking the OIDCHandler directly.
* Move it to test_login.py, where I think it fits better.
2021-01-15 13:45:13 +00:00
Richard van der Hoff
4575ad0b1e
Store an IdP ID in the OIDC session ( #9109 )
...
Again in preparation for handling more than one OIDC provider, add a new caveat to the macaroon used as an OIDC session cookie, which remembers which OIDC provider we are talking to. In future, when we get a callback, we'll need it to make sure we talk to the right IdP.
As part of this, I'm adding an idp_id and idp_name field to the OIDC configuration object. They aren't yet documented, and we'll just use the old values by default.
2021-01-15 13:22:12 +00:00
Eric Eastwood
20af310889
Add some extra notes for getting Synapse running on macOS. ( #8997 )
2021-01-15 06:58:31 -05:00
Richard van der Hoff
14950a45d6
Merge pull request #9091 from matrix-org/rav/error_on_bad_sso
...
Give the user a better error when they present bad SSO creds
2021-01-15 00:27:13 +00:00
Erik Johnston
1a08e0cdab
Fix event chain bg update. ( #9118 )
...
We passed in a graph to `sorted_topologically` which didn't have an
entry for each node (as we dropped nodes with no edges).
2021-01-14 18:57:32 +00:00
Erik Johnston
d2479c6870
Fix perf of get_cross_signing_keys ( #9116 )
2021-01-14 17:57:09 +00:00
Erik Johnston
e6b27b480c
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-01-14 17:39:13 +00:00
Erik Johnston
659c415ed4
Fix chain cover background update to work with split out event persisters ( #9115 )
2021-01-14 17:19:35 +00:00
Erik Johnston
631dd06f2c
Fix get destinations to catch up query. ( #9114 )
...
t was doing a sequential scan on `destination_rooms`, which took
minutes.
2021-01-14 16:47:21 +00:00
Erik Johnston
43dc637136
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-01-14 15:29:29 +00:00
Erik Johnston
7036e24e98
Add background update for add chain cover index ( #9029 )
2021-01-14 15:18:27 +00:00
Richard van der Hoff
21a296cd5a
Split OidcProvider out of OidcHandler ( #9107 )
...
The idea here is that we will have an instance of OidcProvider for each
configured IdP, with OidcHandler just doing the marshalling of them.
For now it's still hardcoded with a single provider.
2021-01-14 13:29:17 +00:00
Tim Leung
12702be951
Fix wrong arguments being passed to BlacklistingAgentWrapper ( #9098 )
...
A reactor was being passed instead of a whitelist for the BlacklistingAgentWrapper
used by the WellyKnownResolver. This coulld cause exceptions when attempting to
connect to IP addresses that are blacklisted, but in reality this did not have any
observable affect since this code is not used for IP literals.
2021-01-14 06:59:26 -05:00
Richard van der Hoff
26d10331e5
Add a test for wrong user returned by SSO
2021-01-13 20:22:41 +00:00
Richard van der Hoff
420031906a
Move complete_sso_ui_auth into SSOHandler
...
since we're hacking on this code anyway, may as well move it out of the
cluttered AuthHandler.
2021-01-13 20:22:41 +00:00
Richard van der Hoff
5310808d3b
Give the user a better error when they present bad SSO creds
...
If a user tries to do UI Auth via SSO, but uses the wrong account on the SSO
IdP, try to give them a better error.
Previously, the UIA would claim to be successful, but then the operation in
question would simply fail with "auth fail". Instead, serve up an error page
which explains the failure.
2021-01-13 20:22:41 +00:00
Richard van der Hoff
233c8b9fce
Add a test for UI-Auth-via-SSO ( #9082 )
...
* Add complete test for UI-Auth-via-SSO.
* review comments
2021-01-13 20:21:55 +00:00
Richard van der Hoff
d02e4b2825
Merge pull request #9105 from matrix-org/rav/multi_idp/oidc_provider_config
...
Enhancements to OIDC configuration handling
2021-01-13 19:51:46 +00:00
Patrick Cloke
aee8e6a95d
Reduce scope of exception handler. ( #9106 )
...
Removes a bare `except Exception` clause and replaces it with
catching a specific exception around the portion that might throw.
2021-01-13 13:27:49 -05:00
Richard van der Hoff
ef410232f3
changelog
2021-01-13 17:47:27 +00:00
Richard van der Hoff
dc3c83a933
Add jsonschema verification for the oidc provider config
2021-01-13 17:47:27 +00:00
Patrick Cloke
d1eb1b96e8
Register the /devices endpoint on workers. ( #9092 )
2021-01-13 12:35:40 -05:00
Richard van der Hoff
7cc9509eca
Extract OIDCProviderConfig object
...
Collect all the config options which related to an OIDC provider into a single
object.
2021-01-13 16:40:02 +00:00
Patrick Cloke
98a64b7f7f
Add basic domain validation for DomainSpecificString.is_valid. ( #9071 )
...
This checks that the domain given to `DomainSpecificString.is_valid` (e.g.
`UserID`, `RoomAlias`, etc.) is of a valid form. Previously some validation
was done on the localpart (e.g. the sigil), but not the domain portion.
2021-01-13 07:05:16 -05:00
Erik Johnston
aa4d8c1f9a
Merge branch 'master' into develop
2021-01-13 10:36:55 +00:00
Erik Johnston
ebd534b58d
Move removal warning up changelog
2021-01-13 10:31:27 +00:00
Erik Johnston
891c925b88
Link to GH profile and fix tense
2021-01-13 10:28:03 +00:00
Erik Johnston
f7478d5cc6
Fix link in changelog
2021-01-13 10:26:25 +00:00
Richard van der Hoff
bc4bf7b384
Preparatory refactors of OidcHandler ( #9067 )
...
Some light refactoring of OidcHandler, in preparation for bigger things:
* remove inheritance from deprecated BaseHandler
* add an object to hold the things that go into a session cookie
* factor out a separate class for manipulating said cookies
2021-01-13 10:26:12 +00:00
Erik Johnston
429c339de8
Fixup changelog
2021-01-13 10:23:16 +00:00
Erik Johnston
3dd6ba135e
1.25.0
2021-01-13 10:19:12 +00:00
Dirk Klimpel
7a2e9b549d
Remove user's avatar URL and displayname when deactivated. ( #8932 )
...
This only applies if the user's data is to be erased.
2021-01-12 16:30:15 -05:00
Dan Callahan
6d91e6ca5f
Announce Python / PostgreSQL deprecation policies ( #9085 )
...
Fixes #8782
2021-01-12 20:11:15 +00:00
Richard van der Hoff
789d9ebad3
UI Auth via SSO: redirect the user to an appropriate SSO. ( #9081 )
...
If we have integrations with multiple identity providers, when the user does a UI Auth, we need to redirect them to the right one.
There are a few steps to this. First of all we actually need to store the userid of the user we are trying to validate in the UIA session, since the /auth/sso/fallback/web request is unauthenticated.
Then, once we get the /auth/sso/fallback/web request, we can fish the user id out of the session, and use it to look up the external id mappings, and hence pick an SSO provider for them.
2021-01-12 17:38:03 +00:00
Marcus
e385c8b473
Don't apply the IP range blacklist to proxy connections ( #9084 )
...
It is expected that the proxy would be on a private IP address so the
configured proxy should be connected to regardless of the IP range
blacklist.
2021-01-12 12:20:30 -05:00
Patrick Cloke
723b19748a
Handle bad JSON data being returned from the federation API. ( #9070 )
2021-01-12 11:07:01 -05:00
Dan Callahan
fa6deb298b
Fix failures in Debian packaging ( #9079 )
...
Debian package builds were failing for two reasons:
1. Python versions prior to 3.7 throw exceptions when attempting to print
Unicode characters under a "C" locale. (#9076 )
2. We depended on `dh-systemd` which no longer exists in Debian Bullseye, but
is necessary in Ubuntu Xenial. (#9073 )
Setting `LANG="C.UTF-8"` in the build environment fixes the first issue.
See also: https://bugs.python.org/issue19846
The second issue is a bit trickier. The dh-systemd package was merged into
debhelper version 9.20160709 and a transitional package left in its wake.
The transitional dh-systemd package was removed in Debian Bullseye.
However, Ubuntu Xenial ships an older debhelper, and still needs dh-systemd.
Thus, builds were failing on Bullseye since we depended on a package which had
ceased existing, but we couldn't remove it from the debian/control file and our
build scripts because we still needed it for Ubuntu Xenial.
We can fix the debian/control issue by listing dh-systemd as an alternative to
the newer versions of debhelper. Since dh-systemd declares that it depends on
debhelper, Ubuntu Xenial will select its older dh-systemd which will in turn
pull in its older debhelper, resulting in no change from the status quo. All
other supported releases will satisfy the debhelper dependency constraint and
skip the dh-systemd alternative.
Build scripts were fixed by unconditionally attempting to install dh-systemd on
all releases and suppressing failures.
Once we drop support for Ubuntu Xenial, we can revert most of this commit and
rely on the version constraint on debhelper in debian/control.
Fixes #9076
Fixes #9073
Signed-off-by: Dan Callahan <danc@element.io >
2021-01-12 14:15:04 +00:00
Richard van der Hoff
0f8945e166
Kill off HomeServer.get_ip_from_request() ( #9080 )
...
Homeserver.get_ip_from_request() used to be a bit more complicated, but now it is totally redundant. Let's get rid of it.
2021-01-12 12:48:12 +00:00
Richard van der Hoff
2ec8ca5e60
Remove SynapseRequest.get_user_agent ( #9069 )
...
SynapseRequest is in danger of becoming a bit of a dumping-ground for "useful stuff relating to Requests",
which isn't really its intention (its purpose is to override render, finished and connectionLost to set up the
LoggingContext and write the right entries to the request log).
Putting utility functions inside SynapseRequest means that lots of our code ends up requiring a
SynapseRequest when there is nothing synapse-specific about the Request at all, and any old
twisted.web.iweb.IRequest will do. This increases code coupling and makes testing more difficult.
In short: move get_user_agent out to a utility function.
2021-01-12 12:34:16 +00:00
Jason Robinson
c177faf5a9
Remove trailing whitespace to appease the linter
...
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2021-01-11 23:55:44 +02:00
Jason Robinson
49c619a9a2
Simplify delete_forward_extremities_for_room_txn SQL
...
As per feedback.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2021-01-11 23:49:58 +02:00
Jason Robinson
da16d06301
Address pr feedback
...
* docs updates
* prettify SQL
* add missing copyright
* cursor_to_dict
* update touched files copyright years
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2021-01-11 23:43:58 +02:00
Jason Robinson
0b77329fe2
Clarify rooms.md
...
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2021-01-11 23:05:36 +02:00
David Teller
b161528fcc
Also support remote users on the joined_rooms admin API. ( #8948 )
...
For remote users, only the rooms which the server knows about are returned.
Local users have all of their joined rooms returned.
2021-01-11 14:32:17 -05:00
Erik Johnston
c9195744a4
Move more encryption endpoints off master ( #9068 )
2021-01-11 18:01:27 +00:00
Dirk Klimpel
42d3a28d8b
Removes unnecessary declarations in the tests for the admin API. ( #9063 )
2021-01-11 11:15:54 -05:00
Erik Johnston
1315a2e8be
Use a chain cover index to efficiently calculate auth chain difference ( #8868 )
2021-01-11 16:09:22 +00:00
Richard van der Hoff
671138f658
Clean up exception handling in the startup code ( #9059 )
...
Factor out the exception handling in the startup code to a utility function,
and fix the some logging and exit code stuff.
2021-01-11 15:55:05 +00:00
Erik Johnston
4e04435bda
Remove old tables after schema version bump ( #9055 )
...
These tables are unused, and can be dropped now the schema version has been bumped.
2021-01-11 13:58:19 +00:00
Erik Johnston
63f4990298
Ensure rejected events get added to some metadata tables ( #9016 )
...
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com >
2021-01-11 13:57:33 +00:00
0xflotus
2fb1c2b6e6
Fix a typo in the install docs. ( #9040 )
2021-01-11 07:42:18 -05:00
Richard van der Hoff
7db2622d30
Remove unused SynapseService ( #9058 )
2021-01-11 10:24:22 +00:00
Jerin J Titus
c21d8f1c1d
Drop last_used column from access_tokens ( #9025 )
...
* Dropped last_used column from access_tokens
Signed-off-by: Jerin J Titus <72017981+jerinjtitus@users.noreply.github.com >
2021-01-11 10:23:49 +00:00
Jason Robinson
b52fb703f7
Don't try to use f-strings
...
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2021-01-11 09:47:03 +02:00
Matthew Hodgson
ef0388a648
fix spurious MD in README.rst
2021-01-10 23:40:12 +00:00
Jason Robinson
e2c16edc78
Add changelog and admin API docs
...
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2021-01-09 22:58:29 +02:00
Jason Robinson
2eb421b606
Merge branch 'develop' into jaywink/admin-forward-extremities
2021-01-09 22:00:04 +02:00
Jason Robinson
90ad4d443a
Implement clearing cache after deleting forward extremities
...
Also run linter.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2021-01-09 21:57:41 +02:00
Christopher Rücker
bce0c91d9a
Keycloak mapping_provider example ( #9037 ) ( #9057 )
...
This PR adds the missing user_mapping_provider section in oidc.md
Signed-off-by: Christopher Rücker chris-ruecker@protonmail.com
2021-01-08 18:29:30 +00:00
Erik Johnston
a03d71dc9d
Fix "Starting metrics collection from sentinel context" errors ( #9053 )
2021-01-08 14:33:53 +00:00
Richard van der Hoff
12f79da587
Merge pull request #9036 from matrix-org/rav/multi_idp/tests
...
Add tests for the IdP picker
2021-01-08 14:24:41 +00:00
Richard van der Hoff
d32870ffa5
Fix validate_config on nested objects ( #9054 )
2021-01-08 14:23:04 +00:00
Erik Johnston
fa5f5cbc74
Fix error handling during insertion of client IPs ( #9051 )
...
You can't continue using a transaction once an exception has been
raised, so catching and dropping the error here is pointless and just
causes more errors.
2021-01-08 14:15:20 +00:00
Richard van der Hoff
195adf4025
Remove broken and unmaintained 'webserver.py' script ( #9039 )
...
I'm not even sure what this was supposed to do, but the fact it has python2isms
and nobody has noticed suggests it's not terribly important.
It doesn't seem to have been used since ff23e5ba37 .
2021-01-08 14:09:06 +00:00
Richard van der Hoff
23a59d24ae
Run the linters on a consistent list of files ( #9038 )
...
We were running some linters on some files and some on others. Extract a common
setting and use it everywhere.
2021-01-08 14:08:44 +00:00
Erik Johnston
00c62b9d07
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-01-08 11:18:20 +00:00
Jason Robinson
85c0999bfb
Add Rooms admin forward extremities DELETE endpoint
...
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2021-01-08 00:12:23 +02:00
Jason Robinson
c91045f56c
Move unknown room ID error into resolve_room_id
...
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2021-01-07 23:03:54 +02:00
Jason Robinson
b849e46139
Add forward extremities endpoint to rooms admin API
...
GET /_synapse/admin/v1/rooms/<identifier>/forward_extremities now gets forward extremities for a room, returning count and the list of extremities.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2021-01-07 23:01:59 +02:00
Erik Johnston
b530eaa262
Allow running sendToDevice on workers ( #9044 )
2021-01-07 20:19:26 +00:00
Erik Johnston
5e99a94502
Support routing edu's to multiple instances ( #9042 )
...
This is in preparation for moving `SendToDeviceServlet` off master
2021-01-07 18:07:28 +00:00
Erik Johnston
e34df813ce
Ensure that remote users' device list resyncing always happens on master ( #9043 )
...
Currently `DeviceMessageHandler` only ever exists on master, but that is about to change.
2021-01-07 18:06:52 +00:00
Erik Johnston
63593134a1
Some cleanups to device inbox store. ( #9041 )
2021-01-07 17:20:44 +00:00
Emelie
9066c2fd7f
Fix typo in docs/systemd-with-workers/README.md ( #9035 )
...
Signed-off-by: Emelie em@nao.sh
2021-01-07 15:31:01 +00:00
Richard van der Hoff
a458e2866e
changelog
2021-01-07 14:56:42 +00:00
Richard van der Hoff
8a910f97a4
Add some tests for the IDP picker flow
2021-01-07 14:56:42 +00:00
Richard van der Hoff
bbd04441ed
Fix type hints in test_login.py
2021-01-07 14:56:42 +00:00
Erik Johnston
82a91208d6
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-01-07 13:04:45 +00:00
Patrick Cloke
23d701864f
Improve the performance of calculating ignored users in large rooms ( #9024 )
...
This allows for efficiently finding which users ignore a particular
user.
Co-authored-by: Erik Johnston <erik@matrix.org >
2021-01-07 13:03:38 +00:00
Richard van der Hoff
3fc2399dbe
black-format tests/rest/client/v1/test_login.py
...
black seems to want to reformat this, despite `black --check` being happy with
it :/
2021-01-07 12:17:37 +00:00
Richard van der Hoff
1d5c021a45
tox: Add a -noextras factor ( #9030 )
...
... for running the tests with no optional deps.
2021-01-07 11:41:54 +00:00
Richard van der Hoff
8d3d264052
Skip unit tests which require optional dependencies ( #9031 )
...
If we are lacking an optional dependency, skip the tests that rely on it.
2021-01-07 11:41:28 +00:00
Erik Johnston
eee3c3c52f
Handle updating schema version without any deltas. ( #9033 )
...
This can happen when using a split out state database and we've upgraded
the schema version without there being any changes in the state schema.
2021-01-07 11:33:36 +00:00
Erik Johnston
91fd180be1
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2021-01-07 10:35:04 +00:00
Patrick Cloke
1b4d5d6acf
Empty iterables should count towards cache usage. ( #9028 )
2021-01-06 12:33:20 -05:00
Patrick Cloke
0312266ee3
Merge tag 'v1.25.0rc1' into develop
...
Synapse 1.25.0rc1 (2021-01-06)
==============================
Removal warning
---------------
The old [Purge Room API](https://github.com/matrix-org/synapse/tree/master/docs/admin_api/purge_room.md )
and [Shutdown Room API](https://github.com/matrix-org/synapse/tree/master/docs/admin_api/shutdown_room.md )
are deprecated and will be removed in a future release. They will be replaced by the
[Delete Room API](https://github.com/matrix-org/synapse/tree/master/docs/admin_api/rooms.md#delete-room-api ).
`POST /_synapse/admin/v1/rooms/<room_id>/delete` replaces `POST /_synapse/admin/v1/purge_room` and
`POST /_synapse/admin/v1/shutdown_room/<room_id>`.
Features
--------
- Add an admin API that lets server admins get power in rooms in which local users have power. ([\#8756](https://github.com/matrix-org/synapse/issues/8756 ))
- Add optional HTTP authentication to replication endpoints. ([\#8853](https://github.com/matrix-org/synapse/issues/8853 ))
- Improve the error messages printed as a result of configuration problems for extension modules. ([\#8874](https://github.com/matrix-org/synapse/issues/8874 ))
- Add the number of local devices to Room Details Admin API. Contributed by @dklimpel. ([\#8886](https://github.com/matrix-org/synapse/issues/8886 ))
- Add `X-Robots-Tag` header to stop web crawlers from indexing media. Contributed by Aaron Raimist. ([\#8887](https://github.com/matrix-org/synapse/issues/8887 ))
- Spam-checkers may now define their methods as `async`. ([\#8890](https://github.com/matrix-org/synapse/issues/8890 ))
- Add support for allowing users to pick their own user ID during a single-sign-on login. ([\#8897](https://github.com/matrix-org/synapse/issues/8897 ), [\#8900](https://github.com/matrix-org/synapse/issues/8900 ), [\#8911](https://github.com/matrix-org/synapse/issues/8911 ), [\#8938](https://github.com/matrix-org/synapse/issues/8938 ), [\#8941](https://github.com/matrix-org/synapse/issues/8941 ), [\#8942](https://github.com/matrix-org/synapse/issues/8942 ), [\#8951](https://github.com/matrix-org/synapse/issues/8951 ))
- Add an `email.invite_client_location` configuration option to send a web client location to the invite endpoint on the identity server which allows customisation of the email template. ([\#8930](https://github.com/matrix-org/synapse/issues/8930 ))
- The search term in the list room and list user Admin APIs is now treated as case-insensitive. ([\#8931](https://github.com/matrix-org/synapse/issues/8931 ))
- Apply an IP range blacklist to push and key revocation requests. ([\#8821](https://github.com/matrix-org/synapse/issues/8821 ), [\#8870](https://github.com/matrix-org/synapse/issues/8870 ), [\#8954](https://github.com/matrix-org/synapse/issues/8954 ))
- Add an option to allow re-use of user-interactive authentication sessions for a period of time. ([\#8970](https://github.com/matrix-org/synapse/issues/8970 ))
- Allow running the redact endpoint on workers. ([\#8994](https://github.com/matrix-org/synapse/issues/8994 ))
Bugfixes
--------
- Fix bug where we might not correctly calculate the current state for rooms with multiple extremities. ([\#8827](https://github.com/matrix-org/synapse/issues/8827 ))
- Fix a long-standing bug in the register admin endpoint (`/_synapse/admin/v1/register`) when the `mac` field was not provided. The endpoint now properly returns a 400 error. Contributed by @edwargix. ([\#8837](https://github.com/matrix-org/synapse/issues/8837 ))
- Fix a long-standing bug on Synapse instances supporting Single-Sign-On, where users would be prompted to enter their password to confirm certain actions, even though they have not set a password. ([\#8858](https://github.com/matrix-org/synapse/issues/8858 ))
- Fix a longstanding bug where a 500 error would be returned if the `Content-Length` header was not provided to the upload media resource. ([\#8862](https://github.com/matrix-org/synapse/issues/8862 ))
- Add additional validation to pusher URLs to be compliant with the specification. ([\#8865](https://github.com/matrix-org/synapse/issues/8865 ))
- Fix the error code that is returned when a user tries to register on a homeserver on which new-user registration has been disabled. ([\#8867](https://github.com/matrix-org/synapse/issues/8867 ))
- Fix a bug where `PUT /_synapse/admin/v2/users/<user_id>` failed to create a new user when `avatar_url` is specified. Bug introduced in Synapse v1.9.0. ([\#8872](https://github.com/matrix-org/synapse/issues/8872 ))
- Fix a 500 error when attempting to preview an empty HTML file. ([\#8883](https://github.com/matrix-org/synapse/issues/8883 ))
- Fix occasional deadlock when handling SIGHUP. ([\#8918](https://github.com/matrix-org/synapse/issues/8918 ))
- Fix login API to not ratelimit application services that have ratelimiting disabled. ([\#8920](https://github.com/matrix-org/synapse/issues/8920 ))
- Fix bug where we ratelimited auto joining of rooms on registration (using `auto_join_rooms` config). ([\#8921](https://github.com/matrix-org/synapse/issues/8921 ))
- Fix a bug where deactivated users appeared in the user directory when their profile information was updated. ([\#8933](https://github.com/matrix-org/synapse/issues/8933 ), [\#8964](https://github.com/matrix-org/synapse/issues/8964 ))
- Fix bug introduced in Synapse v1.24.0 which would cause an exception on startup if both `enabled` and `localdb_enabled` were set to `False` in the `password_config` setting of the configuration file. ([\#8937](https://github.com/matrix-org/synapse/issues/8937 ))
- Fix a bug where 500 errors would be returned if the `m.room_history_visibility` event had invalid content. ([\#8945](https://github.com/matrix-org/synapse/issues/8945 ))
- Fix a bug causing common English words to not be considered for a user directory search. ([\#8959](https://github.com/matrix-org/synapse/issues/8959 ))
- Fix bug where application services couldn't register new ghost users if the server had reached its MAU limit. ([\#8962](https://github.com/matrix-org/synapse/issues/8962 ))
- Fix a long-standing bug where a `m.image` event without a `url` would cause errors on push. ([\#8965](https://github.com/matrix-org/synapse/issues/8965 ))
- Fix a small bug in v2 state resolution algorithm, which could also cause performance issues for rooms with large numbers of power levels. ([\#8971](https://github.com/matrix-org/synapse/issues/8971 ))
- Add validation to the `sendToDevice` API to raise a missing parameters error instead of a 500 error. ([\#8975](https://github.com/matrix-org/synapse/issues/8975 ))
- Add validation of group IDs to raise a 400 error instead of a 500 eror. ([\#8977](https://github.com/matrix-org/synapse/issues/8977 ))
Improved Documentation
----------------------
- Fix the "Event persist rate" section of the included grafana dashboard by adding missing prometheus rules. ([\#8802](https://github.com/matrix-org/synapse/issues/8802 ))
- Combine related media admin API docs. ([\#8839](https://github.com/matrix-org/synapse/issues/8839 ))
- Fix an error in the documentation for the SAML username mapping provider. ([\#8873](https://github.com/matrix-org/synapse/issues/8873 ))
- Clarify comments around template directories in `sample_config.yaml`. ([\#8891](https://github.com/matrix-org/synapse/issues/8891 ))
- Moved instructions for database setup, adjusted heading levels and improved syntax highlighting in [INSTALL.md](../INSTALL.md). Contributed by fossterer. ([\#8987](https://github.com/matrix-org/synapse/issues/8987 ))
- Update the example value of `group_creation_prefix` in the sample configuration. ([\#8992](https://github.com/matrix-org/synapse/issues/8992 ))
- Link the Synapse developer room to the development section in the docs. ([\#9002](https://github.com/matrix-org/synapse/issues/9002 ))
Deprecations and Removals
-------------------------
- Deprecate Shutdown Room and Purge Room Admin APIs. ([\#8829](https://github.com/matrix-org/synapse/issues/8829 ))
Internal Changes
----------------
- Properly store the mapping of external ID to Matrix ID for CAS users. ([\#8856](https://github.com/matrix-org/synapse/issues/8856 ), [\#8958](https://github.com/matrix-org/synapse/issues/8958 ))
- Remove some unnecessary stubbing from unit tests. ([\#8861](https://github.com/matrix-org/synapse/issues/8861 ))
- Remove unused `FakeResponse` class from unit tests. ([\#8864](https://github.com/matrix-org/synapse/issues/8864 ))
- Pass `room_id` to `get_auth_chain_difference`. ([\#8879](https://github.com/matrix-org/synapse/issues/8879 ))
- Add type hints to push module. ([\#8880](https://github.com/matrix-org/synapse/issues/8880 ), [\#8882](https://github.com/matrix-org/synapse/issues/8882 ), [\#8901](https://github.com/matrix-org/synapse/issues/8901 ), [\#8940](https://github.com/matrix-org/synapse/issues/8940 ), [\#8943](https://github.com/matrix-org/synapse/issues/8943 ), [\#9020](https://github.com/matrix-org/synapse/issues/9020 ))
- Simplify logic for handling user-interactive-auth via single-sign-on servers. ([\#8881](https://github.com/matrix-org/synapse/issues/8881 ))
- Skip the SAML tests if the requirements (`pysaml2` and `xmlsec1`) aren't available. ([\#8905](https://github.com/matrix-org/synapse/issues/8905 ))
- Fix multiarch docker image builds. ([\#8906](https://github.com/matrix-org/synapse/issues/8906 ))
- Don't publish `latest` docker image until all archs are built. ([\#8909](https://github.com/matrix-org/synapse/issues/8909 ))
- Various clean-ups to the structured logging and logging context code. ([\#8916](https://github.com/matrix-org/synapse/issues/8916 ), [\#8935](https://github.com/matrix-org/synapse/issues/8935 ))
- Automatically drop stale forward-extremities under some specific conditions. ([\#8929](https://github.com/matrix-org/synapse/issues/8929 ))
- Refactor test utilities for injecting HTTP requests. ([\#8946](https://github.com/matrix-org/synapse/issues/8946 ))
- Add a maximum size of 50 kilobytes to .well-known lookups. ([\#8950](https://github.com/matrix-org/synapse/issues/8950 ))
- Fix bug in `generate_log_config` script which made it write empty files. ([\#8952](https://github.com/matrix-org/synapse/issues/8952 ))
- Clean up tox.ini file; disable coverage checking for non-test runs. ([\#8963](https://github.com/matrix-org/synapse/issues/8963 ))
- Add type hints to the admin and room list handlers. ([\#8973](https://github.com/matrix-org/synapse/issues/8973 ))
- Add type hints to the receipts and user directory handlers. ([\#8976](https://github.com/matrix-org/synapse/issues/8976 ))
- Drop the unused `local_invites` table. ([\#8979](https://github.com/matrix-org/synapse/issues/8979 ))
- Add type hints to the base storage code. ([\#8980](https://github.com/matrix-org/synapse/issues/8980 ))
- Support using PyJWT v2.0.0 in the test suite. ([\#8986](https://github.com/matrix-org/synapse/issues/8986 ))
- Fix `tests.federation.transport.RoomDirectoryFederationTests` and ensure it runs in CI. ([\#8998](https://github.com/matrix-org/synapse/issues/8998 ))
- Add type hints to the crypto module. ([\#8999](https://github.com/matrix-org/synapse/issues/8999 ))
2021-01-06 07:42:38 -05:00
Patrick Cloke
8f08021e86
More updates to changes for consistency.
2021-01-06 07:36:52 -05:00
Patrick Cloke
62b5f13768
A few more tweaks to changes.
2021-01-06 07:34:11 -05:00
Patrick Cloke
0248409bfa
Handle a display name / avatar URL not included in a federation request. ( #9023 )
...
These may be omitted if not set, but Synapse assumed they would
be in the response.
2021-01-06 07:29:03 -05:00
Patrick Cloke
bde6705ad1
Some manual tweaks to the changes file.
2021-01-06 07:20:12 -05:00
Patrick Cloke
2fe0fb21f6
1.25.0rc1
2021-01-06 07:08:13 -05:00
Patrick Cloke
fb4a4f9f15
Merge branch 'release-v1.25.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2021-01-05 12:12:07 -05:00
Patrick Cloke
37eaf9c272
Fix-up assertions about last stream token in push ( #9020 )
...
The last stream token is always known and we do not need to handle none.
2021-01-05 10:53:15 -05:00
Richard van der Hoff
5a4f09228d
Remove cache from room directory query results
...
This reverts a285fe0 . Hopefully the cache is no longer required, thanks to
2021-01-05 13:52:36 +00:00
Eric Eastwood
c027a199f3
Ignore date-rotated logs ( #9018 )
...
Ex.
- homeserver.log.2020-12-29
- homeserver.log.2020-12-31
2021-01-05 13:09:15 +00:00
Patrick Cloke
06fefe0bb1
Add type hints to the logging context code. ( #8939 )
2021-01-05 08:06:55 -05:00
Patrick Cloke
9dde9c9f01
Implement MSC2176: Updated redaction rules ( #8984 )
...
An experimental room version ("org.matrix.msc2176") contains
the new redaction rules for testing.
2021-01-05 07:41:48 -05:00
Richard van der Hoff
97d12dcf56
Merge remote-tracking branch 'origin/release-v1.25.0' into matrix-org-hotfixes
2021-01-05 11:32:29 +00:00
Richard van der Hoff
111b673fc1
Add initial support for a "pick your IdP" page ( #9017 )
...
During login, if there are multiple IdPs enabled, offer the user a choice of
IdPs.
2021-01-05 11:25:28 +00:00
Richard van der Hoff
d2c616a413
Combine the SSO Redirect Servlets ( #9015 )
...
* Implement CasHandler.handle_redirect_request
... to make it match OidcHandler and SamlHandler
* Clean up interface for OidcHandler.handle_redirect_request
Make it accept `client_redirect_url=None`.
* Clean up interface for `SamlHandler.handle_redirect_request`
... bring it into line with CAS and OIDC by making it take a Request parameter,
move the magic for `client_redirect_url` for UIA into the handler, and fix the
return type to be a `str` rather than a `bytes`.
* Define a common protocol for SSO auth provider impls
* Give SsoIdentityProvider an ID and register them
* Combine the SSO Redirect servlets
Now that the SsoHandler knows about the identity providers, we can combine the
various *RedirectServlets into a single implementation which delegates to the
right IdP.
* changelog
2021-01-04 18:13:49 +00:00
Patrick Cloke
31b1905e13
Add type hints to the receipts and user directory handlers. ( #8976 )
2021-01-04 10:05:12 -05:00
Patrick Cloke
1c9a850562
Add type hints to the crypto module. ( #8999 )
2021-01-04 10:04:50 -05:00
Eric Eastwood
a685bbb018
Add link to Synapse dev room to the relevant README section ( #9002 )
2021-01-04 08:59:19 -05:00
Patrick Cloke
0eccf53146
Use the SSO handler helpers for CAS registration/login. ( #8856 )
2021-01-03 16:25:44 +00:00
Andrew Morgan
168ba00d01
Fix RoomDirectoryFederationTests and make them actually run ( #8998 )
...
The `RoomDirectoryFederationTests` tests were not being run unless explicitly called as an `__init__.py` file was not present in `tests/federation/transport/`. Thus the folder was not a python module, and `trial` did not look inside for any test cases to run. This was found while working on #6739 .
This PR adds a `__init__.py` and also fixes the test in a couple ways:
- Switch to subclassing `unittest.FederatingHomeserverTestCase` instead, which sets up federation endpoints for us.
- Supply a `federation_auth_origin` to `make_request` in order to more act like the request is coming from another server, instead of just an unauthenicated client requesting a federation endpoint.
I found that the second point makes no difference to the test passing, but felt like the right thing to do if we're testing over federation.
2020-12-30 19:27:32 +00:00
Patrick Cloke
b7c580e333
Check if group IDs are valid before using them. ( #8977 )
2020-12-30 08:39:59 -05:00
Patrick Cloke
637282bb50
Add additional type hints to the storage module. ( #8980 )
2020-12-30 08:09:53 -05:00
Shashank Sabniveesu
b8591899ab
Doc/move database setup instructions in install md ( #8987 )
2020-12-30 11:33:03 +00:00
Patrick Cloke
9999eb2d02
Add type hints to admin and room list handlers. ( #8973 )
2020-12-29 17:42:10 -05:00
Patrick Cloke
14a7371375
Validate input parameters for the sendToDevice API. ( #8975 )
...
This makes the "messages" key in the content required. This is currently
optional in the spec, but that seems to be an error.
2020-12-29 12:47:45 -05:00
Patrick Cloke
f4f65f4e99
Allow redacting events on workers ( #8994 )
...
Adds the redacts endpoint to workers that have the client listener.
2020-12-29 11:06:10 -05:00
Jerin J Titus
cfcf5541b4
Update the value of group_creation_prefix in sample config. ( #8992 )
...
Removes the trailing slash with causes issues with matrix.to/Element.
2020-12-29 09:30:48 -05:00
Patrick Cloke
68bb26da69
Allow redacting events on workers ( #8994 )
...
Adds the redacts endpoint to workers that have the client listener.
2020-12-29 07:40:12 -05:00
Patrick Cloke
d0c3c24eb2
Drop the unused local_invites table. ( #8979 )
...
This table has been unused since Synapse v1.17.0.
2020-12-29 07:26:29 -05:00
Patrick Cloke
a802606475
Support PyJWT v2.0.0. ( #8986 )
...
Tests were broken due to an API changing. The code used in Synapse
proper should be compatible with both versions already.
2020-12-22 13:00:14 -05:00
Patrick Cloke
4218473f9e
Refactor the CAS handler in prep for using the abstracted SSO code. ( #8958 )
...
This makes the CAS handler look more like the SAML/OIDC handlers:
* Render errors to users instead of throwing JSON errors.
* Internal reorganization.
2020-12-18 13:09:45 -05:00
Patrick Cloke
56e00ca85e
Send the location of the web client to the IS when inviting via 3PIDs. ( #8930 )
...
Adds a new setting `email.invite_client_location` which, if defined, is
passed to the identity server during invites.
2020-12-18 11:01:57 -05:00
Erik Johnston
d781a81e69
Allow server admin to get admin bit in rooms where local user is an admin ( #8756 )
...
This adds an admin API that allows a server admin to get power in a room if a local user has power in a room. Will also invite the user if they're not in the room and its a private room. Can specify another user (rather than the admin user) to be granted power.
Co-authored-by: Matthew Hodgson <matthew@matrix.org >
2020-12-18 15:37:19 +00:00
Erik Johnston
5e7d75daa2
Fix mainline ordering in state res v2 ( #8971 )
...
This had two effects 1) it'd give the wrong answer and b) would iterate
*all* power levels in the auth chain of each event. The latter of which
can be *very* expensive for certain types of IRC bridge rooms that have
large numbers of power level changes.
2020-12-18 15:00:34 +00:00
Richard van der Hoff
28877fade9
Implement a username picker for synapse ( #8942 )
...
The final part (for now) of my work to implement a username picker in synapse itself. The idea is that we allow
`UsernameMappingProvider`s to return `localpart=None`, in which case, rather than redirecting the browser
back to the client, we redirect to a username-picker resource, which allows the user to enter a username.
We *then* complete the SSO flow (including doing the client permission checks).
The static resources for the username picker itself (in
https://github.com/matrix-org/synapse/tree/rav/username_picker/synapse/res/username_picker )
are essentially lifted wholesale from
https://github.com/matrix-org/matrix-synapse-saml-mozilla/tree/master/matrix_synapse_saml_mozilla/res .
As the comment says, we might want to think about making them customisable, but that can be a follow-up.
Fixes #8876 .
2020-12-18 14:19:46 +00:00
Patrick Cloke
5d4c330ed9
Allow re-using a UI auth validation for a period of time ( #8970 )
2020-12-18 07:33:57 -05:00
Patrick Cloke
4136255d3c
Ensure that a URL exists in the content during push. ( #8965 )
...
This fixes an KeyError exception, after this PR the content
is just considered unknown.
2020-12-18 07:26:15 -05:00
Erik Johnston
a7a913918c
Merge remote-tracking branch 'origin/erikj/as_mau_block' into develop
2020-12-18 09:51:56 +00:00
Erik Johnston
70586aa63e
Try and drop stale extremities. ( #8929 )
...
If we see stale extremities while persisting events, and notice that
they don't change the result of state resolution, we drop them.
2020-12-18 09:49:18 +00:00
Richard van der Hoff
f1db20b5a5
Clean up tox.ini ( #8963 )
...
... and disable coverage tracking for mypy and friends.
2020-12-17 22:58:00 +00:00
Erik Johnston
14eab1b4d2
Update tests/test_mau.py
...
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2020-12-17 16:14:13 +00:00
Richard van der Hoff
c9c1c9d82f
Fix UsersListTestCase ( #8964 )
2020-12-17 10:46:40 -05:00
Brendan Abolivier
f2783fc201
Use the simple dictionary in full text search for the user directory ( #8959 )
...
* Use the simple dictionary in fts for the user directory
* Clarify naming
2020-12-17 14:42:30 +01:00
Erik Johnston
4c33796b20
Correctly handle AS registerations and add test
2020-12-17 12:55:21 +00:00
Dirk Klimpel
c07022303e
Fix a bug that deactivated users appear in the directory ( #8933 )
...
Fixes a bug that deactivated users appear in the directory when their profile information was updated.
To change profile information of deactivated users is neccesary for example you will remove displayname or avatar.
But they should not appear in directory. They are deactivated.
Co-authored-by: Erik Johnston <erikj@jki.re >
2020-12-17 12:05:39 +00:00
Erik Johnston
35be260090
Newsfile
2020-12-17 12:05:18 +00:00
Erik Johnston
7932d4e9f7
Don't MAU limit AS ghost users
2020-12-17 12:04:14 +00:00
Dirk Klimpel
06006058d7
Make search statement in List Room and User Admin API case-insensitive ( #8931 )
2020-12-17 10:43:37 +00:00
Patrick Cloke
ff5c4da128
Add a maximum size for well-known lookups. ( #8950 )
2020-12-16 17:25:24 -05:00
Richard van der Hoff
e1b8e37f93
Push login completion down into SsoHandler ( #8941 )
...
This is another part of my work towards fixing #8876 . It moves some of the logic currently in the SAML and OIDC handlers - in particular the call to `AuthHandler.complete_sso_login` down into the `SsoHandler`.
2020-12-16 20:01:53 +00:00
Patrick Cloke
44b7d4c6d6
Fix the sample config location for the ip_range_whitelist setting. ( #8954 )
...
Move it from the federation section to the server section to match
ip_range_blacklist.
2020-12-16 14:40:47 -05:00
Patrick Cloke
bd30cfe86a
Convert internal pusher dicts to attrs classes. ( #8940 )
...
This improves type hinting and should use less memory.
2020-12-16 11:25:30 -05:00
Richard van der Hoff
7a332850e6
Merge pull request #8951 from matrix-org/rav/username_picker_2
...
More preparatory refactoring of the OidcHandler tests
2020-12-16 14:53:26 +00:00
Richard van der Hoff
651e1ae534
Merge pull request #8946 from matrix-org/rav/refactor_send_request
...
Remove `Request` return value from `make_request`
2020-12-16 14:53:01 +00:00
Richard van der Hoff
3ad699cc65
Fix generate_log_config script ( #8952 )
...
It used to write an empty file if you gave it a -o arg.
2020-12-16 14:52:04 +00:00
Patrick Cloke
be2db93b3c
Do not assume that the contents dictionary includes history_visibility. ( #8945 )
2020-12-16 08:46:37 -05:00
Richard van der Hoff
757b5a0bf6
changelog
2020-12-15 23:11:42 +00:00
Richard van der Hoff
8388a7fb3a
Make _make_callback_with_userinfo async
...
... so that we can test its behaviour when it raises.
Also pull it out to the top level so that I can use it from other test classes.
2020-12-15 23:10:59 +00:00
Richard van der Hoff
c1883f042d
Remove spurious mocking of complete_sso_login
...
The tests that need this all do it already.
2020-12-15 23:10:59 +00:00
Richard van der Hoff
2dd2e90e2b
Test get_extra_attributes fallback
...
despite the warnings saying "don't implement get_extra_attributes", we had
implemented it, so the tests weren't doing what we thought they were.
2020-12-15 23:10:59 +00:00
Richard van der Hoff
c9dd47d668
lint
2020-12-15 22:35:50 +00:00
Richard van der Hoff
ed61fe4ada
changelog
2020-12-15 22:35:50 +00:00
Richard van der Hoff
394516ad1b
Remove spurious "SynapseRequest" result from `make_request"
...
This was never used, so let's get rid of it.
2020-12-15 22:35:40 +00:00
Richard van der Hoff
ac2acf1524
Remove redundant reading of SynapseRequest.args
...
this didn't seem to be doing a lot, so remove it.
2020-12-15 22:35:03 +00:00
Richard van der Hoff
5bcf6e8289
Skip redundant check on request.args
2020-12-15 22:35:03 +00:00
Richard van der Hoff
0378581c13
remove 'response' result from _get_shared_rooms
2020-12-15 22:34:20 +00:00
Richard van der Hoff
7eebe4b3fc
Replace request.code with channel.code
...
The two are equivalent, but really we want to check the HTTP result that got
returned to the channel, not the code that the Request object *intended* to
return to the channel.
2020-12-15 22:32:12 +00:00
Richard van der Hoff
01333681bc
Preparatory refactoring of the SamlHandlerTestCase ( #8938 )
...
* move simple_async_mock to test_utils
... so that it can be re-used
* Remove references to `SamlHandler._map_saml_response_to_user` from tests
This method is going away, so we can no longer use it as a test point. Instead,
factor out a higher-level method which takes a SAML object, and verify correct
behaviour by mocking out `AuthHandler.complete_sso_login`.
* changelog
2020-12-15 20:56:10 +00:00
Patrick Cloke
863359a04f
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2020-12-15 11:26:13 -05:00
Patrick Cloke
b3a4b53587
Fix handling of stream tokens for push. ( #8943 )
...
Removes faulty assertions and fixes the logic to ensure the max
stream token is always set.
2020-12-15 10:41:34 -05:00
Patrick Cloke
33a349df91
Merge branch 'develop' into matrix-org-hotfixes
2020-12-15 08:23:14 -05:00
Richard van der Hoff
6d02eb22df
Fix startup failure with localdb_enabled: False ( #8937 )
2020-12-14 20:42:03 +00:00
Patrick Cloke
1619802228
Various clean-ups to the logging context code ( #8935 )
2020-12-14 14:19:47 -05:00
Richard van der Hoff
895e04319b
Preparatory refactoring of the OidcHandlerTestCase ( #8911 )
...
* Remove references to handler._auth_handler
(and replace them with hs.get_auth_handler)
* Factor out a utility function for building Requests
* Remove mocks of `OidcHandler._map_userinfo_to_user`
This method is going away, so mocking it out is no longer a valid approach.
Instead, we mock out lower-level methods (eg _remote_id_from_userinfo), or
simply allow the regular implementation to proceed and update the expectations
accordingly.
* Remove references to `OidcHandler._map_userinfo_to_user` from tests
This method is going away, so we can no longer use it as a test point. Instead
we build mock "callback" requests which we pass into `handle_oidc_callback`,
and verify correct behaviour by mocking out `AuthHandler.complete_sso_login`.
2020-12-14 11:38:50 +00:00
David Teller
f14428b25c
Allow spam-checker modules to be provide async methods. ( #8890 )
...
Spam checker modules can now provide async methods. This is implemented
in a backwards-compatible manner.
2020-12-11 14:05:15 -05:00
Patrick Cloke
5d34f40d49
Add type hints to the push module. ( #8901 )
2020-12-11 11:43:53 -05:00
Erik Johnston
a8eceb01e5
Honour AS ratelimit settings for /login requests ( #8920 )
...
Fixes #8846 .
2020-12-11 16:33:31 +00:00
Patrick Cloke
a41b1dc49f
Merge branch 'release-v1.24.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-12-04 09:03:12 -05:00
Patrick Cloke
16744644f6
Merge branch 'release-v1.24.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-12-02 08:40:21 -05:00
Erik Johnston
dbf46f3891
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2020-11-27 10:25:17 +00:00
Erik Johnston
52984e9e69
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2020-11-13 12:05:55 +00:00
Richard van der Hoff
ce2107eee1
Merge branch 'rav/fix_sighup' into matrix-org-hotfixes
2020-10-31 10:54:23 +00:00
Richard van der Hoff
8373e6254f
Fix SIGHUP handler
...
Fixes:
```
builtins.TypeError: _reload_logging_config() takes 1 positional argument but 2 were given
```
2020-10-31 10:53:12 +00:00
Erik Johnston
1ff3bc332a
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2020-10-30 12:08:09 +00:00
Andrew Morgan
172ddb3b45
Merge branch 'develop' into matrix-org-hotfixes
...
* develop:
Don't unnecessarily start bg process in replication sending loop. (#8670 )
Don't unnecessarily start bg process while handling typing. (#8668 )
2020-10-28 12:14:03 +00:00
Andrew Morgan
d60af9305a
Patch to temporarily drop cross-user m.key_share_requests ( #8675 )
...
Cross-user `m.key_share_requests` are a relatively new `to_device` message that allows user to re-request session keys for a message from another user if they were otherwise unable to retrieve them.
Unfortunately, these have had performance concerns on matrix.org. This is a temporary patch to disable them while we investigate a better solution.
2020-10-28 11:58:47 +00:00
Erik Johnston
bcb6b243e9
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2020-10-27 14:13:14 +00:00
Erik Johnston
32457baa40
Merge branch 'release-v1.22.0' into matrix-org-hotfixes
2020-10-26 15:03:36 +00:00
Erik Johnston
ab4cd7f802
Merge remote-tracking branch 'origin/release-v1.21.3' into matrix-org-hotfixes
2020-10-22 09:57:06 +01:00
Erik Johnston
e9b5e642c3
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-10-16 11:34:53 +01:00
Erik Johnston
9250ee8650
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2020-10-14 13:32:07 +01:00
Richard van der Hoff
bdbe2b12c2
Revert "block membership events from spammy freenode bridge"
...
This reverts commit cd2f831b9d .
2020-10-13 17:10:45 +01:00
Erik Johnston
43bcb1e54e
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2020-10-13 13:29:50 +01:00
Richard van der Hoff
cd2f831b9d
block membership events from spammy freenode bridge
2020-10-12 19:09:30 +01:00
Erik Johnston
4b43332131
Merge remote-tracking branch 'origin/release-v1.21.0' into matrix-org-hotfixes
2020-10-07 17:09:29 +01:00
Richard van der Hoff
77daff166d
Merge remote-tracking branch 'origin/release-v1.21.0' into matrix-org-hotfixes
2020-10-02 12:32:26 +01:00
Richard van der Hoff
5ccc0785c1
Revert "fix remote thumbnails?"
...
This has now been fixed by a different commit (73d93039f ).
This reverts commit b0a463f758 .
2020-10-02 12:30:49 +01:00
Richard van der Hoff
b0a463f758
fix remote thumbnails?
2020-10-01 15:53:18 +01:00
Richard van der Hoff
8a8d01d732
Merge branch 'develop' into matrix-org-hotfixes
2020-10-01 15:07:33 +01:00
Richard van der Hoff
1c22954668
Revert "Temporary fix to ensure kde can contact matrix.org if stuff breaks"
...
This reverts commit d90b0946ed .
We believe this is no longer required.
2020-10-01 12:10:55 +01:00
Richard van der Hoff
e675bbcc49
Remove redundant EventCreationHandler._is_worker_app attribute
...
This was added in 1c347c84bf/#7544 as a temporary optimisation. That was never
merged to develop, since it conflicted with #7492 . The merge cf92310da forgot
to remove it.
2020-10-01 11:51:57 +01:00
Richard van der Hoff
607367aeb1
Fix typo in comment
...
I think this came from a bad merge
2020-10-01 11:43:16 +01:00
Richard van der Hoff
ac6c5f198e
Remove dangling changelog.d files
...
These result from PRs which were cherry-picked from release branches.
2020-10-01 11:31:07 +01:00
Richard van der Hoff
db13a8607e
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2020-10-01 11:22:36 +01:00
Richard van der Hoff
cfb3096e33
Revert federation-transaction-transmission backoff hacks
...
This reverts b852a8247 , 15b2a5081 , 28889d8da .
I don't think these patches are required any more, and if they are, they should
be on mainline, not hidden in our hotfixes branch. Let's try backing them out:
if that turns out to be an error, we can PR them properly.
2020-10-01 11:22:19 +01:00
Erik Johnston
7b6f857aa9
Merge remote-tracking branch 'origin/release-v1.20.0' into matrix-org-hotfixes
2020-09-22 10:11:01 +01:00
Erik Johnston
9eea5c43af
Intelligently select extremities used in backfill. ( #8349 )
...
Instead of just using the most recent extremities let's pick the
ones that will give us results that the pagination request cares about,
i.e. pick extremities only if they have a smaller depth than the
pagination token.
This is useful when we fail to backfill an extremity, as we no longer
get stuck requesting that same extremity repeatedly.
2020-09-18 15:07:36 +01:00
Andrew Morgan
104c490274
Use _check_sigs_and_hash_and_fetch to validate backfill requests ( #8350 )
...
This is a bit of a hack, as `_check_sigs_and_hash_and_fetch` is intended
for attempting to pull an event from the database/(re)pull it from the
server that originally sent the event if checking the signature of the
event fails.
During backfill we *know* that we won't have the event in our database,
however it is still useful to be able to query the original sending
server as the server we're backfilling from may be acting maliciously.
The main benefit and reason for this change however is that
`_check_sigs_and_hash_and_fetch` will drop an event during backfill if
it cannot be successfully validated, whereas the current code will
simply fail the backfill request - resulting in the client's /messages
request silently being dropped.
This is a quick patch to fix backfilling rooms that contain malformed
events. A better implementation in planned in future.
2020-09-18 15:07:33 +01:00
Patrick Cloke
bbb7ca1f15
Merge remote-tracking branch 'origin/release-v1.19.2' into matrix-org-hotfixes
2020-09-16 08:21:05 -04:00
Patrick Cloke
27ef82d972
Merge remote-tracking branch 'origin/release-v1.20.0' into matrix-org-hotfixes
2020-09-11 07:34:53 -04:00
Richard van der Hoff
9df3a8a19f
Merge branch 'release-v1.20.0' into matrix-org-hotfixes
2020-09-09 16:59:10 +01:00
Richard van der Hoff
5c4b13cd8f
Merge remote-tracking branch 'origin/release-v1.20.0' into matrix-org-hotfixes
2020-09-07 17:00:02 +01:00
Richard van der Hoff
d74e8f2875
Merge branch 'release-v1.20.0' into matrix-org-hotfixes
2020-09-07 13:44:54 +01:00
Brendan Abolivier
cc23d81a74
Merge branch 'develop' into matrix-org-hotfixes
2020-09-04 11:02:10 +01:00
Brendan Abolivier
505ea932f5
Merge branch 'develop' into matrix-org-hotfixes
2020-09-03 15:30:00 +01:00
Richard van der Hoff
5f224a4794
Merge branch 'develop' into matrix-org-hotfixes
2020-08-28 15:59:57 +01:00
Patrick Cloke
3f488bfded
Merge branch 'develop' into matrix-org-hotfixes
2020-08-27 10:16:21 -04:00
Richard van der Hoff
b4c1cfacc2
Merge branch 'develop' into matrix-org-hotfixes
2020-08-18 18:20:01 +01:00
Richard van der Hoff
afe4c4e02e
Merge branch 'develop' into matrix-org-hotfixes
2020-08-18 18:13:47 +01:00
Brendan Abolivier
527f73d902
Merge branch 'develop' into matrix-org-hotfixes
2020-08-13 11:45:08 +01:00
Richard van der Hoff
82fec809a5
Merge branch 'develop' into matrix-org-hotfixes
2020-07-31 10:30:05 +01:00
Richard van der Hoff
b2ccc72a00
Merge branch 'release-v1.18.0' into matrix-org-hotfixes
2020-07-28 10:15:22 +01:00
Richard van der Hoff
be777e325d
Merge branch 'develop' into matrix-org-hotfixes
2020-07-24 09:57:49 +01:00
Richard van der Hoff
25880bd441
Merge branch 'develop' into matrix-org-hotfixes
2020-07-09 12:49:39 +01:00
Richard van der Hoff
cc86fbc9ad
Merge branch 'develop' into matrix-org-hotfixes
2020-07-09 11:06:52 +01:00
Patrick Cloke
bd30967bd7
Merge branch 'release-v1.15.2' into matrix-org-hotfixes
2020-07-02 10:08:07 -04:00
Andrew Morgan
8fed03aa3e
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-07-01 11:12:28 +01:00
Andrew Morgan
ba66e3dfef
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-07-01 10:46:06 +01:00
Erik Johnston
199ab854d6
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2020-06-26 11:08:10 +01:00
Erik Johnston
c16bb06d25
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2020-06-25 09:39:01 +01:00
Erik Johnston
d06f4ab693
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-06-17 16:32:39 +01:00
Erik Johnston
8ba1086801
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-06-17 14:38:15 +01:00
Brendan Abolivier
fea4b1d6ad
Merge branch 'release-v1.15.1' into matrix-org-hotfixes
2020-06-16 11:29:33 +01:00
Brendan Abolivier
ae91d50100
Merge branch 'release-v1.15.1' into matrix-org-hotfixes
2020-06-16 10:16:44 +01:00
Brendan Abolivier
0d29112624
Merge branch 'release-v1.15.0' into matrix-org-hotfixes
2020-06-11 13:43:55 +01:00
Brendan Abolivier
d6c7550cf5
Merge tag 'v1.15.0rc1' of github.com:matrix-org/synapse into matrix-org-hotfixes
...
Synapse 1.15.0rc1 (2020-06-09)
==============================
Features
--------
- Advertise support for Client-Server API r0.6.0 and remove related unstable feature flags. ([\#6585](https://github.com/matrix-org/synapse/issues/6585 ))
- Add an option to disable autojoining rooms for guest accounts. ([\#6637](https://github.com/matrix-org/synapse/issues/6637 ))
- For SAML authentication, add the ability to pass email addresses to be added to new users' accounts via SAML attributes. Contributed by Christopher Cooper. ([\#7385](https://github.com/matrix-org/synapse/issues/7385 ))
- Add admin APIs to allow server admins to manage users' devices. Contributed by @dklimpel. ([\#7481](https://github.com/matrix-org/synapse/issues/7481 ))
- Add support for generating thumbnails for WebP images. Previously, users would see an empty box instead of preview image. ([\#7586](https://github.com/matrix-org/synapse/issues/7586 ))
- Support the standardized `m.login.sso` user-interactive authentication flow. ([\#7630](https://github.com/matrix-org/synapse/issues/7630 ))
Bugfixes
--------
- Allow new users to be registered via the admin API even if the monthly active user limit has been reached. Contributed by @dkimpel. ([\#7263](https://github.com/matrix-org/synapse/issues/7263 ))
- Fix email notifications not being enabled for new users when created via the Admin API. ([\#7267](https://github.com/matrix-org/synapse/issues/7267 ))
- Fix str placeholders in an instance of `PrepareDatabaseException`. Introduced in Synapse v1.8.0. ([\#7575](https://github.com/matrix-org/synapse/issues/7575 ))
- Fix a bug in automatic user creation during first time login with `m.login.jwt`. Regression in v1.6.0. Contributed by @olof. ([\#7585](https://github.com/matrix-org/synapse/issues/7585 ))
- Fix a bug causing the cross-signing keys to be ignored when resyncing a device list. ([\#7594](https://github.com/matrix-org/synapse/issues/7594 ))
- Fix metrics failing when there is a large number of active background processes. ([\#7597](https://github.com/matrix-org/synapse/issues/7597 ))
- Fix bug where returning rooms for a group would fail if it included a room that the server was not in. ([\#7599](https://github.com/matrix-org/synapse/issues/7599 ))
- Fix duplicate key violation when persisting read markers. ([\#7607](https://github.com/matrix-org/synapse/issues/7607 ))
- Prevent an entire iteration of the device list resync loop from failing if one server responds with a malformed result. ([\#7609](https://github.com/matrix-org/synapse/issues/7609 ))
- Fix exceptions when fetching events from a remote host fails. ([\#7622](https://github.com/matrix-org/synapse/issues/7622 ))
- Make `synctl restart` start synapse if it wasn't running. ([\#7624](https://github.com/matrix-org/synapse/issues/7624 ))
- Pass device information through to the login endpoint when using the login fallback. ([\#7629](https://github.com/matrix-org/synapse/issues/7629 ))
- Advertise the `m.login.token` login flow when OpenID Connect is enabled. ([\#7631](https://github.com/matrix-org/synapse/issues/7631 ))
- Fix bug in account data replication stream. ([\#7656](https://github.com/matrix-org/synapse/issues/7656 ))
Improved Documentation
----------------------
- Update the OpenBSD installation instructions. ([\#7587](https://github.com/matrix-org/synapse/issues/7587 ))
- Advertise Python 3.8 support in `setup.py`. ([\#7602](https://github.com/matrix-org/synapse/issues/7602 ))
- Add a link to `#synapse:matrix.org` in the troubleshooting section of the README. ([\#7603](https://github.com/matrix-org/synapse/issues/7603 ))
- Clarifications to the admin api documentation. ([\#7647](https://github.com/matrix-org/synapse/issues/7647 ))
Internal Changes
----------------
- Convert the identity handler to async/await. ([\#7561](https://github.com/matrix-org/synapse/issues/7561 ))
- Improve query performance for fetching state from a PostgreSQL database. ([\#7567](https://github.com/matrix-org/synapse/issues/7567 ))
- Speed up processing of federation stream RDATA rows. ([\#7584](https://github.com/matrix-org/synapse/issues/7584 ))
- Add comment to systemd example to show postgresql dependency. ([\#7591](https://github.com/matrix-org/synapse/issues/7591 ))
- Refactor `Ratelimiter` to limit the amount of expensive config value accesses. ([\#7595](https://github.com/matrix-org/synapse/issues/7595 ))
- Convert groups handlers to async/await. ([\#7600](https://github.com/matrix-org/synapse/issues/7600 ))
- Clean up exception handling in `SAML2ResponseResource`. ([\#7614](https://github.com/matrix-org/synapse/issues/7614 ))
- Check that all asynchronous tasks succeed and general cleanup of `MonthlyActiveUsersTestCase` and `TestMauLimit`. ([\#7619](https://github.com/matrix-org/synapse/issues/7619 ))
- Convert `get_user_id_by_threepid` to async/await. ([\#7620](https://github.com/matrix-org/synapse/issues/7620 ))
- Switch to upstream `dh-virtualenv` rather than our fork for Debian package builds. ([\#7621](https://github.com/matrix-org/synapse/issues/7621 ))
- Update CI scripts to check the number in the newsfile fragment. ([\#7623](https://github.com/matrix-org/synapse/issues/7623 ))
- Check if the localpart of a Matrix ID is reserved for guest users earlier in the registration flow, as well as when responding to requests to `/register/available`. ([\#7625](https://github.com/matrix-org/synapse/issues/7625 ))
- Minor cleanups to OpenID Connect integration. ([\#7628](https://github.com/matrix-org/synapse/issues/7628 ))
- Attempt to fix flaky test: `PhoneHomeStatsTestCase.test_performance_100`. ([\#7634](https://github.com/matrix-org/synapse/issues/7634 ))
- Fix typos of `m.olm.curve25519-aes-sha2` and `m.megolm.v1.aes-sha2` in comments, test files. ([\#7637](https://github.com/matrix-org/synapse/issues/7637 ))
- Convert user directory, state deltas, and stats handlers to async/await. ([\#7640](https://github.com/matrix-org/synapse/issues/7640 ))
- Remove some unused constants. ([\#7644](https://github.com/matrix-org/synapse/issues/7644 ))
- Fix type information on `assert_*_is_admin` methods. ([\#7645](https://github.com/matrix-org/synapse/issues/7645 ))
- Convert registration handler to async/await. ([\#7649](https://github.com/matrix-org/synapse/issues/7649 ))
2020-06-10 10:57:26 +01:00
Brendan Abolivier
4cf4c7dc99
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-06-01 12:58:34 +02:00
Erik Johnston
6fdf5ef66b
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-05-29 13:27:12 +01:00
Brendan Abolivier
d4220574a2
Merge branch 'release-v1.14.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-05-28 14:12:46 +02:00
Erik Johnston
1a9c8d5ee9
Merge commit 'ef3934ec8f123f6f553b07471588fbcc7f444cd8' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-05-27 20:06:41 +01:00
Erik Johnston
407dbf8574
Merge branch 'release-v1.14.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-05-27 13:35:15 +01:00
Erik Johnston
8beca8e21f
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-05-26 09:43:21 +01:00
Erik Johnston
cf92310da2
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-05-21 15:19:00 +01:00
Richard van der Hoff
89f795fe8a
Merge branch 'rav/matrix_hacks' into matrix-org-hotfixes
2020-05-20 23:40:22 +01:00
Richard van der Hoff
1c347c84bf
inline some config references
2020-05-20 23:33:13 +01:00
Richard van der Hoff
0d8fb99cdf
Merge branch 'rav/matrix_hacks' into matrix-org-hotfixes
2020-05-20 22:18:21 +01:00
Richard van der Hoff
b3a9ad124c
Fix field name in stubbed out presence servlet
2020-05-20 22:17:59 +01:00
Richard van der Hoff
a902468354
Merge branch 'rav/matrix_hacks' into matrix-org-hotfixes
2020-05-20 22:13:44 +01:00
Richard van der Hoff
84639b32ae
stub out GET presence requests
2020-05-20 22:13:32 +01:00
Patrick Cloke
dac5d5ae42
Merge branch 'release-v1.13.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-05-18 10:27:51 -04:00
Richard van der Hoff
6bd2a39a7d
Merge branch 'release-v1.13.0' into matrix-org-hotfixes
2020-05-14 10:08:45 +01:00
Richard van der Hoff
309e30bae3
Merge remote-tracking branch 'origin/release-v1.13.0' into matrix-org-hotfixes
2020-05-11 13:09:14 +01:00
Richard van der Hoff
7ff7a415d1
Revert emergency registration patches
...
Revert "Merge commit '4d3ebc' into matrix-org-hotfixes"
This reverts commit 617541c4c6 , reversing
changes made to ae4f6140f1 .
2020-05-11 13:08:48 +01:00
Richard van der Hoff
6610343332
Revert emergency registration patches
...
Revert "Merge remote-tracking branch 'origin/clokep/no-validate-ui-auth-sess' into matrix-org-hotfixes"
This reverts commit 5adad58d95 , reversing
changes made to 617541c4c6 .
2020-05-11 13:08:14 +01:00
Richard van der Hoff
5adad58d95
Merge remote-tracking branch 'origin/clokep/no-validate-ui-auth-sess' into matrix-org-hotfixes
2020-05-07 15:19:54 +01:00
Patrick Cloke
d7c7f64f17
Propagate changes to the client dict to the database.
2020-05-07 10:07:09 -04:00
Patrick Cloke
c4c84b67d5
Disable a failing test.
2020-05-07 10:05:00 -04:00
Richard van der Hoff
617541c4c6
Merge commit '4d3ebc' into matrix-org-hotfixes
2020-05-07 14:16:52 +01:00
Patrick Cloke
4d3ebc3620
Disable validation that a UI authentication session has not been modified during a request cycle.
...
Partial backout of 1c1242acba (#7068 )
2020-05-07 08:34:14 -04:00
Richard van der Hoff
ae4f6140f1
Merge branch 'release-v1.13.0' into matrix-org-hotfixes
2020-05-07 10:42:56 +01:00
Richard van der Hoff
323cfe3efb
fix bad merge
2020-05-06 12:14:01 +01:00
Richard van der Hoff
b0d2add89d
Merge branch 'rav/cross_signing_keys_cache' into matrix-org-hotfixes
2020-05-06 11:59:41 +01:00
Richard van der Hoff
ff20747703
Merge branch 'release-v1.13.0' into matrix-org-hotfixes
2020-05-06 11:57:36 +01:00
Richard van der Hoff
9192f1b9dd
Merge rav/upsert_for_device_list into matrix-org-hotfixes
2020-05-06 11:46:19 +01:00
Richard van der Hoff
89d178e8e7
Merge rav/fix_dropped_messages into matrix-org-hotfixes
2020-05-05 22:42:48 +01:00
Richard van der Hoff
1c24e35e85
Merge erikj/faster_device_lists_fetch into matrix-org-hotfixes
2020-05-05 18:36:17 +01:00
Erik Johnston
5debf3071c
Fix redis password support
2020-05-04 16:44:21 +01:00
Richard van der Hoff
e9bd4bb388
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2020-05-01 09:26:57 +01:00
Richard van der Hoff
649e48a799
Merge branch 'develop' into matrix-org-hotfixes
2020-04-24 14:07:47 +01:00
Richard van der Hoff
9b0157686b
Merge branch 'release-v1.12.4' into matrix-org-hotfixes
2020-04-22 13:30:35 +01:00
Richard van der Hoff
8288218b29
Merge remote-tracking branch 'origin/release-v1.12.4' into matrix-org-hotfixes
2020-04-21 11:03:32 +01:00
Richard van der Hoff
da5e6eea45
Revert recent merges of #7289 into matrix-org-hotfixes
...
This was incorrectly merged before it was ready.
This reverts commit aead826d2d , reversing
changes made to 4cd2a4ae3a .
It also reverts commits 9b8212d25 , fb3f1fb5c and 2fdfa96ee .
2020-04-21 11:00:57 +01:00
Andrew Morgan
2fdfa96ee6
lint
2020-04-17 17:38:36 +01:00
Andrew Morgan
fb3f1fb5c0
Fix log lines, return type, tuple handling
2020-04-17 17:36:53 +01:00
Andrew Morgan
9b8212d256
Update changelog
2020-04-17 17:36:24 +01:00
Andrew Morgan
aead826d2d
Merge branch 'release-v1.12.4' of github.com:matrix-org/synapse into matrix-org-hotfixes
...
* 'release-v1.12.4' of github.com:matrix-org/synapse:
Query missing cross-signing keys on local sig upload
2020-04-17 15:49:31 +01:00
Andrew Morgan
4cd2a4ae3a
Merge branch 'release-v1.12.4' into HEAD
...
* release-v1.12.4:
Only register devices edu handler on the master process (#7255 )
tweak changelog
1.12.3
Fix the debian build in a better way. (#7212 )
Fix changelog wording
1.12.2
Pin Pillow>=4.3.0,<7.1.0 to fix dep issue
1.12.1
2020-04-14 13:36:19 +01:00
Andrew Morgan
66cd243e6f
Merge branch 'release-v1.12.1' of github.com:matrix-org/synapse into matrix-org-hotfixes
...
* 'release-v1.12.1' of github.com:matrix-org/synapse:
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.
matrix.org was fine
Update CHANGES.md
changelog typos
1.12.0 changelog
1.12.0
more changelog
changelog fixes
fix typo
1.12.0rc1
update grafana dashboard
2020-03-31 12:06:11 +01:00
Richard van der Hoff
7b66a1f0d9
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2020-03-19 10:29:20 +00:00
Richard van der Hoff
059e91bdce
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2020-03-19 10:03:10 +00:00
Erik Johnston
f86962cb6b
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-03-18 17:17:03 +00:00
Brendan Abolivier
03c694bb08
Fix schema deltas
2020-03-12 16:48:11 +00:00
Brendan Abolivier
08d68c5296
Populate the room version from state events
...
See `rooms_version_column_3.sql.postgres` for details about why we need to do
that.
2020-03-12 15:59:24 +00:00
Brendan Abolivier
568461b5ec
Also don't filter out events sent by ignored users when checking state visibility
2020-03-11 17:04:18 +00:00
Brendan Abolivier
6b73b8b70c
Fix condition
2020-03-11 15:32:07 +00:00
Brendan Abolivier
936686ed2d
Don't filter out events when we're checking the visibility of state
2020-03-11 15:21:25 +00:00
Brendan Abolivier
74050d0c1c
Merge branch 'develop' into matrix-org-hotfixes
2020-03-09 15:06:56 +00:00
Richard van der Hoff
69111a8b2a
Merge branch 'develop' into matrix-org-hotfixes
2020-02-27 10:46:36 +00:00
Richard van der Hoff
d840ee5bde
Revert "skip send without trailing slash"
...
I think this was done back when most synapses would reject the
no-trailing-slash version; it's no longer required, and makes matrix.org spec-incompliant.
This reverts commit fc5be50d56 .
2020-02-27 10:44:55 +00:00
Erik Johnston
e3d811e85d
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-02-19 15:48:33 +00:00
Erik Johnston
578ad9fc48
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-02-19 15:11:20 +00:00
Richard van der Hoff
9dbe34f0d0
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2020-02-19 11:40:25 +00:00
Erik Johnston
93a0751302
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-02-19 10:16:46 +00:00
Erik Johnston
bc936b5657
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-02-18 16:11:26 +00:00
Richard van der Hoff
d6eae548a7
Merge branch 'release-v1.10.0' into matrix-org-hotfixes
2020-02-11 10:43:32 +00:00
Richard van der Hoff
e439438b9b
Merge branch 'release-v1.10.0' into matrix-org-hotfixes
2020-02-10 09:56:51 +00:00
Richard van der Hoff
f8a1e0d1d2
Merge branch 'release-v1.10.0' into matrix-org-hotfixes
2020-02-10 09:54:40 +00:00
Erik Johnston
8a29def84a
Add support for putting fed user query API on workers ( #6873 )
2020-02-07 15:59:05 +00:00
Erik Johnston
77a166577a
Allow moving group read APIs to workers ( #6866 )
2020-02-07 13:57:07 +00:00
Erik Johnston
7d5268d37c
Merge branch 'release-v1.10.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-02-06 10:26:39 +00:00
Erik Johnston
c854d255e5
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-01-31 15:06:16 +00:00
Brendan Abolivier
c660962d4d
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-01-22 13:48:11 +00:00
Richard van der Hoff
767bef0033
Merge branch 'rav/storage_provider_debug' into matrix-org-hotfixes
2020-01-21 23:03:22 +00:00
Richard van der Hoff
4d02bfd6e1
a bit of debugging for media storage providers
2020-01-21 23:02:58 +00:00
Andrew Morgan
a099ab7d38
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-01-14 10:37:32 +00:00
Erik Johnston
ce72a9ccdb
Merge branch 'erikj/media_admin_apis' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-01-08 15:52:58 +00:00
Erik Johnston
bace86ed15
Merge branch 'release-v1.8.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-01-08 15:52:48 +00:00
Erik Johnston
45bf455948
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2020-01-07 14:24:36 +00:00
Richard van der Hoff
859663565c
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2020-01-06 15:43:41 +00:00
Richard van der Hoff
0876a5b641
Merge branch 'release-v1.7.3' into matrix-org-hotfixes
2019-12-31 10:47:29 +00:00
Richard van der Hoff
5b5314ee41
Merge branch 'release-v1.7.2' into matrix-org-hotfixes
2019-12-20 10:48:04 +00:00
Richard van der Hoff
aff9189149
Merge remote-tracking branch 'origin/release-v1.7.1' into matrix-org-hotfixes
2019-12-17 16:00:43 +00:00
Richard van der Hoff
2eda49a8db
Merge remote-tracking branch 'origin/release-v1.7.1' into matrix-org-hotfixes
2019-12-17 10:56:36 +00:00
Richard van der Hoff
96b17d4e4f
Merge remote-tracking branch 'origin/release-v1.7.0' into matrix-org-hotfixes
2019-12-17 10:56:26 +00:00
Erik Johnston
aadc131dc1
Merge branch 'babolivier/pusher-room-store' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-12-10 12:50:04 +00:00
Neil Johnson
0a522121a0
Merge branch 'release-v1.7.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-12-10 11:25:28 +00:00
Andrew Morgan
0b5e2c8093
Merge branch 'release-v1.6.1' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-11-28 11:40:33 +00:00
Erik Johnston
c665d154a2
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-11-26 18:56:54 +00:00
Neil Johnson
31295b5a60
Merge branch 'release-v1.6.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-11-26 13:16:18 +00:00
Erik Johnston
aebe20c452
Fix phone home stats ( #6418 )
...
Fix phone home stats
2019-11-26 13:10:09 +00:00
Andrew Morgan
508e0f9310
1.6.0
2019-11-26 12:15:46 +00:00
Andrew Morgan
e04e7e830e
Merge branch 'release-v1.6.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-11-26 12:06:38 +00:00
Andrew Morgan
5407e69732
Change /push/v1/notify IP to 10.103.0.7
2019-11-26 12:04:19 +00:00
Erik Johnston
2c59eb368c
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-11-20 15:17:10 +00:00
Erik Johnston
6d1a3e2bdd
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-11-19 12:59:39 +00:00
Richard van der Hoff
7fa4586e36
Merge branch 'rav/url_preview_limit_title_2' into matrix-org-hotfixes
2019-11-05 18:18:02 +00:00
Erik Johnston
33b4aa8d99
Merge branch 'release-v1.5.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-10-29 12:18:44 +00:00
Erik Johnston
627cf5def8
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-10-25 11:35:14 +01:00
Erik Johnston
b409d51dee
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-10-25 10:19:09 +01:00
Erik Johnston
4a4e620f30
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-10-11 10:40:15 +01:00
Richard van der Hoff
28889d8da5
fix logging
2019-10-11 09:57:18 +01:00
Richard van der Hoff
15b2a50817
Add some randomness to the high-cpu backoff hack
2019-10-11 09:15:56 +01:00
Richard van der Hoff
b852a8247d
Awful hackery to try to get the fed sender to keep up
...
Basically, if the federation sender starts getting behind, insert some sleeps
into the transaction transmission code to give the fed sender a chance to catch
up.
Might have to experiment a bit with the numbers.
2019-10-10 10:34:08 +01:00
Erik Johnston
7b55cca011
Merge branch 'erikj/cache_memberships' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-10-07 13:15:22 +01:00
Richard van der Hoff
a9577ab1f4
Merge branch 'develop' into matrix-org-hotfixes
2019-10-03 17:52:22 +01:00
Richard van der Hoff
cb217d5d60
Revert "Awful hackery to try to get the fed sender to keep up"
...
This reverts commit 721086a291 .
This didn't help.
2019-10-03 17:05:24 +01:00
Andrew Morgan
f4f5355bcf
Merge branch 'release-v1.4.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-10-03 13:06:32 +01:00
Erik Johnston
23bb2713d2
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-10-02 16:51:08 +01:00
Erik Johnston
b2471e1109
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-10-02 15:39:31 +01:00
Erik Johnston
610219d53d
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-10-02 14:09:29 +01:00
Erik Johnston
b464afe283
Merge branch 'release-v1.4.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-10-02 11:09:05 +01:00
Richard van der Hoff
7657ad3ced
Merge branch 'rav/federation_sender_hackery' into matrix-org-hotfixes
2019-09-27 16:14:52 +01:00
Richard van der Hoff
721086a291
Awful hackery to try to get the fed sender to keep up
...
Basically, if the federation sender starts getting behind, insert some sleeps
into the transaction transmission code to give the fed sender a chance to catch
up.
Might have to experiment a bit with the numbers.
2019-09-27 16:13:51 +01:00
Richard van der Hoff
6e6b53ed3a
Merge branch 'develop' into matrix-org-hotfixes
2019-09-26 15:22:33 +01:00
Richard van der Hoff
601b50672d
Merge branch 'develop' into matrix-org-hotfixes
2019-09-25 12:48:40 +01:00
Richard van der Hoff
a7af389da0
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2019-09-24 17:05:15 +01:00
Neil Johnson
99db0d76fd
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-09-24 14:56:12 +01:00
Richard van der Hoff
561b0f79bc
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2019-09-24 10:11:19 +01:00
Richard van der Hoff
8569f3cdef
Merge branch 'rav/fix_retry_reset' into matrix-org-hotfixes
2019-09-20 12:14:19 +01:00
Richard van der Hoff
7b61e6f5d6
Merge branch 'develop' into matrix-org-hotfixes
2019-09-18 13:55:25 +01:00
Richard van der Hoff
05241b3031
Revert "Fix m.federate bug"
...
This has now been merged into develop (142c9325c ) so we no longer need this
cherry-picked commit.
This reverts commit ee91c69ef7 .
2019-09-18 13:54:57 +01:00
Richard van der Hoff
e01026d84d
Revert "Fix existing v2 identity server calls (MSC2140) ( #6013 )"
...
This has now been merged into develop (3505ffcda ) so we don't need this
cherry-picked commit.
This reverts commit e0eef47315 .
2019-09-18 13:53:37 +01:00
Erik Johnston
ee91c69ef7
Fix m.federate bug
2019-09-13 14:44:48 +01:00
Andrew Morgan
e0eef47315
Fix existing v2 identity server calls (MSC2140) ( #6013 )
...
Two things I missed while implementing [MSC2140](https://github.com/matrix-org/matrix-doc/pull/2140/files#diff-c03a26de5ac40fb532de19cb7fc2aaf7R80 ).
1. Access tokens should be provided to the identity server as `access_token`, not `id_access_token`, even though the homeserver may accept the tokens as `id_access_token`.
2. Access tokens must be sent to the identity server in a query parameter, the JSON body is not allowed.
We now send the access token as part of an `Authorization: ...` header, which fixes both things.
The breaking code was added in https://github.com/matrix-org/synapse/pull/5892
Sytest PR: https://github.com/matrix-org/sytest/pull/697
2019-09-13 14:08:26 +01:00
Erik Johnston
44d2ca2990
Merge branch 'anoa/fix_3pid_validation' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-09-10 18:15:24 +01:00
Erik Johnston
9240622c1a
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-09-06 14:10:53 +01:00
Erik Johnston
0dbba85e95
Merge branch 'anoa/worker_store_reg' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-09-06 13:02:12 +01:00
Andrew Morgan
1ceeccb769
Move get_threepid_validation_session into RegistrationWorkerStore
2019-09-06 13:00:34 +01:00
Erik Johnston
39883e85bd
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-09-06 12:50:28 +01:00
Erik Johnston
68f53b7a0e
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-09-06 09:53:37 +01:00
Erik Johnston
e679b008ff
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-09-05 15:23:40 +01:00
Erik Johnston
e80a5b7492
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-09-04 13:13:30 +01:00
Richard van der Hoff
b272e7345f
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2019-08-30 12:01:24 +01:00
Erik Johnston
a81e0233e9
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-08-29 11:18:57 +01:00
Richard van der Hoff
80898481ab
Merge branch 'release-v1.3.1' into matrix-org-hotfixes
2019-08-17 09:22:30 +01:00
Brendan Abolivier
9d4c716d85
Merge branch 'release-v1.3.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-08-15 11:36:00 +01:00
Brendan Abolivier
d90b0946ed
Temporary fix to ensure kde can contact matrix.org if stuff breaks
2019-08-13 18:05:06 +01:00
Brendan Abolivier
8d5762b0dc
Merge branch 'release-v1.3.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-08-13 17:39:30 +01:00
Brendan Abolivier
a7efbc5416
Merge branch 'release-v1.3.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-08-13 15:54:01 +01:00
Richard van der Hoff
be362cb8f8
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2019-08-13 10:52:19 +01:00
Erik Johnston
873ff9522b
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-08-01 14:46:09 +01:00
Erik Johnston
c1ee2999a0
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-07-31 10:01:56 +01:00
Erik Johnston
9b2b386f76
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-07-30 13:26:19 +01:00
Erik Johnston
65fe31786d
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-07-30 10:12:13 +01:00
Andrew Morgan
70b6d1dfd6
Merge branch 'release-v1.2.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-07-24 13:32:41 +01:00
Erik Johnston
ee62aed72e
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-07-23 10:23:40 +01:00
Erik Johnston
c02f26319d
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-07-23 09:20:26 +01:00
Andrew Morgan
fdd182870c
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-07-22 10:19:16 +01:00
Richard van der Hoff
4102cb220a
Merge branch 'release-v1.2.0' into matrix-org-hotfixes
2019-07-18 15:20:00 +01:00
Erik Johnston
5299707329
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-07-17 10:56:55 +01:00
Richard van der Hoff
43e01be158
Merge remote-tracking branch 'origin/release-v1.1.0' into matrix-org-hotfixes
2019-07-03 09:49:35 +01:00
Richard van der Hoff
589e080c6b
Merge branch 'release-v1.1.0' into matrix-org-hotfixes
2019-07-03 09:47:55 +01:00
Richard van der Hoff
24e48bc9ff
Merge branch 'release-v1.1.0' into matrix-org-hotfixes
2019-07-02 12:05:33 +01:00
Erik Johnston
576b62a6a3
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-06-28 10:04:54 +01:00
Erik Johnston
ad2ba70959
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-06-24 15:31:36 +01:00
Erik Johnston
a330505025
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-06-21 14:36:13 +01:00
Erik Johnston
67b73fd147
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-06-21 13:27:04 +01:00
Erik Johnston
c08e4dbadc
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-06-17 14:10:28 +01:00
Erik Johnston
6dbd498772
Merge branch 'master' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-06-11 17:25:54 +01:00
Erik Johnston
03b09b32d6
Merge branch 'release-v1.0.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-06-11 14:00:50 +01:00
Erik Johnston
8f1711da0e
Merge branch 'release-v1.0.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-06-11 00:23:54 +01:00
Erik Johnston
6fb6c98f71
Merge branch 'release-v1.0.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-06-10 18:34:45 +01:00
Erik Johnston
aad993f24d
Merge branch 'release-v1.0.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-06-10 16:05:10 +01:00
Erik Johnston
544e101c24
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-06-04 16:58:38 +01:00
Richard van der Hoff
8699f380f0
hotfix RetryLimiter
2019-06-04 12:14:41 +01:00
Richard van der Hoff
e91a68ef3a
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2019-06-04 11:59:55 +01:00
Richard van der Hoff
9f5048c198
Merge branch 'rav/limit_displayname_length' into matrix-org-hotfixes
2019-06-01 11:15:43 +01:00
Erik Johnston
b3c40ba58a
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-05-31 10:58:47 +01:00
Erik Johnston
8d69193a42
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-05-30 14:33:44 +01:00
Erik Johnston
bbcd19f2d0
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-05-24 10:53:01 +01:00
Erik Johnston
3cd598135f
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-05-23 15:54:13 +01:00
Richard van der Hoff
1c8f2c34ff
Merge branch 'develop' into matrix-org-hotfixes
2019-05-21 16:29:25 +01:00
Richard van der Hoff
ca03f90ee7
Merge branch 'develop' into matrix-org-hotfixes
2019-05-20 15:55:39 +01:00
Richard van der Hoff
9feee29d76
Merge tag 'v0.99.4rc1' into matrix-org-hotfixes
...
v0.99.4rc1
2019-05-14 11:12:22 +01:00
Richard van der Hoff
e7dcee13da
Merge commit 'a845abbf3' into matrix-org-hotfixes
2019-05-03 17:12:28 +01:00
Richard van der Hoff
7467738834
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2019-05-02 13:37:35 +01:00
Erik Johnston
d75fb8ae22
Merge branch 'erikj/ratelimit_3pid_invite' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-04-26 18:12:33 +01:00
Erik Johnston
ae25a8efef
Merge branch 'erikj/postpath' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-04-17 10:14:57 +01:00
Richard van der Hoff
fc5be50d56
skip send without trailing slash
2019-04-16 15:16:57 +01:00
Erik Johnston
aadba440da
Point pusher to new box
2019-04-15 19:23:21 +01:00
Erik Johnston
ec94d6a590
VersionRestServlet doesn't take a param
2019-04-15 19:21:32 +01:00
Erik Johnston
42ce90c3f7
Merge branch 'erikj/move_endpoints' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-04-15 18:56:46 +01:00
Erik Johnston
8467756dc1
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-04-04 14:43:57 +01:00
Erik Johnston
613b443ff0
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-04-02 18:25:45 +01:00
Richard van der Hoff
233b61ac61
Remove spurious changelog files from hotfixes
...
The relevant patches are now in develop thanks to
https://github.com/matrix-org/synapse/pull/4816 .
2019-04-02 13:51:37 +01:00
Richard van der Hoff
f41c9d37d6
Merge branch 'develop' into matrix-org-hotfixes
2019-04-02 13:47:08 +01:00
Neil Johnson
1048e2ca6a
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-03-27 09:18:35 +00:00
Richard van der Hoff
ce0ce1add3
Merge branch 'develop' into matrix-org-hotfixes
2019-03-25 16:48:56 +00:00
Erik Johnston
b0bf1ea7bd
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-03-21 14:10:31 +00:00
Richard van der Hoff
2561b628af
Merge branch 'develop' into matrix-org-hotfixes
2019-03-19 12:19:20 +00:00
Richard van der Hoff
73c6630718
Revert "Reinstate EDU-batching hacks"
...
This reverts commit ed8ccc3737 .
2019-03-19 12:17:28 +00:00
Erik Johnston
a189bb03ab
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-03-14 14:39:06 +00:00
Erik Johnston
404a2d70be
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-03-14 13:55:29 +00:00
Richard van der Hoff
ed8ccc3737
Reinstate EDU-batching hacks
...
This reverts commit c7285607a3 .
2019-03-13 14:42:11 +00:00
Erik Johnston
18b1a92162
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-03-08 09:56:17 +00:00
Amber Brown
199aa72d35
Merge branch 'develop' of ssh://github.com/matrix-org/synapse into
...
matrix-org-hotfixes
2019-03-07 21:43:10 +11:00
Erik Johnston
8f7dbbc14a
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-03-06 19:30:30 +00:00
Erik Johnston
27dbc9ac42
Reenable presence tests and remove pointless change
2019-03-06 17:12:45 +00:00
Richard van der Hoff
e9aa401994
Remove redundant changes from synapse/replication/tcp/streams.py ( #4813 )
...
This was some hacky code (introduced in c10c71e70d ) to make the presence stream
do nothing on hotfixes. We now ensure that no replication clients subscribe to
the presence stream, so this is redundant.
2019-03-06 13:21:32 +00:00
Richard van der Hoff
9e9572c79e
Run black on synapse/handlers/user_directory.py ( #4812 )
...
This got done on the develop branch in #4635 , but the subsequent merge to
hotfixes (88af0317a ) discarded the changes for some reason.
Fixing this here and now means (a) there are fewer differences between
matrix-org-hotfixes and develop, making future patches easier to merge, and (b)
fixes some pep8 errors on the hotfixes branch which have been annoying me for
some time.
2019-03-06 11:56:03 +00:00
Richard van der Hoff
c7285607a3
Revert EDU-batching hacks from matrix-org-hotfixes
...
Firstly: we want to do this in a better way, which is the intention of
too many RRs, which means we need to make it happen again.
This reverts commits: 8d7c0264b 000d23090 eb0334b07 4d07dc0d1
2019-03-06 11:04:53 +00:00
Erik Johnston
a6e2546980
Fix outbound federation
2019-03-05 14:50:37 +00:00
Erik Johnston
dc510e0e43
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-03-05 14:41:13 +00:00
Richard van der Hoff
ed12338f35
Remove #4733 debug ( #4767 )
...
We don't need any of this stuff now; this brings protocol.py back into line
with develop for the hotfixes branch.
2019-03-04 14:00:03 +00:00
Richard van der Hoff
bf3f8b8855
Add more debug for #4422 ( #4769 )
2019-02-28 17:46:22 +00:00
Richard van der Hoff
67acd1aa1b
Merge branch 'develop' into matrix-org-hotfixes
2019-02-27 10:29:24 +00:00
Erik Johnston
75c924430e
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-02-26 09:36:29 +00:00
Richard van der Hoff
6087c53830
Add more debug for membership syncing issues ( #4719 )
2019-02-25 17:00:18 +00:00
Erik Johnston
b50fe65a22
Add logging when sending error
2019-02-25 15:55:21 +00:00
Erik Johnston
17009e689b
Merge pull request #4734 from matrix-org/rav/repl_debug
...
Add some debug to help with #4733
2019-02-25 15:52:45 +00:00
Richard van der Hoff
5d2f755d3f
Add some debug to help with #4733
2019-02-25 14:37:23 +00:00
Richard van der Hoff
8d7c0264bc
more fix edu batching hackery
2019-02-24 23:27:52 +00:00
Richard van der Hoff
000d230901
fix edu batching hackery
2019-02-24 23:19:37 +00:00
Richard van der Hoff
eb0334b07c
more edu batching hackery
2019-02-24 23:15:09 +00:00
Richard van der Hoff
4d07dc0d18
Add a delay to the federation loop for EDUs
2019-02-24 22:24:36 +00:00
Erik Johnston
0ea52872ab
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-02-22 15:29:41 +00:00
Richard van der Hoff
6868d53fe9
bail out early in on_new_receipts if no pushers
2019-02-21 15:58:15 +00:00
Richard van der Hoff
68af15637b
Merge branch 'develop' into matrix-org-hotfixes
2019-02-20 14:24:17 +00:00
Richard van der Hoff
4da63d9f6f
Merge branch 'develop' into matrix-org-hotfixes
2019-02-20 14:15:56 +00:00
Richard van der Hoff
085d69b0bd
Apply the pusher http hack in the right place ( #4692 )
...
Do it in the constructor, so that it works for badge updates as well as pushes
2019-02-20 11:25:10 +00:00
Erik Johnston
776fe6c184
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-02-20 09:52:24 +00:00
Erik Johnston
0e07d2c7d5
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-02-19 13:24:37 +00:00
Erik Johnston
90ec885805
Revert "Merge pull request #4654 from matrix-org/hawkowl/registration-worker"
...
This reverts commit 5bd2e2c31d , reversing
changes made to d97c3a6ce6 .
2019-02-19 13:23:17 +00:00
Erik Johnston
5a28154c4d
Revert "Merge pull request #4655 from matrix-org/hawkowl/registration-worker"
...
This reverts commit 93555af5c9 , reversing
changes made to 5bd2e2c31d .
2019-02-19 13:23:14 +00:00
Erik Johnston
2fcb51e703
Merge branch 'matthew/well-known-cors' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-02-18 18:38:49 +00:00
Erik Johnston
26f524872f
Revert change that cached connection factory
2019-02-18 18:36:54 +00:00
Erik Johnston
88af0317a2
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-02-15 22:39:13 +00:00
Erik Johnston
c10c71e70d
Emergency changes
2019-02-15 18:15:21 +00:00
Erik Johnston
93555af5c9
Merge pull request #4655 from matrix-org/hawkowl/registration-worker
...
Device replication
2019-02-15 18:12:49 +00:00
Amber Brown
06622e4110
fix
2019-02-16 05:11:09 +11:00
Amber Brown
155efa9e36
fix
2019-02-16 05:10:48 +11:00
Amber Brown
3175edc5d8
maybe
2019-02-16 05:09:08 +11:00
Amber Brown
d95252c01f
use a device replication thingy
2019-02-16 05:08:58 +11:00
Erik Johnston
5bd2e2c31d
Merge pull request #4654 from matrix-org/hawkowl/registration-worker
...
Registration worker
2019-02-15 17:51:34 +00:00
Amber Brown
84528e4fb2
cleanup
2019-02-16 04:49:09 +11:00
Amber Brown
e4381ed514
pep8
2019-02-16 04:42:04 +11:00
Amber Brown
d9235b9e29
fix appservice, add to frontend proxy
2019-02-16 04:39:49 +11:00
Amber Brown
ce5f3b1ba5
add all the files
2019-02-16 04:35:58 +11:00
Amber Brown
7b5c04312e
isort
2019-02-16 04:35:27 +11:00
Amber Brown
f5bafd70f4
add cache remover endpoint and wire it up
2019-02-16 04:34:23 +11:00
Richard van der Hoff
d97c3a6ce6
Merge remote-tracking branch 'origin/release-v0.99.1' into matrix-org-hotfixes
2019-02-13 14:29:05 +00:00
Erik Johnston
341c35614a
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-02-13 10:29:31 +00:00
Richard van der Hoff
fecf28319c
Merge branch 'release-v0.99.0' into matrix-org-hotfixes
2019-02-01 13:29:31 +00:00
Richard van der Hoff
345d8cfb69
Merge branch 'release-v0.99.0' into matrix-org-hotfixes
2019-02-01 13:21:42 +00:00
Richard van der Hoff
b60d005156
Merge branch 'develop' into matrix-org-hotfixes
2019-01-31 18:44:04 +00:00
Richard van der Hoff
6c232a69df
Revert "Break infinite loop on redaction in v3 rooms"
...
We've got a better fix of this now.
This reverts commit decb5698b3 .
2019-01-31 18:43:49 +00:00
Amber Brown
e97c1df30c
remove slow code on userdir ( #4534 )
2019-01-31 13:26:38 +00:00
Richard van der Hoff
decb5698b3
Break infinite loop on redaction in v3 rooms
2019-01-31 00:23:58 +00:00
Erik Johnston
62962e30e4
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-01-30 17:04:08 +00:00
Erik Johnston
05413d4e20
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-01-30 14:27:19 +00:00
Erik Johnston
ca46dcf683
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-01-30 13:11:25 +00:00
Erik Johnston
d351be1567
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-01-30 11:48:29 +00:00
Andrew Morgan
c7f2eaf4f4
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-01-29 10:07:13 +00:00
Andrew Morgan
53d25116df
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-01-25 14:33:14 +00:00
Andrew Morgan
08e25ffa0c
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-01-24 15:51:59 +00:00
Andrew Morgan
1c148e442b
Merge branch 'anoa/room_dir_quick_fix' into matrix-org-hotfixes
2019-01-24 15:37:16 +00:00
Andrew Morgan
acaca1b4e9
Merge branch 'anoa/room_dir_quick_fix' into matrix-org-hotfixes
2019-01-24 14:51:35 +00:00
Andrew Morgan
4777836b83
Fix missing synapse metrics import
2019-01-23 15:26:03 +00:00
Andrew Morgan
7da659dd6d
Use existing stream position counter metric
2019-01-23 15:04:12 +00:00
Andrew Morgan
77dfe51aba
Name metric consistently
2019-01-23 15:04:05 +00:00
Andrew Morgan
ef7865e2f2
Track user_dir current event stream position
2019-01-23 15:03:54 +00:00
Matthew Hodgson
5cb15c0443
warn if we ignore device lists
2019-01-15 22:11:46 +00:00
Matthew Hodgson
b43172ffbc
Merge pull request #4396 from matrix-org/matthew/bodge_device_update_dos
...
limit remote device lists to 10000 entries per user
2019-01-15 21:47:00 +00:00
Matthew Hodgson
b4796d1814
drop the limit to 1K as e2e will be hosed beyond that point anyway
2019-01-15 21:46:29 +00:00
Matthew Hodgson
482d06774a
don't store remote device lists if they have more than 10K devices
2019-01-15 21:38:07 +00:00
Matthew Hodgson
046d731fbd
limit remote device lists to 1000 entries per user
2019-01-15 21:07:12 +00:00
Richard van der Hoff
892f6c98ec
Merge tag 'v0.34.1.1' into matrix-org-hotfixes
...
Synapse 0.34.1.1 (2019-01-11)
=============================
This release fixes CVE-2019-5885 and is recommended for all users of Synapse 0.34.1.
This release is compatible with Python 2.7 and 3.5+. Python 3.7 is fully supported.
Bugfixes
--------
- Fix spontaneous logout on upgrade
([\#4374](https://github.com/matrix-org/synapse/issues/4374 ))
2019-01-11 10:21:18 +00:00
Erik Johnston
7fafa2d954
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2019-01-09 09:13:16 +00:00
Richard van der Hoff
1d63046542
Merge tag 'v0.34.1rc1' into matrix-org-hotfixes
...
Synapse 0.34.1rc1 (2019-01-08)
==============================
Features
--------
- Special-case a support user for use in verifying behaviour of a given server. The support user does not appear in user directory or monthly active user counts. ([\#4141](https://github.com/matrix-org/synapse/issues/4141 ), [\#4344](https://github.com/matrix-org/synapse/issues/4344 ))
- Support for serving .well-known files ([\#4262](https://github.com/matrix-org/synapse/issues/4262 ))
- Rework SAML2 authentication ([\#4265](https://github.com/matrix-org/synapse/issues/4265 ), [\#4267](https://github.com/matrix-org/synapse/issues/4267 ))
- SAML2 authentication: Initialise user display name from SAML2 data ([\#4272](https://github.com/matrix-org/synapse/issues/4272 ))
- Synapse can now have its conditional/extra dependencies installed by pip. This functionality can be used by using `pip install matrix-synapse[feature]`, where feature is a comma separated list with the possible values `email.enable_notifs`, `matrix-synapse-ldap3`, `postgres`, `resources.consent`, `saml2`, `url_preview`, and `test`. If you want to install all optional dependencies, you can use "all" instead. ([\#4298](https://github.com/matrix-org/synapse/issues/4298 ), [\#4325](https://github.com/matrix-org/synapse/issues/4325 ), [\#4327](https://github.com/matrix-org/synapse/issues/4327 ))
- Add routes for reading account data. ([\#4303](https://github.com/matrix-org/synapse/issues/4303 ))
- Add opt-in support for v2 rooms ([\#4307](https://github.com/matrix-org/synapse/issues/4307 ))
- Add a script to generate a clean config file ([\#4315](https://github.com/matrix-org/synapse/issues/4315 ))
- Return server data in /login response ([\#4319](https://github.com/matrix-org/synapse/issues/4319 ))
Bugfixes
--------
- Fix contains_url check to be consistent with other instances in code-base and check that value is an instance of string. ([\#3405](https://github.com/matrix-org/synapse/issues/3405 ))
- Fix CAS login when username is not valid in an MXID ([\#4264](https://github.com/matrix-org/synapse/issues/4264 ))
- Send CORS headers for /media/config ([\#4279](https://github.com/matrix-org/synapse/issues/4279 ))
- Add 'sandbox' to CSP for media reprository ([\#4284](https://github.com/matrix-org/synapse/issues/4284 ))
- Make the new landing page prettier. ([\#4294](https://github.com/matrix-org/synapse/issues/4294 ))
- Fix deleting E2E room keys when using old SQLite versions. ([\#4295](https://github.com/matrix-org/synapse/issues/4295 ))
- The metric synapse_admin_mau:current previously did not update when config.mau_stats_only was set to True ([\#4305](https://github.com/matrix-org/synapse/issues/4305 ))
- Fixed per-room account data filters ([\#4309](https://github.com/matrix-org/synapse/issues/4309 ))
- Fix indentation in default config ([\#4313](https://github.com/matrix-org/synapse/issues/4313 ))
- Fix synapse:latest docker upload ([\#4316](https://github.com/matrix-org/synapse/issues/4316 ))
- Fix test_metric.py compatibility with prometheus_client 0.5. Contributed by Maarten de Vries <maarten@de-vri.es >. ([\#4317](https://github.com/matrix-org/synapse/issues/4317 ))
- Avoid packaging _trial_temp directory in -py3 debian packages ([\#4326](https://github.com/matrix-org/synapse/issues/4326 ))
- Check jinja version for consent resource ([\#4327](https://github.com/matrix-org/synapse/issues/4327 ))
- fix NPE in /messages by checking if all events were filtered out ([\#4330](https://github.com/matrix-org/synapse/issues/4330 ))
- Fix `python -m synapse.config` on Python 3. ([\#4356](https://github.com/matrix-org/synapse/issues/4356 ))
Deprecations and Removals
-------------------------
- Remove the deprecated v1/register API on Python 2. It was never ported to Python 3. ([\#4334](https://github.com/matrix-org/synapse/issues/4334 ))
Internal Changes
----------------
- Getting URL previews of IP addresses no longer fails on Python 3. ([\#4215](https://github.com/matrix-org/synapse/issues/4215 ))
- drop undocumented dependency on dateutil ([\#4266](https://github.com/matrix-org/synapse/issues/4266 ))
- Update the example systemd config to use a virtualenv ([\#4273](https://github.com/matrix-org/synapse/issues/4273 ))
- Update link to kernel DCO guide ([\#4274](https://github.com/matrix-org/synapse/issues/4274 ))
- Make isort tox check print diff when it fails ([\#4283](https://github.com/matrix-org/synapse/issues/4283 ))
- Log room_id in Unknown room errors ([\#4297](https://github.com/matrix-org/synapse/issues/4297 ))
- Documentation improvements for coturn setup. Contributed by Krithin Sitaram. ([\#4333](https://github.com/matrix-org/synapse/issues/4333 ))
- Update pull request template to use absolute links ([\#4341](https://github.com/matrix-org/synapse/issues/4341 ))
- Update README to not lie about required restart when updating TLS certificates ([\#4343](https://github.com/matrix-org/synapse/issues/4343 ))
- Update debian packaging for compatibility with transitional package ([\#4349](https://github.com/matrix-org/synapse/issues/4349 ))
- Fix command hint to generate a config file when trying to start without a config file ([\#4353](https://github.com/matrix-org/synapse/issues/4353 ))
- Add better logging for unexpected errors while sending transactions ([\#4358](https://github.com/matrix-org/synapse/issues/4358 ))
2019-01-08 11:37:25 +00:00
Richard van der Hoff
4c238a9a91
Merge remote-tracking branch 'origin/release-v0.34.0' into matrix-org-hotfixes
2018-12-19 10:24:26 +00:00
Richard van der Hoff
002db39a36
Merge tag 'v0.34.0rc1' into matrix-org-hotfixes
2018-12-04 14:07:28 +00:00
Richard van der Hoff
c4074e4ab6
Revert "Merge branch 'rav/timestamp_patch' into matrix-org-hotfixes"
...
This reverts commit 7960e814e5 , reversing
changes made to 3dd704ee9a .
We no longer need this; please redo it as a proper MSC & synapse PR if you want
to keep it...
2018-12-03 10:15:39 +00:00
Richard van der Hoff
7960e814e5
Merge branch 'rav/timestamp_patch' into matrix-org-hotfixes
2018-11-30 12:10:30 +00:00
Richard van der Hoff
080025e533
Fix buglet and remove thread_id stuff
2018-11-30 12:09:33 +00:00
Richard van der Hoff
9accd63a38
Initial patch from Erik
2018-11-30 12:04:38 +00:00
Richard van der Hoff
3dd704ee9a
Merge branch 'develop' into matrix-org-hotfixes
2018-11-20 11:29:45 +00:00
Richard van der Hoff
28e28a1974
Merge branch 'develop' into matrix-org-hotfixes
2018-11-20 11:03:35 +00:00
Richard van der Hoff
b699178aa1
Merge branch 'develop' into matrix-org-hotfixes
2018-11-14 11:54:29 +00:00
Richard van der Hoff
c08c649fa1
Merge remote-tracking branch 'origin/erikj/fix_device_comparison' into matrix-org-hotfixes
2018-11-08 12:48:19 +00:00
hera
5c0c4b4079
Fix encoding error for consent form on python3
...
The form was rendering this as "b'01234....'".
-- richvdh
2018-11-08 11:03:39 +00:00
Richard van der Hoff
b55cdfaa31
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2018-11-08 10:47:56 +00:00
Richard van der Hoff
34406cf22c
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2018-11-06 10:49:20 +00:00
Amber Brown
f91aefd245
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2018-10-31 04:41:03 +11:00
Erik Johnston
f8281f42c8
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-10-29 18:16:58 +00:00
Amber Brown
7171bdf279
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2018-10-29 23:14:47 +11:00
Erik Johnston
9f2d14ee26
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-10-26 09:52:23 +01:00
Amber Brown
ead471e72d
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2018-10-22 22:18:02 +11:00
Richard van der Hoff
9a4011de46
Merge branch 'develop' into matrix-org-hotfixes
2018-10-18 16:37:01 +01:00
Amber Brown
33551be61b
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2018-10-15 20:15:27 +11:00
Richard van der Hoff
eeb29d99fd
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2018-10-09 09:49:08 +01:00
Richard van der Hoff
1a0c407e6b
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2018-10-09 09:47:37 +01:00
Erik Johnston
c4b37cbf18
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-10-02 16:44:57 +01:00
Erik Johnston
7fa156af80
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-10-02 14:39:30 +01:00
Richard van der Hoff
78825f4f1c
Merge branch 'develop' into matrix-org-hotfixes
2018-09-26 13:27:33 +01:00
Richard van der Hoff
6e15b5debe
Revert "Actuall set cache factors in workers"
...
This reverts commit e21c312e16 .
2018-09-26 13:25:52 +01:00
Matthew Hodgson
2e0d2879d0
Merge branch 'develop' into matrix-org-hotfixes
2018-09-26 11:00:26 +01:00
Michael Kaye
128043072b
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-09-24 11:20:10 +01:00
Erik Johnston
b2fda9d20e
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-09-20 11:00:14 +01:00
Erik Johnston
3c8c5eabc2
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-09-15 11:40:37 +01:00
Erik Johnston
2da2041e2e
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-09-14 19:56:33 +01:00
Erik Johnston
b5eef203f4
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-09-14 18:25:55 +01:00
Erik Johnston
df73da691f
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-09-13 16:15:56 +01:00
Matthew Hodgson
30d054e0bb
Merge branch 'develop' into matrix-org-hotfixes
2018-09-12 17:16:21 +01:00
Erik Johnston
ebb3cc4ab6
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-09-12 11:22:06 +01:00
Erik Johnston
17201abd53
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-09-11 14:17:33 +01:00
Erik Johnston
2f141f4c41
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-08-22 11:47:08 +01:00
Richard van der Hoff
638c0bf49b
Merge branch 'rav/fix_gdpr_consent' into matrix-org-hotfixes
2018-08-21 22:54:35 +01:00
hera
d1065e6f51
Merge tag 'v0.33.3rc2' into matrix-org-hotfixes
...
Bugfixes
--------
- Fix bug in v0.33.3rc1 which caused infinite loops and OOMs
([\#3723](https://github.com/matrix-org/synapse/issues/3723 ))
2018-08-21 19:12:14 +00:00
Erik Johnston
567863127a
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-08-20 13:34:47 +01:00
Erik Johnston
f5abc10724
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-08-20 11:12:18 +01:00
Erik Johnston
bb795b56da
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-08-16 15:51:16 +01:00
Erik Johnston
4dd0604f61
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-08-15 15:37:05 +01:00
Richard van der Hoff
c05d278ba0
Merge branch 'rav/federation_metrics' into matrix-org-hotfixes
2018-08-07 19:11:29 +01:00
Erik Johnston
49a3163958
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-08-06 13:33:54 +01:00
Erik Johnston
1a568041fa
Merge branch 'release-v0.33.1' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-08-02 15:28:32 +01:00
Erik Johnston
c9db8b0c32
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-07-24 17:22:23 +01:00
Erik Johnston
aa1bf10b91
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-07-24 15:49:38 +01:00
Erik Johnston
5222907bea
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-07-23 17:54:41 +01:00
Erik Johnston
e1eb147f2a
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-07-23 16:45:22 +01:00
hera
e43eb47c5f
Fixup limiter
2018-07-23 15:22:47 +00:00
hera
27eb4c45cd
Lower hacky timeout for member limiter
2018-07-23 15:16:36 +00:00
Erik Johnston
b136d7ff8f
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-07-23 16:09:40 +01:00
Richard van der Hoff
9e56e1ab30
Merge branch 'develop' into matrix-org-hotfixes
2018-07-19 16:40:28 +01:00
Erik Johnston
742f757337
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-07-19 10:26:13 +01:00
Richard van der Hoff
2f5dfe299c
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2018-07-17 15:26:47 +01:00
Erik Johnston
e4eec87c6a
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-07-17 11:18:39 +01:00
Erik Johnston
f793ff4571
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-07-17 10:04:33 +01:00
Richard van der Hoff
195aae2f16
Merge branch 'develop' into matrix-org-hotfixes
2018-07-12 12:09:25 +01:00
Erik Johnston
7c79f2cb72
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-07-12 09:59:58 +01:00
Richard van der Hoff
f04e35c170
Merge branch 'develop' into matrix-org-hotfixes
2018-07-10 18:04:03 +01:00
Matthew Hodgson
36bbac05bd
Merge branch 'develop' of git+ssh://github.com/matrix-org/synapse into matrix-org-hotfixes
2018-07-06 19:21:09 +01:00
Erik Johnston
e2a4b7681e
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-07-05 10:29:32 +01:00
Erik Johnston
957944eee4
Merge pull request #3476 from matrix-org/erikj/timeout_memberships
...
Timeout membership requests after 90s
2018-07-03 10:18:39 +01:00
Erik Johnston
bf425e533e
Fix PEP8
2018-07-03 10:11:09 +01:00
Erik Johnston
ca21957b8a
Timeout membership requests after 90s
...
This is a hacky fix to try and stop in flight requests from building up
2018-07-02 13:56:08 +01:00
Erik Johnston
6a95270671
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-06-29 14:10:29 +01:00
hera
82781f5838
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
2018-06-28 21:09:28 +00:00
Matthew Hodgson
aae6d3ff69
Merge remote-tracking branch 'origin/revert-3451-hawkowl/sorteddict-api' into matrix-org-hotfixes
2018-06-26 18:36:29 +01:00
Matthew Hodgson
9175225adf
Merge remote-tracking branch 'origin/hawkowl/sorteddict-api' into matrix-org-hotfixes
2018-06-26 17:52:37 +01:00
David Baker
7a32fa0101
Fix error on deleting users pending deactivation
...
Use simple_delete instead of simple_delete_one as commented
2018-06-26 11:57:44 +01:00
Erik Johnston
d46450195b
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-06-25 20:14:34 +01:00
Erik Johnston
c0128c1021
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-06-25 20:12:13 +01:00
Erik Johnston
3320b7c9a4
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-06-25 15:23:18 +01:00
Erik Johnston
4c22c9b0b6
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
2018-06-25 14:37:13 +01:00
Richard van der Hoff
6d6ea1bb40
Merge branch 'develop' into matrix-org-hotfixes
2018-06-22 16:35:37 +01:00
aphrodite
9e38981ae4
Send HTTP pushes direct to http-priv rather than via clouldflare
...
(This is a heinous hack that ought to be made more generic and pushed back to develop)
2018-06-22 15:58:15 +01:00
hera
463e7c2709
Lower member limiter
2018-06-22 15:58:15 +01:00
Richard van der Hoff
ce9d0b1d0c
Fix earlier logging patch
...
`@cached` doesn't work on decorated functions, because it uses inspection on
the target to calculate the number of arguments.
2018-06-22 15:58:15 +01:00
Richard van der Hoff
80786d5caf
Logging for get_users_in_room
2018-06-22 15:58:15 +01:00
Richard van der Hoff
e18378c3e2
Increase member limiter to 20
...
Let's see if this makes the bridges go faster, or if it kills the synapse
master.
2018-06-22 15:58:15 +01:00
hera
0ca2857baa
increase sync cache to 2 minutes
...
to give synchrotrons being hammered by repeating initial /syncs to get more
chance to actually complete and avoid a DoS
2018-06-22 15:58:15 +01:00
Erik Johnston
e21c312e16
Actuall set cache factors in workers
2018-06-22 15:58:15 +01:00
Richard van der Hoff
1031bd25f8
Avoid doing presence updates on replication reconnect
...
Presence is supposed to be disabled on matrix.org, so we shouldn't send a load
of USER_SYNC commands every time the synchrotron reconnects to the master.
2018-06-22 15:58:15 +01:00
hera
fae708c0e8
Disable auth on room_members for now
...
because the moznet bridge is broken (https://github.com/matrix-org/matrix-appservice-irc/issues/506 )
2018-06-22 15:58:15 +01:00
Erik Johnston
8f8ea91eef
Bump LAST_SEEN_GRANULARITY in client_ips
2018-06-22 15:58:15 +01:00
Erik Johnston
7a1406d144
Prefill client_ip_last_seen in replication
2018-06-22 15:58:15 +01:00
Erik Johnston
6373874833
Move event sending to end in shutdown room admin api
2018-06-22 15:58:15 +01:00
Erik Johnston
a79823e64b
Add dummy presence REST handler to frontend proxy
...
The handler no-ops all requests as presence is disabled.
2018-06-22 15:58:15 +01:00
Erik Johnston
1766a5fdc0
Increase MAX_EVENTS_BEHIND for replication clients
2018-06-22 15:58:14 +01:00
Erik Johnston
e6b1ea3eb2
Disable presence in txn queue
2018-06-22 15:58:14 +01:00
Erik Johnston
e5537cf983
Limit concurrent AS joins
2018-06-22 15:58:14 +01:00
Erik Johnston
43bb12e640
Disable presence
...
This reverts commit 0ebd376a53 and
disables presence a bit more
2018-06-22 15:58:14 +01:00
Erik Johnston
66dcbf47a3
Disable auto search for prefixes in event search
2018-06-22 15:58:14 +01:00
Erik Johnston
a285fe05fd
Add timeout to ResponseCache of /public_rooms
2018-06-22 15:58:14 +01:00