Erik Johnston
fc3d2dc269
Rewrite the KeyRing ( #10035 )
2021-06-02 16:37:59 +01:00
Patrick Cloke
3cf6b34b4e
Do not show invite-only rooms in spaces summary (unless joined/invited). ( #10109 )
2021-06-02 11:31:41 -04:00
Erik Johnston
4deaebfe00
Make /sync do less state res ( #10102 )
2021-06-02 15:48:17 +01:00
Richard van der Hoff
b4b2fd2ece
add a cache to have_seen_event ( #9953 )
...
Empirically, this helped my server considerably when handling gaps in Matrix HQ. The problem was that we would repeatedly call have_seen_events for the same set of (50K or so) auth_events, each of which would take many minutes to complete, even though it's only an index scan.
2021-06-01 12:04:47 +01:00
Brad Murray
10e6d2abce
Fix opentracing inject to use the SpanContext, not the Span ( #10074 )
...
Signed-off-by: Brad Murray brad@beeper.com
2021-06-01 08:40:26 +01:00
Richard van der Hoff
ed53bf314f
Set opentracing priority before setting other tags ( #10092 )
...
... because tags on spans which aren't being sampled get thrown away.
2021-05-28 16:14:08 +01:00
Erik Johnston
3f96dbbda7
Log method and path when dropping request due to size limit ( #10091 )
2021-05-28 15:57:53 +01:00
Eric Eastwood
ac3e02d089
Add parse_strings_from_args
to get prev_events
array ( #10048 )
...
Split out from https://github.com/matrix-org/synapse/pull/9247
Strings:
- `parse_string`
- `parse_string_from_args`
- `parse_strings_from_args`
For comparison with ints:
- `parse_integer`
- `parse_integer_from_args`
Previous discussions:
- https://github.com/matrix-org/synapse/pull/9247#discussion_r573195687
- https://github.com/matrix-org/synapse/pull/9247#discussion_r574214156
- https://github.com/matrix-org/synapse/pull/9247#discussion_r573264791
Signed-off-by: Eric Eastwood <erice@element.io>
2021-05-28 14:19:06 +01:00
Erik Johnston
5eed6348ce
Move some more endpoints off master ( #10084 )
2021-05-27 22:45:43 +01:00
Callum Brown
8fb9af570f
Make reason and score optional for report_event ( #10077 )
...
Implements MSC2414: https://github.com/matrix-org/matrix-doc/pull/2414
See #8551
Signed-off-by: Callum Brown <callum@calcuode.com>
2021-05-27 18:42:23 +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
78b5102ae7
Fix up BatchingQueue
( #10078 )
...
Fixes #10068
2021-05-27 14:32:31 +01: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
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