Travis Ralston
ed12c4ce66
Create 6032.misc
2019-09-12 14:21:22 -06:00
Travis Ralston
ec3b927d28
Update saml.md
2019-09-12 14:19:49 -06:00
Travis Ralston
a633a97c7a
Add developer docs for using SAML without a server
2019-09-12 13:52:10 -06:00
Amber Brown
b617864cd9
Fix for structured logging tests stomping on logs ( #6023 )
2019-09-13 02:29:55 +10:00
Richard van der Hoff
3d882a7ba5
Remove the cap on federation retry interval. ( #6026 )
...
Essentially the intention here is to end up blacklisting servers which never
respond to federation requests.
Fixes https://github.com/matrix-org/synapse/issues/5113 .
2019-09-12 13:00:13 +01:00
Richard van der Hoff
0388beafe4
Fix bug in calculating the federation retry backoff period ( #6025 )
...
This was intended to introduce an element of jitter; instead it gave you a
30/60 chance of resetting to zero.
2019-09-12 12:59:43 +01:00
David Baker
59975f9a63
Merge pull request #6024 from matrix-org/dbkr/fix_sso_fallback_login
...
Fix SSO fallback login
2019-09-12 12:02:14 +01:00
David Baker
6db22e4702
changelog
2019-09-12 11:46:37 +01:00
David Baker
642fad8bd4
Fix SSO fallback login
...
Well, it worked, but forgot to remove the thing saying login was
unavailable.
2019-09-12 11:42:47 +01:00
Sorunome
dd2e5b0038
add report_stats_endpoint config option ( #6012 )
...
This PR adds the optional `report_stats_endpoint` to configure where stats are reported to, if enabled.
2019-09-12 11:24:57 +01:00
Jorik Schellekens
a8251da10f
Blow up config if opentracing is missing ( #5985 )
...
* Blow up config if opentracing is missing
2019-09-12 10:57:37 +01:00
Jason Robinson
f1b40694ea
Merge pull request #6020 from matrix-org/jaywink/allow-support-users-to-register
...
Ensure support users can be registered even if MAU limit is reached
2019-09-12 11:24:33 +03:00
Jason Robinson
6d847d8ce6
Ensure support users can be registered even if MAU limit is reached
...
This allows support users to be created even on MAU limits via
the admin API. Support users are excluded from MAU after creation,
so it makes sense to exclude them in creation - except if the
whole host is in disabled state.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-09-11 20:48:31 +03:00
Andrew Morgan
9fc71dc5ee
Use the v2 Identity Service API for lookups (MSC2134 + MSC2140) ( #5976 )
...
This is a redo of https://github.com/matrix-org/synapse/pull/5897 but with `id_access_token` accepted.
Implements [MSC2134](https://github.com/matrix-org/matrix-doc/pull/2134 ) plus Identity Service v2 authentication ala [MSC2140](https://github.com/matrix-org/matrix-doc/pull/2140 ).
Identity lookup-related functions were also moved from `RoomMemberHandler` to `IdentityHandler`.
2019-09-11 16:02:42 +01:00
Erik Johnston
cbcbfe64a2
Merge pull request #6015 from matrix-org/erikj/ratelimit_admin_redaction
...
Allow use of different ratelimits for admin redactions.
2019-09-11 15:39:38 +01:00
Richard van der Hoff
7902bf1e1d
Clean up some code in the retry logic ( #6017 )
...
* remove some unused code
* make things which were constants into constants for efficiency and clarity
2019-09-11 15:14:56 +01:00
Erik Johnston
66ace43546
Update sample config
2019-09-11 14:50:40 +01:00
Andrew Morgan
9c555f37e3
Add note about extra arg to send_membership_event, remove arg in remote_reject_invite ( #6009 )
...
Some small fixes to `room_member.py` found while doing other PRs.
1. Add requester to the base `_remote_reject_invite` method.
2. `send_membership_event`'s docstring was out of date and took in a `remote_room_hosts` arg that was not used and no calling function provided.
2019-09-11 14:23:24 +01:00
Jorik Schellekens
6604b64fae
Check dependencies on setup in the nicer way. ( #5989 )
2019-09-11 14:00:37 +01:00
Erik Johnston
57dd41a45b
Fix comments
...
Co-Authored-By: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2019-09-11 13:54:50 +01:00
Andrew Morgan
3505ffcda7
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-11 11:59:45 +01:00
Erik Johnston
caa9d6fed7
Add test for admin redaction ratelimiting.
2019-09-11 11:18:04 +01:00
Erik Johnston
c64c3bb4c5
Fix how we check for self redaction
2019-09-11 11:18:04 +01:00
Erik Johnston
8df88b5ff3
Update sample config
2019-09-11 10:58:26 +01:00
Erik Johnston
2434c0084b
Newsfile
2019-09-11 10:48:52 +01:00
Erik Johnston
54ce81c86d
Allow use of different ratelimits for admin redactions.
...
This is useful to allow room admins to quickly deal with a large number
of abusive messages.
2019-09-11 10:46:38 +01:00
Andrew Morgan
cd17a2085e
Remove origin parameter from add_display_name_to_third_party_invite and add params to docstring ( #6010 )
...
Another small fixup noticed during work on a larger PR. The `origin` field of `add_display_name_to_third_party_invite` is not used and likely was just carried over from the `on_PUT` method of `FederationThirdPartyInviteExchangeServlet` which, like all other servlets, provides an `origin` argument.
Since it's not used anywhere in the handler function though, we should remove it from the function arguments.
2019-09-11 10:37:17 +01:00
Erik Johnston
5e9b05d7da
Merge pull request #6011 from matrix-org/anoa/fix_3pid_validation
...
Use account_threepid_delegate for 3pid validation
2019-09-10 18:15:07 +01:00
Andrew Morgan
b5833a2abf
Add changelog
2019-09-10 17:56:10 +01:00
Andrew Morgan
60d3c57bd0
Use account_threepid_delegate for 3pid validation
2019-09-10 17:56:10 +01:00
Jason Robinson
63f9317b8e
Merge pull request #6004 from matrix-org/jaywink/autojoin-create-real-users
...
Only count real users when checking for auto-creation of auto-join room
2019-09-09 17:37:52 +03:00
Erik Johnston
470dc621ae
Merge pull request #5934 from matrix-org/erikj/censor_redactions
...
Censor redactions in DB after a month
2019-09-09 15:29:39 +01:00
Amber Brown
aeb9b2179e
Add a build info metric to Prometheus ( #6005 )
2019-09-10 00:14:58 +10:00
Jason Robinson
aaed6b39e1
Fix code style, again
...
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-09-09 17:10:02 +03:00
Erik Johnston
580f3df9b2
Fix comments
2019-09-09 15:08:24 +01:00
Erik Johnston
ea6956c55c
Merge pull request #6003 from matrix-org/erikj/push_opentracing
...
Add opentracing span for HTTP push
2019-09-09 15:08:06 +01:00
Jason Robinson
e89fea4f04
Simplify count_real_users SQL to only count user_type is null rows
...
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-09-09 16:43:32 +03:00
Jason Robinson
8c03cd0e5f
Simplify is_real_user_txn check to trust user_type is null if real user
...
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-09-09 16:40:40 +03:00
Erik Johnston
8b9ade8c78
Default to censoring redactions after seven days
2019-09-09 13:55:28 +01:00
Erik Johnston
e7184a4370
Use better names in SQL
2019-09-09 13:33:38 +01:00
Erik Johnston
916c697228
Fixup comment
2019-09-09 13:31:00 +01:00
Erik Johnston
fffe17b77d
Don't start looping call unless enabled
2019-09-09 13:24:24 +01:00
Erik Johnston
80e14a8546
Handle setting retention period to 0
2019-09-09 13:23:41 +01:00
Jason Robinson
62fac9d969
Auto-fix a few code style issues
...
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-09-09 14:59:35 +03:00
Jason Robinson
be618e0551
Only count real users when checking for auto-creation of auto-join room
...
Previously if the first registered user was a "support" or "bot" user,
when the first real user registers, the auto-join rooms were not
created.
Fix to exclude non-real (ie users with a special user type) users
when counting how many users there are to determine whether we should
auto-create a room.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-09-09 14:48:08 +03:00
Erik Johnston
a852e93408
Newsfile
2019-09-09 10:24:14 +01:00
Erik Johnston
05bae6b4fc
Add opentracing span for HTTP push
2019-09-09 10:24:14 +01:00
Amber Brown
55d5b3af88
Servers-known-about statistic ( #5981 )
2019-09-07 01:45:51 +10:00
Andrew Morgan
78801e7f9e
Ensure a sid parameter is passed to bind_threepid ( #5995 )
...
`sid` is required to be part of `three_pid_creds`. We were 500'ing if it wasn't provided instead of returning `M_MISSING_PARAM`.
2019-09-06 15:36:50 +01:00
Erik Johnston
a2a695b7ec
Merge pull request #5998 from matrix-org/erikj/fixup_federate_flag
...
Correctly handle non-bool m.federate flag
2019-09-06 15:32:43 +01:00
Erik Johnston
85275c89d7
Newsfile
2019-09-06 14:21:14 +01:00
Erik Johnston
142c9325c2
Correctly handle non-bool m.federate flag
2019-09-06 14:21:06 +01:00
Erik Johnston
30b67e0f63
Merge pull request #5993 from matrix-org/anoa/worker_store_reg
...
Move get_threepid_validation_session and delete_threepid_session into RegistrationWorkerStore
2019-09-06 14:10:02 +01:00
Erik Johnston
5624d0f2ec
Merge pull request #5994 from matrix-org/anoa/html_template_fix
...
Fix destructuring assumption bug with using load_jinja2_templates
2019-09-06 13:54:25 +01:00
Andrew Morgan
cf5a420c8a
Apply suggestions from code review
...
Co-Authored-By: Erik Johnston <erik@matrix.org >
2019-09-06 13:34:42 +01:00
Andrew Morgan
5d833f0923
Add changelog
2019-09-06 13:27:55 +01:00
Andrew Morgan
ca74b140f2
Fix destructuring assumption bug
2019-09-06 13:25:06 +01:00
Andrew Morgan
6ddda8152e
Move delete_threepid_session into RegistrationWorkerStore
2019-09-06 13:23:10 +01:00
Andrew Morgan
5a7e9fdd84
Change changelog
2019-09-06 13:18:03 +01:00
Andrew Morgan
e059c5e648
Move get_threepid_validation_session into RegistrationWorkerStore
2019-09-06 13:10:11 +01:00
Andrew Morgan
1ab1479a92
Add changelog
2019-09-06 13:08:52 +01:00
Erik Johnston
146af7b47f
Merge pull request #5991 from matrix-org/erikj/fix_tracing_funcs
...
Don't assume there is a 'self' arg in @trace decorator
2019-09-06 11:42:45 +01:00
Andrew Morgan
0c0b82b6d1
Allow Synapse to send registration emails + choose Synapse or an external server to handle 3pid validation ( #5987 )
...
This is a combination of a few different PRs, finally all being merged into `develop`:
* #5875
* #5876
* #5868 (This one added the `/versions` flag but the flag itself was actually [backed out](891afb57cb (diff-e591d42d30690ffb79f63bb726200891) ) in #5969 . What's left is just giving /versions access to the config file, which could be useful in the future)
* #5835
* #5969
* #5940
Clients should not actually use the new registration functionality until https://github.com/matrix-org/synapse/pull/5972 is merged.
UPGRADE.rst, changelog entries and config file changes should all be reviewed closely before this PR is merged.
2019-09-06 11:35:28 +01:00
Erik Johnston
e5baf80237
Update changelog
2019-09-06 10:53:05 +01:00
Erik Johnston
4bc6b7130d
Newsfile
2019-09-06 10:13:10 +01:00
Erik Johnston
d8517da85b
Don't assume there is a 'self' arg in @trace decorator
2019-09-06 10:07:12 +01:00
Jorik Schellekens
f7c873a643
Trace how long it takes for the send trasaction to complete, including retrys ( #5986 )
2019-09-05 17:44:55 +01:00
Jorik Schellekens
bc604e7f94
Gracefully handle log context slips and missing opentracing import errors. ( #5988 )
2019-09-05 17:33:29 +01:00
Erik Johnston
591d82f06b
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/censor_redactions
2019-09-05 17:27:46 +01:00
Erik Johnston
ad9b64b496
Fix test
2019-09-05 17:17:47 +01:00
Erik Johnston
3ff0422d2d
Make redaction retention period configurable
2019-09-05 17:16:45 +01:00
Erik Johnston
1a6ae33309
Merge pull request #5984 from matrix-org/joriks/opentracing_link_send_to_edu_contexts
...
Link the send loop with the edus contexts
2019-09-05 15:22:24 +01:00
Jorik Schellekens
ef20aa52eb
use access methods (duh..)
...
Co-Authored-By: Erik Johnston <erik@matrix.org >
2019-09-05 15:07:17 +01:00
Jorik Schellekens
7093790fbc
Bugfix phrasing
...
Co-Authored-By: Erik Johnston <erik@matrix.org >
2019-09-05 15:07:00 +01:00
Jorik Schellekens
5ade977d08
Opentracing context cannot be none
2019-09-05 15:06:13 +01:00
Jorik Schellekens
909827b422
Add opentracing to all client servlets ( #5983 )
2019-09-05 14:46:04 +01:00
Jorik Schellekens
93bc9d73bf
newsfile
2019-09-05 14:45:07 +01:00
Jorik Schellekens
1d65292e94
Link the send loop with the edus contexts
...
The contexts were being filtered too early so the send loop wasn't
being linked to them unless the destination
was whitelisted.
2019-09-05 14:42:37 +01:00
Andrew Morgan
a0d294c306
Switch to using v2 Identity Service APIs other than lookup (MSC 2140) ( #5892 )
2019-09-05 14:31:22 +01:00
Jorik Schellekens
b9cfd3c375
Fix opentracing contexts missing from outbound replication requests ( #5982 )
2019-09-05 14:22:15 +01:00
Andrew Morgan
90d17a3d28
Add POST /_matrix/client/r0/account/3pid/unbind (MSC2140) ( #5980 )
...
Implements `POST /_matrix/client/r0/account/3pid/unbind` from [MSC2140](https://github.com/matrix-org/matrix-doc/blob/dbkr/tos_2/proposals/2140-terms-of-service-2.md#post-_matrixclientr0account3pidunbind ).
2019-09-05 14:00:30 +01:00
Andrew Morgan
b736c6cd3a
Remove bind_email and bind_msisdn ( #5964 )
...
Removes the `bind_email` and `bind_msisdn` parameters from the `/register` C/S API endpoint as per [MSC2140: Terms of Service for ISes and IMs](https://github.com/matrix-org/matrix-doc/pull/2140/files#diff-c03a26de5ac40fb532de19cb7fc2aaf7R107 ).
2019-09-04 18:24:23 +01:00
Andrew Morgan
b09d443632
Cleanup event auth type initialisation ( #5975 )
...
Very small code cleanup.
2019-09-04 16:16:56 +01:00
Erik Johnston
6e834e94fc
Fix and refactor room and user stats ( #5971 )
...
Previously the stats were not being correctly populated.
2019-09-04 13:04:27 +01:00
Andrew Morgan
ea128a3e8e
code cleanups
2019-09-03 21:05:06 +01:00
Travis Ralston
2f416fc997
Ensure the list media admin API is always available ( #5966 )
...
* Ensure the list media admin API is always available
This API is required for some external media repo implementations to operate (mostly for doing quarantine operations on a room).
* changelog
2019-09-03 13:35:20 -06:00
Andrew Morgan
6b6086b8bf
Fix docstring
2019-09-03 20:00:09 +01:00
Andrew Morgan
a98b8583c6
Remove unnecessary variable declaration
2019-09-03 19:58:51 +01:00
Michael Kaye
894c1a5759
Docker packaging should not su-exec or chmod if already running as UID/GID ( #5970 )
...
Adjust su-exec to only be used if needed.
If UID == getuid() and GID == getgid() then we do not need to su-exec, and chmod will not work.
2019-09-03 16:36:01 +01:00
Travis Ralston
0eac7077c9
Ensure an auth instance is available to ListMediaInRoom ( #5967 )
...
* Ensure an auth instance is available to ListMediaInRoom
Fixes https://github.com/matrix-org/synapse/issues/5737
* Changelog
2019-09-03 09:01:30 -06:00
Matthew Hodgson
8401bcd206
fix typo
2019-09-03 12:44:14 +01:00
Andrew Morgan
2a44782666
Remove double return statements ( #5962 )
...
Remove all the "double return" statements which were a result of us removing all the instances of
```
defer.returnValue(...)
return
```
statements when we switched to python3 fully.
2019-09-03 11:42:45 +01:00
Jorik Schellekens
a90d16dabc
Opentrace device lists ( #5853 )
...
Trace device list changes.
2019-09-03 10:21:30 +01:00
Andrew Morgan
36f34e6f3d
Remove unused methods from c/s api v1 in register.py ( #5963 )
...
These methods were part of the v1 C/S API. Remove them as they are no longer used by any code paths.
2019-09-02 18:29:21 +01:00
L0ric0
ce7803b8b0
fix thumbnail storage location ( #5915 )
...
* fix thumbnail storage location
Signed-off-by: Lorenz Steinert <lorenz@steinerts.de >
* Add changelog file.
Signed-off-by: Lorenz Steinert <lorenz@steinerts.de >
* Update Changelog
Signed-off-by: Lorenz Steinert <lorenz@steinerts.de >
2019-09-02 12:18:41 +01:00
Aaron Raimist
cee00a3584
Update INSTALL.md to say that Python 2 is no longer supported ( #5953 )
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-09-02 11:27:39 +01:00
Andrew Morgan
2a012e8a04
Revert "Add m.id_access_token flag ( #5930 )" ( #5945 )
...
This reverts commit 4765f0cfd9 .
2019-08-30 17:13:37 +01:00
Andrew Morgan
4548d1f87e
Remove unnecessary parentheses around return statements ( #5931 )
...
Python will return a tuple whether there are parentheses around the returned values or not.
I'm just sick of my editor complaining about this all over the place :)
2019-08-30 16:28:26 +01:00
Amber Brown
4fca313389
Move buildkite config to the pipelines repo ( #5943 )
2019-08-31 01:01:57 +10:00
Andrew Morgan
4765f0cfd9
Add m.id_access_token flag ( #5930 )
...
Adds a flag to `/versions`' `unstable_features` section indicating that this Synapse understands what an `id_access_token` is, as per https://github.com/matrix-org/synapse/issues/5927#issuecomment-523566043
Fixes #5927
2019-08-30 15:22:51 +01:00
Amber Brown
d19505a8c1
Removed unused jenkins/ folder and script ( #5938 )
2019-08-30 23:13:16 +10:00
Andrew Morgan
3057095a5d
Revert "Use the v2 lookup API for 3PID invites ( #5897 )" ( #5937 )
...
This reverts commit 71fc04069a .
This broke 3PID invites as #5892 was required for it to work correctly.
2019-08-30 12:00:20 +01:00
Erik Johnston
549f974897
Newsfile
2019-08-30 11:29:17 +01:00
Erik Johnston
a4bf72c30c
Censor redactions in DB after a month
2019-08-30 11:29:17 +01:00
Amber Brown
5625abe503
Fix buildkite pipeline plugin matrix-org/annotate using the wrong variable config
2019-08-30 15:06:40 +10:00
Amber Brown
e7011280c7
Fix coverage in sytest and use plugins for buildkite ( #5922 )
2019-08-29 22:19:57 +10:00
Jorik Schellekens
92c1550f4a
Add a link to python's logging config schema ( #5926 )
2019-08-28 19:08:32 +01:00
Will Hunt
c8fa620d7a
Merge pull request #5902 from matrix-org/hs/exempt-support-users-from-consent
...
Exempt support users from consent
2019-08-28 16:31:40 +01:00
Jorik Schellekens
deca277d09
Let synctl use a config directory. ( #5904 )
...
* Let synctl use a config directory.
2019-08-28 15:55:58 +01:00
Will Hunt
5798a134c0
Removing entry for 5903
2019-08-28 14:25:05 +01:00
Andrew Morgan
71fc04069a
Use the v2 lookup API for 3PID invites ( #5897 )
...
Fixes https://github.com/matrix-org/synapse/issues/5861
Adds support for the v2 lookup API as defined in [MSC2134](https://github.com/matrix-org/matrix-doc/pull/2134 ). Currently this is only used for 3PID invites.
Sytest PR: https://github.com/matrix-org/sytest/pull/679
2019-08-28 14:59:26 +02:00
Jorik Schellekens
6d97843793
Config templating ( #5900 )
...
Template config files
* Imagine a system composed entirely of x, y, z etc and the basic operations..
Wait George, why XOR? Why not just neq?
George: Eh, I didn't think of that..
Co-Authored-By: Erik Johnston <erik@matrix.org >
2019-08-28 13:12:22 +01:00
Amber Brown
7dc398586c
Implement a structured logging output system. ( #5680 )
2019-08-28 21:18:53 +10:00
Richard van der Hoff
49ef8ec399
Fix a cache-invalidation bug for worker-based deployments ( #5920 )
...
Some of the caches on worker processes were not being correctly invalidated
when a room's state was changed in a way that did not affect the membership
list of the room.
We need to make sure we send out cache invalidations even when no memberships
are changing.
2019-08-28 10:18:16 +01:00
reivilibre
a3f0635686
Merge pull request #5914 from matrix-org/rei/admin_getadmin
...
Add GET method to admin API /users/@user:dom/admin
2019-08-28 09:44:22 +01:00
Victor Goff
1196ee32b3
Typographical corrections in docker/README ( #5921 )
2019-08-28 09:34:49 +01:00
reivilibre
7ccc251415
Merge pull request #5859 from matrix-org/rei/msc2197
...
MSC2197 Search Filters over Federation
2019-08-28 09:00:21 +01:00
Erik Johnston
dfd10f5133
Merge pull request #5864 from matrix-org/erikj/reliable_lookups
...
Refactor MatrixFederationAgent to retry SRV.
2019-08-27 16:54:06 +01:00
Erik Johnston
91caa5b430
Fix off by one error in SRV result shuffling
2019-08-27 13:56:42 +01:00
Olivier Wilkinson (reivilibre)
1b959b6977
Document GET method for retrieving admin bit of user in admin API
...
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2019-08-27 13:19:19 +01:00
Olivier Wilkinson (reivilibre)
c88a119259
Add GET method to admin API /users/@user:dom/admin
...
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2019-08-27 13:12:27 +01:00
reivilibre
322ccac33f
Allow schema deltas to be engine-specific ( #5911 )
...
* Allow schema deltas to be engine-specific
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
* Newsfile
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
* Code style (Black)
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2019-08-27 11:53:21 +01:00
Richard van der Hoff
ccb15a5bbe
Merge pull request #5906 from matrix-org/neilj/increase_display_name_limit
...
Increase profile display name limit
2019-08-27 11:52:59 +01:00
Erik Johnston
f5b50d0871
Merge pull request #5895 from matrix-org/erikj/notary_key
...
Add config option to sign remote key query responses with a separate key.
2019-08-27 11:51:37 +01:00
Richard van der Hoff
e7577427c9
Update 5909.misc
2019-08-27 11:50:52 +01:00
Richard van der Hoff
7837a5f2ea
Merge pull request #5909 from aaronraimist/public_base_url
...
public_base_url is actually public_baseurl
2019-08-27 11:49:59 +01:00
reivilibre
1a7e6eb633
Add Admin API capability to set adminship of a user ( #5878 )
...
Admin API: Set adminship of a user
2019-08-27 10:14:00 +01:00
Olivier Wilkinson (reivilibre)
d1e0b91083
Code style (Black)
...
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2019-08-27 09:39:11 +01:00
Olivier Wilkinson (reivilibre)
62a1639287
Newsfile
...
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2019-08-27 09:36:12 +01:00
Olivier Wilkinson (reivilibre)
aefa76f5cd
Allow schema deltas to be engine-specific
...
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2019-08-27 09:14:00 +01:00
Aaron Raimist
c25137a99f
Add changelog
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-08-26 21:06:10 -05:00
Aaron Raimist
e8e3e033ee
public_base_url is actually public_baseurl
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-08-26 21:01:56 -05:00
Neil Johnson
27d3fc421a
Increase max display name limit
2019-08-24 22:33:43 +01:00
Erik Johnston
fbb758a7ce
Fixup comments
2019-08-23 15:37:20 +01:00
Erik Johnston
e70f0081da
Fix logcontexts
2019-08-23 15:37:20 +01:00
Erik Johnston
fe0ac98e66
Don't implicitly include server signing key
2019-08-23 15:36:28 +01:00
Erik Johnston
7af5a63063
Fixup review comments
2019-08-23 15:36:28 +01:00
Will Hunt
c998f25006
Apply suggestions from code review
...
Co-Authored-By: Erik Johnston <erik@matrix.org >
2019-08-23 10:28:54 +01:00
Half-Shot
4a2d2c2b6f
Update changelog
2019-08-23 09:57:07 +01:00
Half-Shot
9ba32f6573
Exempt bot users
2019-08-23 09:56:31 +01:00
Half-Shot
ffa5b757c7
Merge branch 'hs/bot-user-type' into hs/exempt-support-users-from-consent
2019-08-23 09:55:57 +01:00
Half-Shot
971c980c6e
Add changelog
2019-08-23 09:53:48 +01:00
Half-Shot
d9b8cf81be
Add bot type
2019-08-23 09:52:09 +01:00
Half-Shot
0fb5189072
Fix registration test
2019-08-23 09:25:35 +01:00
Half-Shot
80793e813c
newsfile 5902
2019-08-23 09:20:31 +01:00
Half-Shot
ae38e0569f
Ignore consent for support users
2019-08-23 09:15:10 +01:00
Half-Shot
886eceba3e
Return user_type in get_user_by_id
2019-08-23 09:14:52 +01:00
Jorik Schellekens
8767b63a82
Propagate opentracing contexts through EDUs ( #5852 )
...
Propagate opentracing contexts through EDUs
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2019-08-22 18:21:10 +01:00
Richard van der Hoff
0b39fa53b6
Merge pull request #5877 from Awesome-Technologies/remove_shared_secret_registration
...
Remove shared secret registration
2019-08-22 18:12:25 +01:00
Jorik Schellekens
812ed6b0d5
Opentracing across workers ( #5771 )
...
Propagate opentracing contexts across workers
Also includes some Convenience modifications to opentracing for servlets, notably:
- Add boolean to skip the whitelisting check on inject
extract methods. - useful when injecting into carriers
locally. Otherwise we'd always have to include our
own servername and whitelist our servername
- start_active_span_from_request instead of header
- Add boolean to decide whether to extract context
from a request to a servlet
2019-08-22 18:08:07 +01:00
Manuel Stahl
0bab582fd6
Remove shared secret registration from client/r0/register endpoint
...
This type of registration was probably never used. It only includes the
user name in the HMAC but not the password.
Shared secret registration is still available via
client/r0/admin/register.
Signed-off-by: Manuel Stahl <manuel.stahl@awesome-technologies.de >
2019-08-22 18:04:08 +02:00
Brendan Abolivier
dbd46decad
Revert "Do not send consent notices if "no-consent-required" is set"
...
This reverts commit 27a686e53b .
2019-08-22 14:47:43 +01:00
Brendan Abolivier
1c5b8c6222
Revert "Add "require_consent" parameter for registration"
...
This reverts commit 3320aaab3a .
2019-08-22 14:47:34 +01:00
Half-Shot
27a686e53b
Do not send consent notices if "no-consent-required" is set
2019-08-22 14:22:04 +01:00
Half-Shot
3320aaab3a
Add "require_consent" parameter for registration
2019-08-22 14:21:54 +01:00
Erik Johnston
1e4b4d85e7
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/reliable_lookups
2019-08-22 13:41:57 +01:00
Erik Johnston
1b09cf8658
Merge pull request #5850 from matrix-org/erikj/retry_well_known_on_fail
...
Retry well known on fail
2019-08-22 13:17:05 +01:00
Jorik Schellekens
9a6f2be572
Opentrace e2e keys ( #5855 )
...
Add opentracing tags and logs for e2e keys
2019-08-22 11:28:12 +01:00
Richard van der Hoff
c9f11d09fc
Add missing index on users_in_public_rooms. ( #5894 )
2019-08-22 10:43:13 +01:00
Richard van der Hoff
119aa31b10
Servlet to purge old rooms ( #5845 )
2019-08-22 10:42:59 +01:00
Richard van der Hoff
ef1c524bb3
Improve error msg when key-fetch fails ( #5896 )
...
There's no point doing a raise_from here, because the exception is always
logged at warn with no stacktrace in the caller. Instead, let's try to give
better messages to reduce confusion.
In particular, this means that we won't log 'Failed to connect to remote
server' when we don't even attempt to connect to the remote server due to
blacklisting.
2019-08-22 10:42:06 +01:00
Richard van der Hoff
4dab867288
Drop some unused tables. ( #5893 )
...
These tables are never used, so we may as well drop them.
2019-08-21 13:16:28 +01:00
Erik Johnston
62fb643cdc
Newsfile
2019-08-21 11:21:58 +01:00
Erik Johnston
97cbc96093
Only sign when we respond to remote key requests
2019-08-21 11:21:58 +01:00
Erik Johnston
5906be8589
Add config option for keys to use to sign keys
...
This allows servers to separate keys that are used to sign remote keys
when acting as a notary server.
2019-08-21 10:44:58 +01:00
Richard van der Hoff
72bc285669
Refactor the Appservice scheduler code ( #5886 )
...
Get rid of the labyrinthine `recoverer_fn` code, and clean up the startup code
(it seemed to be previously inexplicably split between
`ApplicationServiceScheduler.start` and `_Recoverer.start`).
Add some docstrings too.
2019-08-20 17:42:45 +01:00
Richard van der Hoff
baa3f4a80d
Avoid deep recursion in appservice recovery ( #5885 )
...
Hopefully, this will fix a stack overflow when recovering an appservice.
The recursion here leads to a huge chain of deferred callbacks, which then
overflows the stack when the chain completes. `inlineCallbacks` makes a better
job of this if we use iteration instead.
Clean up the code a bit too, while we're there.
2019-08-20 17:39:38 +01:00
Jorik Schellekens
c886f976e0
Opentracing doc update ( #5776 )
...
Update opentracing docs to use the unified 'trace' method
2019-08-20 13:56:03 +01:00
Erik Johnston
29763f01c6
Make changelog entry be a feature
2019-08-20 12:38:06 +01:00
Erik Johnston
74f016d343
Remove now unused pick_server_from_list
2019-08-20 12:37:08 +01:00
Erik Johnston
1f9df1cc7b
Fixup _sort_server_list to be slightly more efficient
...
Also document that we are using the algorithm described in RFC2782 and
ensure we handle zero weight correctly.
2019-08-20 12:36:11 +01:00
Richard van der Hoff
5019945828
Refactor the Appservice scheduler code
...
Get rid of the labyrinthine `recoverer_fn` code, and clean up the startup code
(it seemed to be previously inexplicably split between
`ApplicationServiceScheduler.start` and `_Recoverer.start`).
Add some docstrings too.
2019-08-20 11:50:23 +01:00
Erik Johnston
7777d353bf
Remove test debugs
2019-08-20 11:46:59 +01:00
Erik Johnston
1dec31560e
Change jitter to be a factor rather than absolute value
2019-08-20 11:46:00 +01:00
Olivier Wilkinson (reivilibre)
502728777c
Newsfile on one line
...
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2019-08-20 08:49:53 +01:00
Olivier Wilkinson (reivilibre)
bb29bc2937
Use MSC2197 on stable prefix as it has almost finished FCP
...
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2019-08-20 08:49:31 +01:00
Erik Johnston
d514dac0b2
Merge pull request #5860 from matrix-org/erikj/update_5704_comments
...
Remove logging for #5407 and update comments
2019-08-19 10:20:59 +01:00
Brendan Abolivier
bdd201ea7f
Merge branch 'master' into develop
2019-08-17 10:50:42 +01:00
Richard van der Hoff
74fb729213
1.3.1
2019-08-17 09:16:17 +01:00
Richard van der Hoff
412c6e21a8
Drop dependency on sdnotify ( #5871 )
...
... to save OSes which don't use it from having to maintain a port.
Fixes #5865 .
2019-08-17 09:09:52 +01:00
Hubert Chathi
8a5f6ed130
Merge pull request #5857 from matrix-org/uhoreg/fix_e2e_room_keys_index
...
add the version field to the index for e2e_room_keys
2019-08-16 17:45:50 -07:00
Richard van der Hoff
c188bd2c12
add attribution
2019-08-16 23:19:23 +01:00
Chris Moos
20402aa128
Add changelog entry.
2019-08-16 22:16:21 +01:00
Chris Moos
6d86df73f1
Fix issue with Synapse not starting up. Fixes #5866 .
...
Signed-off-by: Chris Moos <chris@chrismoos.com >
2019-08-16 22:16:13 +01:00
Jorik Schellekens
87fa26006b
Opentracing misc ( #5856 )
...
Add authenticated_entity and servlet_names tags.
Functionally:
- Add a tag for authenticated_entity
- Add a tag for servlet_names
Stylistically:
Moved to importing methods directly from opentracing.
2019-08-16 16:13:25 +01:00
Erik Johnston
ebba15ee7f
Newsfile
2019-08-16 13:29:41 +01:00
Erik Johnston
861d663c15
Fixup changelog and remove debug logging
2019-08-16 13:15:26 +01:00
Hubert Chathi
e132ba79ae
fix changelog
2019-08-15 21:02:40 -07:00
Andrew Morgan
b13cac896d
Fix up password reset template config names ( #5863 )
...
Fixes #5833
The emailconfig code was attempting to pull incorrect config file names. This corrects that, while also marking a difference between a config file variable that's a filepath versus a str containing HTML.
2019-08-15 16:27:11 +01:00
Erik Johnston
c03e3e8301
Newsfile
2019-08-15 15:43:22 +01:00
Erik Johnston
f299c5414c
Refactor MatrixFederationAgent to retry SRV.
...
This refactors MatrixFederationAgent to move the SRV lookup into the
endpoint code, this has two benefits:
1. Its easier to retry different host/ports in the same way as
HostnameEndpoint.
2. We avoid SRV lookups if we have a free connection in the pool
2019-08-15 15:43:22 +01:00
Brendan Abolivier
ce5f1cb98c
Merge branch 'master' into develop
2019-08-15 12:38:21 +01:00
Brendan Abolivier
6382914587
Merge tag 'v1.3.0'
...
Synapse 1.3.0 (2019-08-15)
==========================
Bugfixes
--------
- Fix 500 Internal Server Error on `publicRooms` when the public room list was
cached. ([\#5851](https://github.com/matrix-org/synapse/issues/5851 ))
Synapse 1.3.0rc1 (2019-08-13)
==========================
Features
--------
- Use `M_USER_DEACTIVATED` instead of `M_UNKNOWN` for errcode when a deactivated user attempts to login. ([\#5686](https://github.com/matrix-org/synapse/issues/5686 ))
- Add sd_notify hooks to ease systemd integration and allows usage of Type=Notify. ([\#5732](https://github.com/matrix-org/synapse/issues/5732 ))
- Synapse will no longer serve any media repo admin endpoints when `enable_media_repo` is set to False in the configuration. If a media repo worker is used, the admin APIs relating to the media repo will be served from it instead. ([\#5754](https://github.com/matrix-org/synapse/issues/5754 ), [\#5848](https://github.com/matrix-org/synapse/issues/5848 ))
- Synapse can now be configured to not join remote rooms of a given "complexity" (currently, state events) over federation. This option can be used to prevent adverse performance on resource-constrained homeservers. ([\#5783](https://github.com/matrix-org/synapse/issues/5783 ))
- Allow defining HTML templates to serve the user on account renewal attempt when using the account validity feature. ([\#5807](https://github.com/matrix-org/synapse/issues/5807 ))
Bugfixes
--------
- Fix UISIs during homeserver outage. ([\#5693](https://github.com/matrix-org/synapse/issues/5693 ), [\#5789](https://github.com/matrix-org/synapse/issues/5789 ))
- Fix stack overflow in server key lookup code. ([\#5724](https://github.com/matrix-org/synapse/issues/5724 ))
- start.sh no longer uses deprecated cli option. ([\#5725](https://github.com/matrix-org/synapse/issues/5725 ))
- Log when we receive an event receipt from an unexpected origin. ([\#5743](https://github.com/matrix-org/synapse/issues/5743 ))
- Fix debian packaging scripts to correctly build sid packages. ([\#5775](https://github.com/matrix-org/synapse/issues/5775 ))
- Correctly handle redactions of redactions. ([\#5788](https://github.com/matrix-org/synapse/issues/5788 ))
- Return 404 instead of 403 when accessing /rooms/{roomId}/event/{eventId} for an event without the appropriate permissions. ([\#5798](https://github.com/matrix-org/synapse/issues/5798 ))
- Fix check that tombstone is a state event in push rules. ([\#5804](https://github.com/matrix-org/synapse/issues/5804 ))
- Fix error when trying to login as a deactivated user when using a worker to handle login. ([\#5806](https://github.com/matrix-org/synapse/issues/5806 ))
- Fix bug where user `/sync` stream could get wedged in rare circumstances. ([\#5825](https://github.com/matrix-org/synapse/issues/5825 ))
- The purge_remote_media.sh script was fixed. ([\#5839](https://github.com/matrix-org/synapse/issues/5839 ))
Deprecations and Removals
-------------------------
- Synapse now no longer accepts the `-v`/`--verbose`, `-f`/`--log-file`, or `--log-config` command line flags, and removes the deprecated `verbose` and `log_file` configuration file options. Users of these options should migrate their options into the dedicated log configuration. ([\#5678](https://github.com/matrix-org/synapse/issues/5678 ), [\#5729](https://github.com/matrix-org/synapse/issues/5729 ))
- Remove non-functional 'expire_access_token' setting. ([\#5782](https://github.com/matrix-org/synapse/issues/5782 ))
Internal Changes
----------------
- Make Jaeger fully configurable. ([\#5694](https://github.com/matrix-org/synapse/issues/5694 ))
- Add precautionary measures to prevent future abuse of `window.opener` in default welcome page. ([\#5695](https://github.com/matrix-org/synapse/issues/5695 ))
- Reduce database IO usage by optimising queries for current membership. ([\#5706](https://github.com/matrix-org/synapse/issues/5706 ), [\#5738](https://github.com/matrix-org/synapse/issues/5738 ), [\#5746](https://github.com/matrix-org/synapse/issues/5746 ), [\#5752](https://github.com/matrix-org/synapse/issues/5752 ), [\#5770](https://github.com/matrix-org/synapse/issues/5770 ), [\#5774](https://github.com/matrix-org/synapse/issues/5774 ), [\#5792](https://github.com/matrix-org/synapse/issues/5792 ), [\#5793](https://github.com/matrix-org/synapse/issues/5793 ))
- Improve caching when fetching `get_filtered_current_state_ids`. ([\#5713](https://github.com/matrix-org/synapse/issues/5713 ))
- Don't accept opentracing data from clients. ([\#5715](https://github.com/matrix-org/synapse/issues/5715 ))
- Speed up PostgreSQL unit tests in CI. ([\#5717](https://github.com/matrix-org/synapse/issues/5717 ))
- Update the coding style document. ([\#5719](https://github.com/matrix-org/synapse/issues/5719 ))
- Improve database query performance when recording retry intervals for remote hosts. ([\#5720](https://github.com/matrix-org/synapse/issues/5720 ))
- Add a set of opentracing utils. ([\#5722](https://github.com/matrix-org/synapse/issues/5722 ))
- Cache result of get_version_string to reduce overhead of `/version` federation requests. ([\#5730](https://github.com/matrix-org/synapse/issues/5730 ))
- Return 'user_type' in admin API user endpoints results. ([\#5731](https://github.com/matrix-org/synapse/issues/5731 ))
- Don't package the sytest test blacklist file. ([\#5733](https://github.com/matrix-org/synapse/issues/5733 ))
- Replace uses of returnValue with plain return, as returnValue is not needed on Python 3. ([\#5736](https://github.com/matrix-org/synapse/issues/5736 ))
- Blacklist some flakey tests in worker mode. ([\#5740](https://github.com/matrix-org/synapse/issues/5740 ))
- Fix some error cases in the caching layer. ([\#5749](https://github.com/matrix-org/synapse/issues/5749 ))
- Add a prometheus metric for pending cache lookups. ([\#5750](https://github.com/matrix-org/synapse/issues/5750 ))
- Stop trying to fetch events with event_id=None. ([\#5753](https://github.com/matrix-org/synapse/issues/5753 ))
- Convert RedactionTestCase to modern test style. ([\#5768](https://github.com/matrix-org/synapse/issues/5768 ))
- Allow looping calls to be given arguments. ([\#5780](https://github.com/matrix-org/synapse/issues/5780 ))
- Set the logs emitted when checking typing and presence timeouts to DEBUG level, not INFO. ([\#5785](https://github.com/matrix-org/synapse/issues/5785 ))
- Remove DelayedCall debugging from the test suite, as it is no longer required in the vast majority of Synapse's tests. ([\#5787](https://github.com/matrix-org/synapse/issues/5787 ))
- Remove some spurious exceptions from the logs where we failed to talk to a remote server. ([\#5790](https://github.com/matrix-org/synapse/issues/5790 ))
- Improve performance when making `.well-known` requests by sharing the SSL options between requests. ([\#5794](https://github.com/matrix-org/synapse/issues/5794 ))
- Disable codecov GitHub comments on PRs. ([\#5796](https://github.com/matrix-org/synapse/issues/5796 ))
- Don't allow clients to send tombstone events that reference the room it's sent in. ([\#5801](https://github.com/matrix-org/synapse/issues/5801 ))
- Deny redactions of events sent in a different room. ([\#5802](https://github.com/matrix-org/synapse/issues/5802 ))
- Deny sending well known state types as non-state events. ([\#5805](https://github.com/matrix-org/synapse/issues/5805 ))
- Handle incorrectly encoded query params correctly by returning a 400. ([\#5808](https://github.com/matrix-org/synapse/issues/5808 ))
- Handle pusher being deleted during processing rather than logging an exception. ([\#5809](https://github.com/matrix-org/synapse/issues/5809 ))
- Return 502 not 500 when failing to reach any remote server. ([\#5810](https://github.com/matrix-org/synapse/issues/5810 ))
- Reduce global pauses in the events stream caused by expensive state resolution during persistence. ([\#5826](https://github.com/matrix-org/synapse/issues/5826 ))
- Add a lower bound to well-known lookup cache time to avoid repeated lookups. ([\#5836](https://github.com/matrix-org/synapse/issues/5836 ))
- Whitelist history visbility sytests in worker mode tests. ([\#5843](https://github.com/matrix-org/synapse/issues/5843 ))
2019-08-15 12:37:45 +01:00
Brendan Abolivier
fb5acd7039
1.3.0
2019-08-15 12:05:24 +01:00
Erik Johnston
748aa38378
Remove logging for #5407 and update comments
2019-08-15 12:02:18 +01:00
Andrew Morgan
8cf7fbbce0
Remove libsqlite3-dev from required build dependencies. ( #5766 )
2019-08-15 11:32:23 +01:00
Olivier Wilkinson (reivilibre)
a3df04a899
Newsfile
...
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2019-08-15 11:09:07 +01:00
Olivier Wilkinson (reivilibre)
2253b083d9
Add support for inbound MSC2197 requests on unstable Federation API
...
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2019-08-15 11:06:21 +01:00
reivilibre
7809f0c022
Merge pull request #5851 from matrix-org/rei/roomdir_maybedeferred
...
Room Directory: Wrap `get_local_public_room_list` call in `maybeDeferred`
2019-08-15 11:02:33 +01:00
Olivier Wilkinson (reivilibre)
6fadb560fc
Support MSC2197 outbound with unstable prefix
...
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2019-08-15 10:59:37 +01:00
Michael Telatynski
baee288fb4
Don't create broken room when power_level_content_override.users does not contain creator_id. ( #5633 )
2019-08-15 09:45:57 +01:00
Erik Johnston
1771f0045d
Newsfile
2019-08-15 09:28:58 +01:00
Erik Johnston
e6e136decc
Retry well known on fail.
...
If we have recently seen a valid well-known for a domain we want to
retry on (non-final) errors a few times, to handle temporary blips in
networking/etc.
2019-08-15 09:28:58 +01:00
Hubert Chathi
c058aeb88d
update set_e2e_room_key to agree with fixed index
2019-08-14 18:02:58 -07:00
Hubert Chathi
81b8080acd
add changelog
2019-08-14 17:53:33 -07:00
Hubert Chathi
b7f7cc7ace
add the version field to the index for e2e_room_keys
2019-08-14 17:14:40 -07:00
reivilibre
d6de55bce9
Update changelog.d/5851.bugfix
...
Use imperative
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2019-08-14 14:53:49 +01:00
Olivier Wilkinson (reivilibre)
3ad24ab386
Newsfile
...
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2019-08-14 14:53:49 +01:00
Olivier Wilkinson (reivilibre)
1b63ccd848
Wrap get_local_public_room_list call in maybeDeferred because it
...
is cached and so does not always return a `Deferred`.
`await` does not silently pass-through non-Deferreds like `yield` used to.
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2019-08-14 14:53:49 +01:00
Erik Johnston
09f6152a11
Merge pull request #5844 from matrix-org/erikj/retry_well_known_lookup
...
Retry well-known lookup before expiry.
2019-08-14 09:53:33 +01:00
Brendan Abolivier
f70d0a1dd9
1.3.0rc1
2019-08-13 18:20:09 +01:00
Brendan Abolivier
3039be82ce
Merge pull request #5848 from matrix-org/hawkowl/fix-mediarepo-worker-startup
...
Fix mediarepo worker startup
2019-08-13 17:38:11 +01:00
Amber H. Brown
28bce1ac7c
changelog
2019-08-14 02:08:24 +10:00
Amber H. Brown
18bdac8ee4
fix config being a dict, actually
2019-08-14 02:06:42 +10:00
Erik Johnston
aedfec3ad7
Newsfile
2019-08-13 16:20:38 +01:00
Erik Johnston
17e1e80726
Retry well-known lookup before expiry.
...
This gives a bit of a grace period where we can attempt to refetch a
remote `well-known`, while still using the cached result if that fails.
Hopefully this will make the well-known resolution a bit more torelant
of failures, rather than it immediately treating failures as "no result"
and caching that for an hour.
2019-08-13 16:20:38 +01:00
Erik Johnston
af187805b3
Merge pull request #5809 from matrix-org/erikj/handle_pusher_stop
...
Handle pusher being deleted during processing.
2019-08-13 14:08:29 +01:00
Erik Johnston
96bdd661b8
Remove redundant return
2019-08-13 12:50:36 +01:00
Amber Brown
0b6fbb28a8
Don't load the media repo when configured to use an external media repo ( #5754 )
2019-08-13 21:49:28 +10:00
Erik Johnston
e9906b0772
Merge pull request #5836 from matrix-org/erikj/lower_bound_ttl_well_known
...
Add a lower bound to well-known TTL.
2019-08-13 12:41:16 +01:00
Erik Johnston
fb3469f53a
Clarify docstring
...
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2019-08-13 10:17:23 +01:00
Erik Johnston
f218705d2a
Make default well known cache global again.
2019-08-13 10:06:51 +01:00
Erik Johnston
2546f32b90
Merge pull request #5826 from matrix-org/erikj/reduce_event_pauses
...
Don't unnecessarily block notifying of new events.
2019-08-13 09:36:25 +01:00
Erik Johnston
9d9cf3583b
Merge pull request #5843 from matrix-org/erikj/workers_hist_vis
...
Whitelist history visbility sytests for worker mode
2019-08-12 18:02:19 +01:00
Erik Johnston
2bec3a4953
Merge pull request #5839 from tcitworld/fix-purge-remote-media-script
...
Fix curl command typo in purge_remote_media.sh
2019-08-12 14:51:27 +01:00
Erik Johnston
3de6cc245f
Changelogs should end in '.' or '!'
2019-08-12 14:16:42 +01:00
Erik Johnston
156a461cbd
Newsfile
2019-08-12 13:57:52 +01:00
Erik Johnston
c9456193d3
Whitelist history visbility sytests for worker mode
2019-08-12 13:56:26 +01:00
Richard van der Hoff
fb86217553
Merge pull request #5788 from matrix-org/rav/metaredactions
...
Fix handling of redactions of redactions
2019-08-12 12:25:19 +01:00
Erik Johnston
41546f946e
Newsfile
2019-08-12 09:56:58 +01:00
Thomas Citharel
a7f0161276
Fix curl command typo in purge_remote_media.sh
...
Was verbose option instead of -X, command didn't work
Signed-off-by: Thomas Citharel <tcit@tcit.fr >
2019-08-09 18:36:12 +02:00
Neil Johnson
1016f303e5
make user creation steps clearer
2019-08-08 14:58:21 +01:00
Erik Johnston
107ad133fc
Move well known lookup into a separate clas
2019-08-07 15:36:38 +01:00
Erik Johnston
af9f1c0764
Add a lower bound for TTL on well known results.
...
It costs both us and the remote server for us to fetch the well known
for every single request we send, so we add a minimum cache period. This
is set to 5m so that we still honour the basic premise of "refetch
frequently".
2019-08-06 17:01:23 +01:00
Erik Johnston
d1b5b055be
Merge pull request #5825 from matrix-org/erikj/fix_empty_limited_sync
...
Handle TimelineBatch being limited and empty.
2019-08-06 15:39:44 +01:00
Andrew Morgan
edeae53221
Return 404 instead of 403 when retrieving an event without perms ( #5798 )
...
Part of fixing matrix-org/sytest#652
Sytest PR: matrix-org/sytest#667
2019-08-06 13:33:55 +01:00
Erik Johnston
c32d359094
Newsfile
2019-08-06 13:33:42 +01:00
Erik Johnston
bf4db42920
Don't unnecessarily block notifying of new events.
...
When persisting events we calculate new stream orderings up front.
Before we notify about an event all events with lower stream orderings
must have finished being persisted.
This PR moves the assignment of stream ordering till *after* calculated
the new current state and split the batch of events into separate chunks
for persistence. This means that if it takes a long time to calculate
new current state then it will not block events in other rooms being
notified about.
This should help reduce some global pauses in the events stream which
can last for tens of seconds (if not longer), caused by some
particularly expensive state resolutions.
2019-08-06 13:32:02 +01:00
Erik Johnston
977fa4a717
Newsfile
2019-08-06 13:00:45 +01:00
Erik Johnston
6881f21f3e
Handle TimelineBatch being limited and empty.
...
This hopefully addresses #5407 by gracefully handling an empty but
limited TimelineBatch. We also add some logging to figure out how this
is happening.
2019-08-06 12:59:00 +01:00
Brendan Abolivier
8ed9e63432
Account validity: allow defining HTML templates to serve the us… ( #5807 )
...
Account validity: allow defining HTML templates to serve the user on account renewal attempt
2019-08-01 16:09:25 +02:00
Erik Johnston
d55bc4a8bf
Merge pull request #5810 from matrix-org/erikj/no_server_reachable
...
Return 502 not 500 when failing to reach any remote server.
2019-08-01 14:19:39 +01:00
Andrew Morgan
5d018d23f0
Have ClientReaderSlavedStore inherit RegistrationStore ( #5806 )
...
Fixes #5803
2019-08-01 13:54:56 +01:00
Erik Johnston
93fd3cbc7a
Newsfile
2019-08-01 13:48:52 +01:00
Erik Johnston
3c076c79c5
Merge pull request #5808 from matrix-org/erikj/parse_decode_error
...
Handle incorrectly encoded query params correctly
2019-08-01 13:48:10 +01:00
Erik Johnston
a8f40a8302
Return 502 not 500 when failing to reach any remote server.
2019-08-01 13:47:31 +01:00
Erik Johnston
55a0c98d16
Merge pull request #5805 from matrix-org/erikj/validate_state
...
Validate well known state events are state events.
2019-08-01 13:45:48 +01:00
Erik Johnston
0b36decfb6
Merge pull request #5801 from matrix-org/erikj/recursive_tombstone
...
Don't allow clients to send tombstones that reference the same room
2019-08-01 13:45:35 +01:00
Erik Johnston
312cc48e2b
Newsfile
2019-08-01 13:45:09 +01:00
Erik Johnston
d02e41dcb2
Handle pusher being deleted during processing.
...
Instead of throwing a StoreError lets break out of processing loop and
mark the pusher as stopped.
2019-08-01 13:44:12 +01:00
Erik Johnston
da378af445
Newsfile
2019-08-01 13:24:00 +01:00
Erik Johnston
d2e3d5b9db
Handle incorrectly encoded query params correctly
2019-08-01 13:23:00 +01:00
Erik Johnston
76a58fdcce
Fix spelling.
...
Co-Authored-By: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2019-08-01 13:17:55 +01:00
Erik Johnston
58af30a6c7
Merge pull request #5802 from matrix-org/erikj/deny_redacting_different_room
...
Deny redaction of events in a different room.
2019-08-01 13:14:46 +01:00
Erik Johnston
0f632f3a57
Merge pull request #5790 from matrix-org/erikj/groups_request_errors
...
Handle RequestSendFailed exception correctly in more places.
2019-08-01 13:14:08 +01:00
Erik Johnston
ad167c3849
Merge pull request #5804 from matrix-org/erikj/match_against_state_key
...
Explicitly check that tombstone is a state event before notifying.
2019-08-01 13:13:33 +01:00
Brendan Abolivier
f25f638c35
Lint
2019-08-01 12:19:08 +02:00
Brendan Abolivier
3ff3dfe5a3
Sample config
2019-08-01 12:08:25 +02:00
Brendan Abolivier
f4a30d286f
Changelog
2019-08-01 12:08:06 +02:00
Brendan Abolivier
bc35503528
Add tests
2019-08-01 12:00:08 +02:00
Brendan Abolivier
a4a9ded4d0
Allow defining HTML templates to serve the user on account renewal
2019-08-01 11:59:27 +02:00
Erik Johnston
e5a0224837
Newsfile
2019-07-31 16:39:42 +01:00
Erik Johnston
dc4d74e44a
Validate well-known state events are state events.
...
Lets disallow sending things like memberships, topics etc as non-state
events.
2019-07-31 16:36:20 +01:00
Erik Johnston
c5288e9984
Newsfile
2019-07-31 16:32:03 +01:00
Erik Johnston
2e697d3013
Explicitly check that tombstone is a state event before notifying.
2019-07-31 16:32:03 +01:00
Erik Johnston
0eefb76fa1
Newsfile
2019-07-31 16:13:57 +01:00
Erik Johnston
cf89266b98
Deny redaction of events in a different room.
...
We already correctly filter out such redactions, but we should also deny
them over the CS API.
2019-07-31 16:12:27 +01:00
Erik Johnston
02735e140f
Newsfile
2019-07-31 15:53:52 +01:00
Erik Johnston
f31d4cb7a2
Don't allow clients to send tombstones that reference the same room
2019-07-31 15:52:27 +01:00
Andrew Morgan
72167fb394
Change user deactivated errcode to USER_DEACTIVATED and use it ( #5686 )
...
This is intended as an amendment to #5674 as using M_UNKNOWN as the errcode makes it hard for clients to differentiate between an invalid password and a deactivated user (the problem we were trying to solve in the first place).
M_UNKNOWN was originally chosen as it was presumed than an MSC would have to be carried out to add a new code, but as Synapse often is the testing bed for new MSC implementations, it makes sense to try it out first in the wild and then add it into the spec if it is successful. Thus this PR return a new M_USER_DEACTIVATED code when a deactivated user attempts to login.
2019-07-31 15:19:06 +01:00
Andrew Morgan
58a755cdc3
Remove duplicate return statement
2019-07-31 13:24:51 +01:00
Erik Johnston
8fde611a8c
Merge pull request #5794 from matrix-org/erikj/share_ssl_options_for_well_known
...
Share SSL options for well-known requests
2019-07-31 11:40:02 +01:00
Amber Brown
8f15832950
Remove DelayedCall debugging from test runs ( #5787 )
2019-07-31 20:39:22 +10:00
Erik Johnston
9fe6ad5fef
Merge pull request #5796 from matrix-org/erikj/disable_codecov_report
...
Disable codecov reports to GH comments.
2019-07-31 11:16:15 +01:00
Erik Johnston
fe2f2fc530
Newsfile
2019-07-31 10:59:39 +01:00
Erik Johnston
6be336c0d8
Disable codecov reports to GH comments.
...
The double posting is really annoying, and I don't think anyone is
actually reading them. The commit statuses should give a good summary
and will link to a full report.
2019-07-31 10:56:02 +01:00
Erik Johnston
3b7a35a59a
Newsfile
2019-07-31 10:39:24 +01:00
Erik Johnston
a9bcae9f50
Share SSL options for well-known requests
2019-07-31 10:39:24 +01:00
Brendan Abolivier
d4f91e7e9f
Merge pull request #5793 from matrix-org/erikj/fix_bg_update
...
Don't recreate current_state_events.membership column
2019-07-30 21:19:39 +02:00
Erik Johnston
4037d3220a
Newsfile
2019-07-30 16:43:59 +01:00
Erik Johnston
123c04daa7
Don't recreate column
2019-07-30 16:42:48 +01:00
Erik Johnston
62a2d60d72
Merge pull request #5792 from matrix-org/erikj/fix_bg_update
...
Fix current_state_events membership background update.
2019-07-30 15:20:09 +01:00
Erik Johnston
958d69f300
Newsfile
2019-07-30 14:53:52 +01:00
Erik Johnston
15056ca208
Fix current_state_events membership background update.
...
Turns out not all rooms are in `rooms`, so lets fetch the room list from
`current_state_events`. We move the delta file to force it to be run
again.
2019-07-30 14:51:41 +01:00
Erik Johnston
f92d05e254
Newsfile
2019-07-30 13:43:53 +01:00
Erik Johnston
7a48d0bab8
Merge pull request #5789 from matrix-org/erikj/fix_error_handling_keys
...
Fix error handling when fetching remote device keys
2019-07-30 13:26:12 +01:00
Erik Johnston
b4d5ff0af7
Don't log as exception when failing durig backfill
2019-07-30 13:19:22 +01:00
Erik Johnston
e23ab7f41a
Newsfile
2019-07-30 13:10:00 +01:00
Erik Johnston
1ec7d656dd
Unwrap error
2019-07-30 13:09:02 +01:00
Erik Johnston
458e51df7a
Fix error handling when fetching remote device keys
2019-07-30 13:07:02 +01:00
Erik Johnston
63eb4a1b62
Merge pull request #5746 from matrix-org/erikj/test_bg_update_currnet_state
...
Add unit test for current state membership bg update
2019-07-30 10:00:02 +01:00
Richard van der Hoff
8c97f6414c
Remove non-functional 'expire_access_token' setting ( #5782 )
...
The `expire_access_token` didn't do what it sounded like it should do. What it
actually did was make Synapse enforce the 'time' caveat on macaroons used as
access tokens, but since our access token macaroons never contained such a
caveat, it was always a no-op.
(The code to add 'time' caveats was removed back in v0.18.5, in #1656 )
2019-07-30 08:25:02 +01:00
Richard van der Hoff
5c3eecc70f
changelog
2019-07-30 00:00:34 +01:00
Richard van der Hoff
4e97eb89e5
Handle loops in redaction events
2019-07-30 00:00:34 +01:00
Richard van der Hoff
448bcfd0f9
recursively fetch redactions
2019-07-30 00:00:34 +01:00
Richard van der Hoff
e6a6c4fbab
split _get_events_from_db out of _enqueue_events
2019-07-29 23:15:15 +01:00
Richard van der Hoff
c9964ba600
Return dicts from _fetch_event_list
2019-07-29 23:15:15 +01:00
Amber Brown
865077f1d1
Room Complexity Client Implementation ( #5783 )
2019-07-30 02:47:27 +10:00
Erik Johnston
aecae8f397
Correctly handle errors doing requests to group servers
2019-07-29 17:21:57 +01:00
Erik Johnston
7c8c3b8437
Merge pull request #5774 from matrix-org/erikj/fix_rejected_membership
...
Fix room summary when rejected events are in state
2019-07-29 17:15:15 +01:00
Erik Johnston
3e013b7c8e
Merge pull request #5752 from matrix-org/erikj/forgotten_user
...
Remove some more joins on room_memberships
2019-07-29 17:15:01 +01:00
Erik Johnston
2a12d76646
Merge pull request #5770 from matrix-org/erikj/fix_current_state_event_sqlite
...
Fix current_state bg update to work on old SQLite
2019-07-29 17:09:01 +01:00
Amber Brown
97a8b4caf7
Move some timeout checking logs to DEBUG #5785
2019-07-30 02:02:18 +10:00
Erik Johnston
df3a5db629
Expand comment
2019-07-29 16:40:25 +01:00
Jorik Schellekens
85b0bd8fe0
Update the device list cache when keys/query is called ( #5693 )
2019-07-29 16:34:44 +01:00
Erik Johnston
105e7f6ed3
Remove lost comment
2019-07-29 16:09:48 +01:00
Erik Johnston
3b476f5767
Fix debian packages for sid being called buster. ( #5775 )
...
* Fix debian packages for sid being called buster.
I don't know why the sid images return buster as its codename in
`lsb_release` but it does, so lets just grab the codename from the
distro we pass into dockerfile
* Newsfile
2019-07-30 00:33:32 +10:00
Erik Johnston
d94916852f
Newsfile
2019-07-29 13:04:58 +01:00
Erik Johnston
84c6ea1af8
Update old deps unit test to use old sqlite3
2019-07-29 13:04:50 +01:00
Erik Johnston
45df38e61b
Fix current_state bg update to work on old SQLite
2019-07-29 13:04:10 +01:00
Brendan Abolivier
fa87004bc1
Merge pull request #5780 from matrix-org/baboliver/loopingcall-args
...
Add ability to pass arguments to looping calls
2019-07-29 10:58:22 +02:00
Brendan Abolivier
bd083a5fcf
Changelog
2019-07-29 10:04:09 +02:00
Brendan Abolivier
244953be3f
Add kwargs and doc
2019-07-29 10:03:14 +02:00
Brendan Abolivier
08352d44f8
Add ability to pass arguments to looping calls
2019-07-29 09:54:37 +02:00
Richard van der Hoff
d74595e2ca
Merge branch 'master' into develop
2019-07-26 12:39:33 +01:00
Richard van der Hoff
1a93daf353
Merge pull request #5744 from matrix-org/erikj/log_leave_origin_mismatch
...
Log when we receive a /make_* request from a different origin
2019-07-26 12:38:37 +01:00
Richard van der Hoff
97bf307755
yet more changelog attribution fixes
2019-07-26 12:06:06 +01:00
Richard van der Hoff
992333b995
correct attributions in changelog
2019-07-26 11:45:06 +01:00
Richard van der Hoff
8b16696b24
correct attributions in changelog
2019-07-26 11:36:28 +01:00
Richard van der Hoff
dde6ea7ff6
1.2.1
2019-07-26 11:33:16 +01:00
Erik Johnston
2e9cf7dda5
Newsfile
2019-07-26 10:14:31 +01:00
Erik Johnston
14c24c9037
Fix room summary when rejected events are in state
...
Annoyingly, `current_state_events` table can include rejected events,
in which case the membership column will be null. To work around this
lets just always filter out null membership for now.
2019-07-26 10:11:36 +01:00
Richard van der Hoff
a0ee2ec458
Merge branch 'erikj/log_leave_origin_mismatch' into release-v1.2.1
2019-07-26 10:09:36 +01:00
Richard van der Hoff
d1020653fc
Log when we receive a /make_* request from a different origin
2019-07-26 10:08:22 +01:00
Erik Johnston
1f8bae7724
Log when we receive receipt from a different origin
2019-07-26 07:55:25 +01:00
Richard van der Hoff
1cad8d7b6f
Convert RedactionTestCase to modern test style ( #5768 )
2019-07-26 07:38:55 +01:00
Richard van der Hoff
0f2ecb961e
Fix DoS when there is a cycle in redaction events
...
Make sure that synapse doesn't explode when a redaction redacts itself, or
there is a larger cycle.
2019-07-26 06:36:48 +00:00
Richard van der Hoff
26d742fed6
Merge pull request #5767 from matrix-org/rav/redactions/cross_room_id
...
log when a redaction attempts to redact an event in a different room
2019-07-25 18:49:56 +01:00
Richard van der Hoff
70e18cee00
Merge branch 'rav/redactions/cross_room_id' into release-v1.2.1
2019-07-25 18:46:44 +01:00
Richard van der Hoff
b1605cdd23
log when a redaction attempts to redact an event in a different room
2019-07-25 18:26:20 +01:00
Richard van der Hoff
618bd1ee76
Fix some error cases in the caching layer. ( #5749 )
...
There was some inconsistent behaviour in the caching layer around how
exceptions were handled - particularly synchronously-thrown ones.
This seems to be most easily handled by pushing the creation of
ObservableDeferreds down from CacheDescriptor to the Cache.
2019-07-25 15:59:45 +01:00
Andrew Morgan
f16aa3a44b
Merge branch 'master' into develop
2019-07-25 15:19:22 +01:00
Andrew Morgan
c0a1301ccd
1.2.0
2019-07-25 14:10:32 +01:00
Andrew Morgan
baf081cd3b
Merge tag 'v1.2.0rc2' into develop
...
Bugfixes
--------
- Fix a regression introduced in v1.2.0rc1 which led to incorrect labels on some prometheus metrics. ([\#5734](https://github.com/matrix-org/synapse/issues/5734 ))
2019-07-24 13:47:51 +01:00
Andrew Morgan
2d573e2e2b
1.2.0rc2
2019-07-24 13:43:40 +01:00
Erik Johnston
2276936bac
Merge pull request #5743 from matrix-org/erikj/log_origin_receipts_mismatch
...
Log when we receive receipt from a different origin
2019-07-24 13:27:57 +01:00
Richard van der Hoff
f30a71a67b
Stop trying to fetch events with event_id=None. ( #5753 )
...
`None` is not a valid event id, so queuing up a database fetch for it seems
like a silly thing to do.
I considered making `get_event` return `None` if `event_id is None`, but then
its interaction with `allow_none` seemed uninituitive, and strong typing ftw.
2019-07-24 13:16:18 +01:00
Jorik Schellekens
cf2972c818
Fix servlet metric names ( #5734 )
...
* Fix servlet metric names
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
* Remove redundant check
* Cover all return paths
2019-07-24 13:07:35 +01:00
Erik Johnston
c159803067
Newsfile
2019-07-24 11:51:44 +01:00
Erik Johnston
0c4a99607e
Remove join when calculating room summaries.
2019-07-24 11:49:15 +01:00
Erik Johnston
62921fb53e
Remove join on room_memberships when fetching rooms for user.
2019-07-24 11:45:58 +01:00
Erik Johnston
32768e96d4
Add function to get all forgotten rooms for user
...
This will allow us to efficiently filter out rooms that have been
forgotten in other queries without having to join against the
`room_memberships` table.
2019-07-24 11:44:23 +01:00
Richard van der Hoff
418635e68a
Add a prometheus metric for active cache lookups. ( #5750 )
...
* Add a prometheus metric for active cache lookups.
* changelog
2019-07-24 11:33:13 +01:00
Erik Johnston
adcd5368b0
Newsfile
2019-07-23 17:00:24 +01:00
Erik Johnston
73bbaf2bc6
Add unit test for current state membership bg update
2019-07-23 17:00:22 +01:00
Jorik Schellekens
3641784e8c
Make Jaeger fully configurable ( #5694 )
...
* Allow Jaeger to be configured
* Update sample config
2019-07-23 15:46:04 +01:00
Erik Johnston
65afc535a6
Update changelog.d/5743.bugfix
...
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2019-07-23 15:14:21 +01:00
Amber Brown
4806651744
Replace returnValue with return ( #5736 )
2019-07-23 23:00:55 +10:00
Erik Johnston
fadfde9aaa
Newsfile
2019-07-23 13:32:37 +01:00
Jorik Schellekens
18a466b84e
Opentracing Utils ( #5722 )
...
* Add decerators for tracing functions
* Use the new clean contexts
* Context and edu utils
* Move opentracing setters
* Move whitelisting
* Sectioning comments
* Better args wrapper
* Docstrings
Co-Authored-By: Erik Johnston <erik@matrix.org >
* Remove unused methods.
* Don't use global
* One tracing decorator to rule them all.
2019-07-23 13:31:16 +01:00
Erik Johnston
3db1377b26
Log when we receive receipt from a different origin
2019-07-23 13:31:03 +01:00
Erik Johnston
841b12867e
Merge pull request #5732 from matrix-org/erikj/sdnotify
...
Add process hooks to tell systemd our state.
2019-07-23 13:06:53 +01:00
Erik Johnston
73bf452666
Merge pull request #5740 from matrix-org/erikj/worker_flakey_tests
...
Mark flakey tests as blacklisted for worker mode
2019-07-23 11:32:32 +01:00
Erik Johnston
22d2338ace
Newsfile
2019-07-23 10:27:53 +01:00
Erik Johnston
1883223a01
Mark flakey tests as blacklisted for worker mode
2019-07-23 10:26:52 +01:00
Erik Johnston
4f6984aa88
Merge pull request #5738 from matrix-org/erikj/faster_update
...
Speed up current state background update.
2019-07-23 10:23:12 +01:00
Erik Johnston
cda4460d99
Also update systemd-with-workers contrib examples
2019-07-23 10:14:01 +01:00
Erik Johnston
39e594b765
Merge pull request #5733 from matrix-org/erikj/exlude_sytest_blacklist
...
Don't package sytest-blacklist file.
2019-07-23 10:11:34 +01:00
Erik Johnston
cf0006719d
Newsfile
2019-07-23 10:01:30 +01:00
Erik Johnston
b2a629ef49
Speed up current state background update.
...
Turns out that storing huge JSON arrays in the progress JSON isn't
something that postgres particularly likes.
2019-07-23 10:01:30 +01:00
Erik Johnston
d9ea9881d2
Newsfile
2019-07-22 16:09:15 +01:00
Erik Johnston
c96322c8d2
Don't package sytest-blacklist file.
...
I don't think its useful, and I don't even know where it would end up.
2019-07-22 16:07:12 +01:00
Amber Brown
0d0f6d12bc
Fix logging in workers ( #5729 )
...
This also adds a worker blacklist.
2019-07-22 16:05:00 +01:00
Erik Johnston
17c27df6ea
Update example systemd service file
2019-07-22 15:24:25 +01:00
Erik Johnston
80cfad233e
Call startup commands as system triggers.
...
This helps ensures that we only consider ourselves "up" once all the
startup functions have completed.
2019-07-22 15:22:14 +01:00
Erik Johnston
720d30469f
Merge pull request #5730 from matrix-org/erikj/cache_versions
...
Cache get_version_string.
2019-07-22 14:52:52 +01:00
Erik Johnston
79f689e6c2
Newsfile
2019-07-22 14:52:19 +01:00
Erik Johnston
c560b791e1
Add process hooks to tell systemd our state.
...
Fixes #5676 .
2019-07-22 14:52:18 +01:00
Jason Robinson
8e513e7afc
Merge pull request #5731 from matrix-org/jaywink/admin-user-list-user-type
...
Add `user_type` to returned fields in admin API user list endpoints
2019-07-22 16:28:51 +03:00
Erik Johnston
22e862304a
Update changelog.d/5730.misc
...
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2019-07-22 14:09:56 +01:00
Richard van der Hoff
0cb72812f9
Fix stack overflow in Keyring ( #5724 )
...
* Refactor Keyring._start_key_lookups
There's an awful lot of deferreds and dictionaries flying around here. The
whole thing can be made much simpler and achieve the same effect.
* Add a delay to key lookup lock release to fix stack overflow
A tactical call_later here should fix #5723
* changelog
2019-07-22 13:51:22 +01:00
Andrew Morgan
f477ce4b1a
Merge tag 'v1.2.0rc1' into develop
...
v1.2.0rc1
Features
--------
- Add support for opentracing. ([\#5544](https://github.com/matrix-org/synapse/issues/5544 ), [\#5712](https://github.com/matrix-org/synapse/issues/5712 ))
- Add ability to pull all locally stored events out of synapse that a particular user can see. ([\#5589](https://github.com/matrix-org/synapse/issues/5589 ))
- Add a basic admin command app to allow server operators to run Synapse admin commands separately from the main production instance. ([\#5597](https://github.com/matrix-org/synapse/issues/5597 ))
- Add `sender` and `origin_server_ts` fields to `m.replace`. ([\#5613](https://github.com/matrix-org/synapse/issues/5613 ))
- Add default push rule to ignore reactions. ([\#5623](https://github.com/matrix-org/synapse/issues/5623 ))
- Include the original event when asking for its relations. ([\#5626](https://github.com/matrix-org/synapse/issues/5626 ))
- Implement `session_lifetime` configuration option, after which access tokens will expire. ([\#5660](https://github.com/matrix-org/synapse/issues/5660 ))
- Return "This account has been deactivated" when a deactivated user tries to login. ([\#5674](https://github.com/matrix-org/synapse/issues/5674 ))
- Enable aggregations support by default ([\#5714](https://github.com/matrix-org/synapse/issues/5714 ))
Bugfixes
--------
- Fix 'utime went backwards' errors on daemonization. ([\#5609](https://github.com/matrix-org/synapse/issues/5609 ))
- Various minor fixes to the federation request rate limiter. ([\#5621](https://github.com/matrix-org/synapse/issues/5621 ))
- Forbid viewing relations on an event once it has been redacted. ([\#5629](https://github.com/matrix-org/synapse/issues/5629 ))
- Fix requests to the `/store_invite` endpoint of identity servers being sent in the wrong format. ([\#5638](https://github.com/matrix-org/synapse/issues/5638 ))
- Fix newly-registered users not being able to lookup their own profile without joining a room. ([\#5644](https://github.com/matrix-org/synapse/issues/5644 ))
- Fix bug in #5626 that prevented the original_event field from actually having the contents of the original event in a call to `/relations`. ([\#5654](https://github.com/matrix-org/synapse/issues/5654 ))
- Fix 3PID bind requests being sent to identity servers as `application/x-form-www-urlencoded` data, which is deprecated. ([\#5658](https://github.com/matrix-org/synapse/issues/5658 ))
- Fix some problems with authenticating redactions in recent room versions. ([\#5699](https://github.com/matrix-org/synapse/issues/5699 ), [\#5700](https://github.com/matrix-org/synapse/issues/5700 ), [\#5707](https://github.com/matrix-org/synapse/issues/5707 ))
- Ignore redactions of m.room.create events. ([\#5701](https://github.com/matrix-org/synapse/issues/5701 ))
Updates to the Docker image
---------------------------
- Base Docker image on a newer Alpine Linux version (3.8 -> 3.10). ([\#5619](https://github.com/matrix-org/synapse/issues/5619 ))
- Add missing space in default logging file format generated by the Docker image. ([\#5620](https://github.com/matrix-org/synapse/issues/5620 ))
Improved Documentation
----------------------
- Add information about nginx normalisation to reverse_proxy.rst. Contributed by @skalarproduktraum - thanks! ([\#5397](https://github.com/matrix-org/synapse/issues/5397 ))
- --no-pep517 should be --no-use-pep517 in the documentation to setup the development environment. ([\#5651](https://github.com/matrix-org/synapse/issues/5651 ))
- Improvements to Postgres setup instructions. Contributed by @Lrizika - thanks! ([\#5661](https://github.com/matrix-org/synapse/issues/5661 ))
- Minor tweaks to postgres documentation. ([\#5675](https://github.com/matrix-org/synapse/issues/5675 ))
Deprecations and Removals
-------------------------
- Remove support for the `invite_3pid_guest` configuration setting. ([\#5625](https://github.com/matrix-org/synapse/issues/5625 ))
Internal Changes
----------------
- Move logging code out of `synapse.util` and into `synapse.logging`. ([\#5606](https://github.com/matrix-org/synapse/issues/5606 ), [\#5617](https://github.com/matrix-org/synapse/issues/5617 ))
- Add a blacklist file to the repo to blacklist certain sytests from failing CI. ([\#5611](https://github.com/matrix-org/synapse/issues/5611 ))
- Make runtime errors surrounding password reset emails much clearer. ([\#5616](https://github.com/matrix-org/synapse/issues/5616 ))
- Remove dead code for persiting outgoing federation transactions. ([\#5622](https://github.com/matrix-org/synapse/issues/5622 ))
- Add `lint.sh` to the scripts-dev folder which will run all linting steps required by CI. ([\#5627](https://github.com/matrix-org/synapse/issues/5627 ))
- Move RegistrationHandler.get_or_create_user to test code. ([\#5628](https://github.com/matrix-org/synapse/issues/5628 ))
- Add some more common python virtual-environment paths to the black exclusion list. ([\#5630](https://github.com/matrix-org/synapse/issues/5630 ))
- Some counter metrics exposed over Prometheus have been renamed, with the old names preserved for backwards compatibility and deprecated. See `docs/metrics-howto.rst` for details. ([\#5636](https://github.com/matrix-org/synapse/issues/5636 ))
- Unblacklist some user_directory sytests. ([\#5637](https://github.com/matrix-org/synapse/issues/5637 ))
- Factor out some redundant code in the login implementation. ([\#5639](https://github.com/matrix-org/synapse/issues/5639 ))
- Update ModuleApi to avoid register(generate_token=True). ([\#5640](https://github.com/matrix-org/synapse/issues/5640 ))
- Remove access-token support from `RegistrationHandler.register`, and rename it. ([\#5641](https://github.com/matrix-org/synapse/issues/5641 ))
- Remove access-token support from `RegistrationStore.register`, and rename it. ([\#5642](https://github.com/matrix-org/synapse/issues/5642 ))
- Improve logging for auto-join when a new user is created. ([\#5643](https://github.com/matrix-org/synapse/issues/5643 ))
- Remove unused and unnecessary check for FederationDeniedError in _exception_to_failure. ([\#5645](https://github.com/matrix-org/synapse/issues/5645 ))
- Fix a small typo in a code comment. ([\#5655](https://github.com/matrix-org/synapse/issues/5655 ))
- Clean up exception handling around client access tokens. ([\#5656](https://github.com/matrix-org/synapse/issues/5656 ))
- Add a mechanism for per-test homeserver configuration in the unit tests. ([\#5657](https://github.com/matrix-org/synapse/issues/5657 ))
- Inline issue_access_token. ([\#5659](https://github.com/matrix-org/synapse/issues/5659 ))
- Update the sytest BuildKite configuration to checkout Synapse in `/src`. ([\#5664](https://github.com/matrix-org/synapse/issues/5664 ))
- Add a `docker` type to the towncrier configuration. ([\#5673](https://github.com/matrix-org/synapse/issues/5673 ))
- Convert `synapse.federation.transport.server` to `async`. Might improve some stack traces. ([\#5689](https://github.com/matrix-org/synapse/issues/5689 ))
- Documentation for opentracing. ([\#5703](https://github.com/matrix-org/synapse/issues/5703 ))
2019-07-22 13:49:16 +01:00
Jason Robinson
66f5ff72fd
Add user_type to returned fields in admin API user list endpoints
...
Mostly user type will be empty (normal user) but there is also the
"support" user type.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-07-22 15:29:18 +03:00
Erik Johnston
2017369f7d
Newsfile
2019-07-22 13:18:25 +01:00
Andrew Morgan
8b0d5b171e
Make changelog slightly more readable
2019-07-22 13:15:35 +01:00
Erik Johnston
5ea773c505
Cache get_version_string.
...
The version of a module isn't going to change over the lifetime of the
process (assuming no funky hot reloading is going on, which it isn't),
so let's just cache the result to avoid spawning lots of git
subprocesses.
Fixes #5672 .
2019-07-22 13:15:08 +01:00
Andrew Morgan
54437c48ca
1.2.0rc1
2019-07-22 12:59:04 +01:00
Jorik Schellekens
f337d2f0f0
Demo uses deprecated cli option ( #5725 )
...
* Remove deprecated 'verbose' cli arg
* Create 5725.bugfix
2019-07-22 11:31:05 +01:00
Jorik Schellekens
0fd171770a
Merge branch 'release-v1.2.0' into develop
2019-07-22 11:18:50 +01:00
Jorik Schellekens
826e6ec3bd
Opentracing Documentation ( #5703 )
...
* Opentracing survival guide
* Update decorator names in doc
* Doc cleanup
These are all alterations as a result of comments in #5703 , it
includes mostly typos and clarifications. The most interesting
changes are:
- Split developer and user docs into two sections
- Add a high level description of OpenTracing
* newsfile
* Move contributer specific info to docstring.
* Sample config.
* Trailing whitespace.
* Update 5703.misc
* Apply suggestions from code review
Mostly just rewording parts of the docs for clarity.
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2019-07-22 11:15:21 +01:00
Jorik Schellekens
f99554b15d
Revert "Remove deprecated 'verbose' cli arg"
...
This reverts commit dc7cf81267 .
2019-07-19 18:19:27 +01:00
Jorik Schellekens
dc7cf81267
Remove deprecated 'verbose' cli arg
2019-07-19 18:16:42 +01:00
Richard van der Hoff
f214bff0c0
changelog
2019-07-19 17:58:17 +01:00
Richard van der Hoff
dcca56baba
Add a delay to key lookup lock release to fix stack overflow
...
A tactical call_later here should fix #5723
2019-07-19 17:57:00 +01:00
Richard van der Hoff
c7095be913
Refactor Keyring._start_key_lookups
...
There's an awful lot of deferreds and dictionaries flying around here. The
whole thing can be made much simpler and achieve the same effect.
2019-07-19 17:49:19 +01:00
Erik Johnston
7704873cb8
Merge pull request #5720 from matrix-org/erikj/transactions_upsert
...
Use upsert when updating destination retry interval
2019-07-19 16:51:16 +01:00
Erik Johnston
d7bd9651bc
Merge pull request #5713 from matrix-org/erikj/use_cache_for_filtered_state
...
Delegate to cached version when using get_filtered_current_state_ids
2019-07-19 16:30:49 +01:00
Erik Johnston
5c07c97c09
Merge pull request #5706 from matrix-org/erikj/add_memberships_to_current_state
...
Add membership column to current_state_events table
2019-07-19 16:30:33 +01:00
Jorik Schellekens
7b8bc61834
Don't accept opentracing data from clients. ( #5715 )
...
* Don't accept opentracing data from clients.
* newsfile
2019-07-19 16:29:57 +01:00
Erik Johnston
ced4fdaa84
Newsfile
2019-07-19 13:40:26 +01:00
Erik Johnston
2410335507
Use upsert when updating destination retry interval
2019-07-19 13:40:24 +01:00
Erik Johnston
bd2e1a2aa8
LoggingTransaction accepts None for callback lists.
...
Its a bit disingenuousto give LoggingTransaction lists to append
callbacks to if we're not going to run the callbacks.
2019-07-19 13:36:04 +01:00
Erik Johnston
ebc5ed1296
Update comment for new column
2019-07-19 13:29:02 +01:00
Neil Johnson
5c05ae7ba0
Add 'rel' attribute to default welcome page. ( #5695 )
...
add rel attribute as a precaution against reverse tabnabbing in future
2019-07-19 12:03:36 +01:00
Richard van der Hoff
b73ce4ba81
Update the coding style doc ( #5719 )
...
A few fixes and removal of duplicated stuff, but mostly a bunch of the words on the config file.
2019-07-19 11:55:14 +01:00
Amber Brown
356ed0438e
Speed up the PostgreSQL unit tests ( #5717 )
2019-07-19 19:01:23 +10:00
Amber Brown
6a85cb5ef7
Remove non-dedicated logging options and command line arguments ( #5678 )
2019-07-19 01:40:08 +10:00
Neil Johnson
a3e40bd5b4
towncrier
2019-07-18 16:02:09 +01:00
Neil Johnson
cfc00068bd
enable aggregations support by default
2019-07-18 15:56:59 +01:00
Erik Johnston
dd2851d576
Newsfile
2019-07-18 15:27:18 +01:00
Erik Johnston
10523241d8
Delegate to cached version when using get_filtered_current_state_ids
...
In the case where it gets called with `StateFilter.all()`
2019-07-18 15:17:39 +01:00
Richard van der Hoff
82345bc09a
Clean up opentracing configuration options ( #5712 )
...
Clean up config settings and dead code.
This is mostly about cleaning up the config format, to bring it into line with our conventions. In particular:
* There should be a blank line after `## Section ##' headings
* There should be a blank line between each config setting
* There should be a `#`-only line between a comment and the setting it describes
* We don't really do the `# #` style commenting-out of whole sections if we can help it
* rename `tracer_enabled` to `enabled`
While we're here, do more config parsing upfront, which makes it easier to use
later on.
Also removes redundant code from LogContextScopeManager.
Also changes the changelog fragment to a `feature` - it's exciting!
2019-07-18 15:06:54 +01:00
Amber Brown
7ad1d76356
Support Prometheus_client 0.4.0+ ( #5636 )
2019-07-18 23:57:15 +10:00
Andrew Morgan
b2a382efdb
Remove the ability to query relations when the original event was redacted. ( #5629 )
...
Fixes #5594
Forbid viewing relations on an event once it has been redacted.
2019-07-18 14:41:42 +01:00
Erik Johnston
89c885909a
Newsfile
2019-07-18 14:16:01 +01:00
Erik Johnston
8e1ada9e6f
Use the current_state_events.membership column
2019-07-18 14:16:01 +01:00
Erik Johnston
059d8c1a4e
Track if current_state_events.membership is up to date
2019-07-18 14:16:01 +01:00
Erik Johnston
c618a5d348
Add background update for current_state_events.membership column
2019-07-18 14:16:01 +01:00
Erik Johnston
6de09e07a6
Add membership column to current_state_events table.
...
It turns out that doing a join is surprisingly expensive for the DB to
do when room_membership table is larger than the disk cache.
2019-07-18 14:15:57 +01:00
Richard van der Hoff
fa8271c5ac
Convert synapse.federation.transport.server to async ( #5689 )
...
* Convert BaseFederationServlet._wrap to async
Empirically, this fixes some lost stacktraces. It should be safe because the
wrapped function is called from JsonResource._async_render, which is already
async.
* Convert the rest of synapse.federation.transport.server to async
We may as well do the whole file while we're here.
* changelog
* flake8
2019-07-18 11:46:47 +01:00
Richard van der Hoff
9c70a02a9c
Ignore redactions of m.room.create events ( #5701 )
2019-07-17 19:08:02 +01:00
Richard van der Hoff
1def298119
Improve Depends specs in debian package. ( #5675 )
...
This is basically a contrived way of adding a `Recommends` on `libpq5`, to fix #5653 .
The way this is supposed to happen in debhelper is to run
`dh_shlibdeps`, which in turn runs `dpkg-shlibdeps`, which spits things out
into `debian/<package>.substvars` whence they can later be included by
`control`.
Previously, we had disabled `dh_shlibdeps`, mostly because `dpkg-shlibdeps`
gets confused about PIL's interdependent objects, but that's not really the
right thing to do and there is another way to work around that.
Since we don't always use postgres, we don't necessarily want a hard Depends on
libpq5, so I've actually ended up adding an explicit invocation of
`dpkg-shlibdeps` for `psycopg2`.
I've also updated the build-depends list for the package, which was missing a
couple of entries.
2019-07-17 17:47:07 +01:00
Richard van der Hoff
2091c91fde
More refactoring in get_events_as_list ( #5707 )
...
We can now use `_get_events_from_cache_or_db` rather than going right back to
the database, which means that (a) we can benefit from caching, and (b) it
opens the way forward to more extensive checks on the original event.
We now always require the original event to exist before we will serve up a
redaction.
2019-07-17 17:34:13 +01:00
Richard van der Hoff
375162b3c3
Fix redaction authentication ( #5700 )
...
Ensures that redactions are correctly authenticated for recent room versions.
There are a few things going on here:
* `_fetch_event_rows` is updated to return a dict rather than a list of rows.
* Rather than returning multiple copies of an event which was redacted
multiple times, it returns the redactions as a list within the dict.
* It also returns the actual rejection reason, rather than merely the fact
that it was rejected, so that we don't have to query the table again in
`_get_event_from_row`.
* The redaction handling is factored out of `_get_event_from_row`, and now
checks if any of the redactions are valid.
2019-07-17 16:52:02 +01:00
Richard van der Hoff
65c5592b8e
Refactor get_events_as_list ( #5699 )
...
A couple of changes here:
* get rid of a redundant `allow_rejected` condition - we should already have filtered out any rejected
events before we get to that point in the code, and the redundancy is confusing. Instead, let's stick in
an assertion just to make double-sure we aren't leaking rejected events by mistake.
* factor out a `_get_events_from_cache_or_db` method, which is going to be important for a
forthcoming fix to redactions.
2019-07-17 16:49:19 +01:00
Erik Johnston
c831c5b2bb
Merge pull request #5597 from matrix-org/erikj/admin_api_cmd
...
Create basic admin command app
2019-07-16 15:59:36 +01:00
Erik Johnston
5ed7853bb0
Remove pointless description
2019-07-16 11:45:57 +01:00
Erik Johnston
f44354e17f
Clean up arg name and remove lying comment
2019-07-16 11:39:40 +01:00
Erik Johnston
d0d479c1af
Fix typo in synapse/app/admin_cmd.py
...
Co-Authored-By: Aaron Raimist <aaron@raim.ist >
2019-07-16 09:52:56 +01:00
Erik Johnston
03cc8c4b5d
Fix invoking add_argument from homeserver.py
2019-07-15 14:25:05 +01:00
Erik Johnston
eca4f5ac73
s/exfiltrate_user_data/export_user_data/
2019-07-15 14:17:28 +01:00
Erik Johnston
1b2067f53d
Add FileExfiltrationWriter
2019-07-15 14:15:22 +01:00
Erik Johnston
e8c53b07f2
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/admin_api_cmd
2019-07-15 14:13:22 +01:00
Erik Johnston
c8f35d8d38
Use set_defaults(func=) style
2019-07-15 14:09:35 +01:00
Erik Johnston
fdefb9e29a
Move creation of ArgumentParser to caller
2019-07-15 14:09:35 +01:00
Erik Johnston
37b524f971
Fix up comments
2019-07-15 14:09:35 +01:00
Erik Johnston
823e13ddf4
Change add_arguments to be a static method
2019-07-15 14:09:33 +01:00
Andrew Morgan
18c516698e
Return a different error from Invalid Password when a user is deactivated ( #5674 )
...
Return `This account has been deactivated` instead of `Invalid password` when a user is deactivated.
2019-07-15 11:45:29 +01:00
Erik Johnston
d86321300a
Merge pull request #5589 from matrix-org/erikj/admin_exfiltrate_data
...
Add basic function to get all data for a user out of synapse
2019-07-15 10:04:02 +01:00
Richard van der Hoff
d336b51331
Add a docker type to the towncrier configuration ( #5673 )
...
... and certain other changelog-related fixes
2019-07-12 17:27:07 +01:00
Richard van der Hoff
5f158ec039
Implement access token expiry ( #5660 )
...
Record how long an access token is valid for, and raise a soft-logout once it
expires.
2019-07-12 17:26:02 +01:00
Erik Johnston
db0a50bc40
Fixup docstrings
2019-07-12 16:59:59 +01:00
Andrew Morgan
24aa0e0a5b
fix typo: backgroud -> background
2019-07-12 15:29:40 +01:00
Richard van der Hoff
4c17a87606
fix changelog name
2019-07-12 11:47:24 +01:00
Ulrik Günther
d445b3ae57
Update reverse_proxy.rst ( #5397 )
...
Updates reverse_proxy.rst with information about nginx' URI normalisation.
2019-07-12 11:46:18 +01:00
Slavi Pantaleev
59f15309ca
Add missing space in default logging file format generated by the Docker image ( #5620 )
...
This adds a missing space, without which log lines appear uglier.
Signed-off-by: Slavi Pantaleev <slavi@devture.com >
2019-07-12 11:43:42 +01:00
Slavi Pantaleev
f369164761
Upgrade Alpine Linux used in the Docker image (3.8 -> 3.10) ( #5619 )
...
Alpine Linux 3.8 is still supported, but it seems like
it's quite outdated now.
While Python should be the same on both, all other libraries, etc.,
are much newer in Alpine 3.9 and 3.10.
Signed-off-by: Slavi Pantaleev <slavi@devture.com >
2019-07-12 11:38:25 +01:00
Richard van der Hoff
6bb0357c94
Add a mechanism for per-test configs ( #5657 )
...
It's useful to be able to tweak the homeserver config to be used for each
test. This PR adds a mechanism to do so.
2019-07-12 10:16:23 +01:00
Amber Brown
a83577d64f
Use /src for checking out synapse during sytests ( #5664 )
2019-07-11 23:43:41 +10:00
Lrizika
39e9839a04
Improved docs on setting up Postgresql ( #5661 )
...
Added that synapse_user needs a database to access before it can auth
Noted you'll need to enable password auth, linked to pg_hba.conf docs
2019-07-11 14:31:36 +01:00
Andrew Morgan
78a1cd36b5
small typo fix ( #5655 )
2019-07-11 13:33:23 +01:00
Richard van der Hoff
0a4001eba1
Clean up exception handling for access_tokens ( #5656 )
...
First of all, let's get rid of `TOKEN_NOT_FOUND_HTTP_STATUS`. It was a hack we
did at one point when it was possible to return either a 403 or a 401 if the
creds were missing. We always return a 401 in these cases now (thankfully), so
it's not needed.
Let's also stop abusing `AuthError` for these cases. Honestly they have nothing
that relates them to the other places that `AuthError` is used, other than the
fact that they are loosely under the 'Auth' banner. It makes no sense for them
to share exception classes.
Instead, let's add a couple of new exception classes: `InvalidClientTokenError`
and `MissingClientTokenError`, for the `M_UNKNOWN_TOKEN` and `M_MISSING_TOKEN`
cases respectively - and an `InvalidClientCredentialsError` base class for the
two of them.
2019-07-11 11:06:23 +01:00
Jorik Schellekens
38a6d3eea7
Add basic opentracing support ( #5544 )
...
* Configure and initialise tracer
Includes config options for the tracer and sets up JaegerClient.
* Scope manager using LogContexts
We piggy-back our tracer scopes by using log context.
The current log context gives us the current scope. If new scope is
created we create a stack of scopes in the context.
* jaeger is a dependency now
* Carrier inject and extraction for Twisted Headers
* Trace federation requests on the way in and out.
The span is created in _started_processing and closed in
_finished_processing because we need a meaningful log context.
* Create logcontext for new scope.
Instead of having a stack of scopes in a logcontext we create a new
context for a new scope if the current logcontext already has a scope.
* Remove scope from logcontext if logcontext is top level
* Disable tracer if not configured
* typo
* Remove dependence on jaeger internals
* bools
* Set service name
* :Explicitely state that the tracer is disabled
* Black is the new black
* Newsfile
* Code style
* Use the new config setup.
* Generate config.
* Copyright
* Rename config to opentracing
* Remove user whitelisting
* Empty whitelist by default
* User ConfigError instead of RuntimeError
* Use isinstance
* Use tag constants for opentracing.
* Remove debug comment and no need to explicitely record error
* Two errors a "s(c)entry"
* Docstrings!
* Remove debugging brainslip
* Homeserver Whitlisting
* Better opentracing config comment
* linting
* Inclue worker name in service_name
* Make opentracing an optional dependency
* Neater config retreival
* Clean up dummy tags
* Instantiate tracing as object instead of global class
* Inlcude opentracing as a homeserver member.
* Thread opentracing to the request level
* Reference opetnracing through hs
* Instantiate dummy opentracin g for tests.
* About to revert, just keeping the unfinished changes just in case
* Revert back to global state, commit number:
9ce4a3d9067bf9889b86c360c05ac88618b85c4f
* Use class level methods in tracerutils
* Start and stop requests spans in a place where we
have access to the authenticated entity
* Seen it, isort it
* Make sure to close the active span.
* I'm getting black and blue from this.
* Logger formatting
Co-Authored-By: Erik Johnston <erik@matrix.org >
* Outdated comment
* Import opentracing at the top
* Return a contextmanager
* Start tracing client requests from the servlet
* Return noop context manager if not tracing
* Explicitely say that these are federation requests
* Include servlet name in client requests
* Use context manager
* Move opentracing to logging/
* Seen it, isort it again!
* Ignore twisted return exceptions on context exit
* Escape the scope
* Scopes should be entered to make them useful.
* Nicer decorator names
* Just one init, init?
* Don't need to close something that isn't open
* Docs make you smarter
2019-07-11 10:36:03 +01:00
Richard van der Hoff
1890cfcf82
Inline issue_access_token ( #5659 )
...
this is only used in one place, so it's clearer if we inline it and reduce the
API surface.
Also, fixes a buglet where we would create an access token even if we were
about to block the user (we would never return the AT, so the user could never
use it, but it was still created and added to the db.)
2019-07-11 04:10:07 +10:00
Brendan Abolivier
8ab3444fdf
Merge pull request #5658 from matrix-org/babolivier/is-json
...
Send 3PID bind requests as JSON data
2019-07-10 17:01:26 +01:00
Richard van der Hoff
953dbb7980
Remove access-token support from RegistrationStore.register ( #5642 )
...
The 'token' param is no longer used anywhere except the tests, so let's kill
that off too.
2019-07-10 16:26:49 +01:00
Brendan Abolivier
b2a2e96ea6
Typo
2019-07-10 15:56:21 +01:00
Brendan Abolivier
351d9bd317
Rename changelog file
2019-07-10 15:48:50 +01:00
Brendan Abolivier
f77e997619
Send 3PID bind requests as JSON data
2019-07-10 15:46:42 +01:00
Andrew Morgan
f281714583
Don't bundle aggregations when retrieving the original event ( #5654 )
...
A fix for PR #5626 , which returned the original event content as part of a call to /relations.
Only problem was that we were attempting to aggregate the relations on top of it when we did so. We now set bundle_aggregations to False in the get_event call.
We also do this when pulling the relation events as well, because edits of edits are not something we'd like to support here.
2019-07-10 14:43:11 +01:00
Andrew Morgan
3dd61d12cd
Add a linting script ( #5627 )
...
Add a dev script to cover all the different linting steps.
2019-07-10 14:03:18 +01:00
Bruno Windels
4d122d295c
Correct pep517 flag in readme ( #5651 )
2019-07-10 13:55:24 +01:00
Brendan Abolivier
65434da75d
Merge pull request #5638 from matrix-org/babolivier/invite-json
...
Use JSON when querying the IS's /store-invite endpoint
2019-07-09 18:48:38 +01:00
Hubert Chathi
7b3bc755a3
remove unused and unnecessary check for FederationDeniedError ( #5645 )
...
FederationDeniedError is a subclass of SynapseError, which is a subclass of
CodeMessageException, so if e is a FederationDeniedError, then this check for
FederationDeniedError will never be reached since it will be caught by the
check for CodeMessageException above. The check for CodeMessageException does
almost the same thing as this check (since FederationDeniedError initialises
with code=403 and msg="Federation denied with %s."), so may as well just keep
allowing it to handle this case.
2019-07-09 18:37:39 +01:00
Andrew Morgan
d88421ab03
Include the original event in /relations ( #5626 )
...
When asking for the relations of an event, include the original event in the response. This will mostly be used for efficiently showing edit history, but could be useful in other circumstances.
2019-07-09 13:43:08 +01:00
Brendan Abolivier
af67c7c1de
Merge pull request #5644 from matrix-org/babolivier/profile-allow-self
...
Allow newly-registered users to lookup their own profiles
2019-07-09 10:25:40 +01:00
Richard van der Hoff
824707383b
Remove access-token support from RegistrationHandler.register ( #5641 )
...
Nothing uses this now, so we can remove the dead code, and clean up the
API.
Since we're changing the shape of the return value anyway, we take the
opportunity to give the method a better name.
2019-07-08 19:01:08 +01:00
Brendan Abolivier
73cb716b3c
Lint
2019-07-08 17:44:20 +01:00
Brendan Abolivier
5e01e9ac19
Add test case
2019-07-08 17:41:16 +01:00
Brendan Abolivier
f3615a8aa5
Changelog
2019-07-08 17:31:58 +01:00
Brendan Abolivier
7556851665
Allow newly-registered users to lookup their own profiles
...
When a user creates an account and the 'require_auth_for_profile_requests' config flag is set, and a client that performed the registration wants to lookup the newly-created profile, the request will be denied because the user doesn't share a room with themselves yet.
2019-07-08 17:31:00 +01:00
Richard van der Hoff
43d175d17a
Unblacklist some user_directory sytests ( #5637 )
...
Fixes https://github.com/matrix-org/synapse/issues/2306
2019-07-09 02:15:17 +10:00
Richard van der Hoff
b70e080b59
Better logging for auto-join. ( #5643 )
...
It was pretty unclear what was going on, so I've added a couple of log lines.
2019-07-08 17:14:51 +01:00
Brendan Abolivier
57eacee4f4
Merge branch 'develop' into babolivier/invite-json
2019-07-08 15:49:23 +01:00
Brendan Abolivier
c142e5d16a
Changelog
2019-07-08 15:28:38 +01:00
Richard van der Hoff
4b1f7febc7
Update ModuleApi to avoid register(generate_token=True) ( #5640 )
...
* Update ModuleApi to avoid register(generate_token=True)
This is the only place this is still used, so I'm trying to kill it off.
* changelog
2019-07-08 23:55:34 +10:00
Richard van der Hoff
f9e99f9534
Factor out some redundant code in the login impl ( #5639 )
...
* Factor out some redundant code in the login impl
Also fixes a redundant access_token which was generated during jwt login.
* changelog
2019-07-08 23:54:22 +10:00
Richard van der Hoff
1af2fcd492
Move get_or_create_user to test code ( #5628 )
...
This is only used in tests, so...
2019-07-08 23:52:26 +10:00
Brendan Abolivier
f05c7d62bc
Lint
2019-07-08 14:29:27 +01:00
Brendan Abolivier
1a807dfe68
Use application/json when querying the IS's /store-invite endpoint
2019-07-08 14:19:39 +01:00
Andrew Morgan
589d43d9cd
Add a few more common environment directory names to black exclusion ( #5630 )
...
* Add a few more common environment directory names to black exclusion
* Add changelog
2019-07-08 21:53:33 +10:00
J. Ryan Stinnett
9b1b79f3f5
Add default push rule to ignore reactions ( #5623 )
...
This adds a default push rule following the proposal in
[MSC2153](https://github.com/matrix-org/matrix-doc/pull/2153 ).
See also https://github.com/vector-im/riot-web/issues/10208
See also https://github.com/matrix-org/matrix-js-sdk/pull/976
2019-07-05 17:37:52 +01:00
Andrew Morgan
ad8b909ce9
Add origin_server_ts and sender fields to m.replace ( #5613 )
...
Riot team would like some extra fields as part of m.replace, so here you go.
Fixes : #5598
2019-07-05 17:20:02 +01:00
Richard van der Hoff
80cc82a445
Remove support for invite_3pid_guest. ( #5625 )
...
This has never been documented, and I'm not sure it's ever been used outside
sytest.
It's quite a lot of poorly-maintained code, so I'd like to get rid of it.
For now I haven't removed the database table; I suggest we leave that for a
future clearout.
2019-07-05 16:47:58 +01:00
Erik Johnston
b4f5416dd9
pep8
2019-07-05 14:41:29 +01:00
Erik Johnston
eadb13d2e9
Remove FileExfiltrationWriter
2019-07-05 14:15:00 +01:00
Erik Johnston
7f0d8e4288
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/admin_exfiltrate_data
2019-07-05 14:08:21 +01:00
Erik Johnston
9ccea16d45
Assume key existence. Update docstrings
2019-07-05 14:07:56 +01:00
Richard van der Hoff
a6a776f3d8
remove dead transaction persist code ( #5622 )
...
this hasn't done anything for years
2019-07-05 12:59:42 +01:00
Richard van der Hoff
9481707a52
Fixes to the federation rate limiter ( #5621 )
...
- Put the default window_size back to 1000ms (broken by #5181 )
- Make the `rc_federation` config actually do something
- fix an off-by-one error in the 'concurrent' limit
- Avoid creating an unused `_PerHostRatelimiter` object for every single
incoming request
2019-07-05 11:10:19 +01:00
Andrew Morgan
0e5434264f
Make errors about email password resets much clearer ( #5616 )
...
The runtime errors that dealt with local email password resets talked about config options that users may not even have in their config file yet (if upgrading). Instead, the cryptic errors are now replaced with hopefully much more helpful ones.
2019-07-05 10:44:12 +01:00
Amber Brown
1ee268d33d
Improve the backwards compatibility re-exports of synapse.logging.context ( #5617 )
...
* Improve the backwards compatibility re-exports of synapse.logging.context.
* reexport logformatter too
2019-07-05 02:32:02 +10:00
Andrew Morgan
ee91ac179c
Add a sytest blacklist file ( #5611 )
...
* Add a sytest blacklist file
* Add changelog
* Add blacklist to manifest
2019-07-05 01:24:13 +10:00
Erik Johnston
822a0f0435
Merge branch 'master' of github.com:matrix-org/synapse into develop
2019-07-04 14:00:27 +01:00
Erik Johnston
54283f3ed4
Update changelog
2019-07-04 11:55:07 +01:00
Erik Johnston
20332b278d
1.1.0
2019-07-04 11:44:09 +01:00
Erik Johnston
c061d4f237
Fixup from review comments.
2019-07-04 11:41:06 +01:00
Erik Johnston
f6608a8805
Merge pull request #5615 from matrix-org/anoa/fix_changelog_email_resets
...
Suggest people use a config file for Docker instead of env vars
2019-07-04 11:40:28 +01:00
Andrew Morgan
426854e7bc
Suggest people use a config file for Docker instead of env vars
2019-07-04 11:25:49 +01:00
Amber Brown
463b072b12
Move logging utilities out of the side drawer of util/ and into logging/ ( #5606 )
2019-07-04 00:07:04 +10:00
Erik Johnston
d0b849c86d
Apply comment fixups from code review
...
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2019-07-03 15:03:38 +01:00
Richard van der Hoff
cb8d568cf9
Fix 'utime went backwards' errors on daemonization. ( #5609 )
...
* Fix 'utime went backwards' errors on daemonization.
Fixes #5608
* remove spurious debug
2019-07-03 22:40:45 +10:00
Richard van der Hoff
463d5a8fde
1.1.0rc2
2019-07-03 10:51:47 +01:00
Richard van der Hoff
91753cae59
Fix a number of "Starting txn from sentinel context" warnings ( #5605 )
...
Fixes #5602 , #5603
2019-07-03 09:31:27 +01:00
Andrew Morgan
c7b48bd42d
Remove SMTP_* env var functionality from docker conf ( #5596 )
...
Removes any `SMTP_*` docker container environment variables from having any effect on the default config.
Fixes https://github.com/matrix-org/synapse/issues/5430
2019-07-03 07:14:48 +01:00
Amber Brown
0ee9076ffe
Fix media repo breaking ( #5593 )
2019-07-02 19:01:28 +01:00
Erik Johnston
10fe904d88
Newsfile
2019-07-02 17:21:27 +01:00
Erik Johnston
9f3c0a8556
Add basic admin cmd app
2019-07-02 17:12:48 +01:00
Erik Johnston
65dd5543f6
Newsfile
2019-07-02 12:10:23 +01:00
Erik Johnston
8ee69f299c
Add basic function to get all data for a user out of synapse
2019-07-02 12:09:04 +01:00
Richard van der Hoff
f8b52eb8c5
tweak changelog
2019-07-02 12:03:39 +01:00
Richard van der Hoff
7085e8c0fb
Merge remote-tracking branch 'origin/master' into release-v1.1.0
2019-07-02 11:56:17 +01:00
Richard van der Hoff
a0fa4641c4
prepare v1.1.0rc1
2019-07-02 11:51:55 +01:00
Richard van der Hoff
6eecb6e500
Complete the SAML2 implementation ( #5422 )
...
* SAML2 Improvements and redirect stuff
Signed-off-by: Alexander Trost <galexrt@googlemail.com >
* Code cleanups and simplifications.
Also: share the saml client between redirect and response handlers.
* changelog
* Revert redundant changes to static js
* Move all the saml stuff out to a centralised handler
* Add support for tracking SAML2 sessions.
This allows us to correctly handle `allow_unsolicited: False`.
* update sample config
* cleanups
* update sample config
* rename BaseSSORedirectServlet for consistency
* Address review comments
2019-07-02 11:18:11 +01:00
Erik Johnston
c3863ad6bf
Merge pull request #5587 from matrix-org/erikj/fix_synctl
...
Fix --no-daemonize flag for synctl
2019-07-02 11:17:55 +01:00
Erik Johnston
8134c49cad
Newsfile
2019-07-02 10:36:04 +01:00
Amir Zarrinkafsh
de8077a164
Add ability to set timezone for Docker container ( #5383 )
...
Signed-off-by: Amir Zarrinkafsh <nightah@me.com >
2019-07-02 10:31:06 +01:00
PauRE
948488e115
Fix JWT login with new users ( #5586 )
...
Signed-off-by: Pau Rodriguez-Estivill <prodrigestivill@gmail.com >
2019-07-02 10:25:37 +01:00
Erik Johnston
9ceb4f0889
Fix --no-daemonize flag for synctl
2019-07-02 10:14:38 +01:00
Amber Brown
b4914681a5
fix async/await consentresource ( #5585 )
...
Fixes #5582
2019-07-01 23:33:52 +10:00
Richard van der Hoff
b4fd86a9b4
Merge branch 'develop' into rav/saml2_client
2019-07-01 14:21:03 +01:00
Richard van der Hoff
3bcb13edd0
Address review comments
2019-07-01 12:13:22 +01:00
Erik Johnston
04196a4dae
Merge pull request #5507 from matrix-org/erikj/presence_sync_tighloop
...
Fix sync tightloop bug.
2019-07-01 11:43:10 +01:00
Erik Johnston
915280f1ed
Fixup comment
2019-07-01 10:22:42 +01:00
Amber Brown
f40a7dc41f
Make the http server handle coroutine-making REST servlets ( #5475 )
2019-06-29 17:06:55 +10:00
Brendan Abolivier
c7ff297dde
Merge pull request #5576 from matrix-org/babolivier/3pid-invite-ratelimit
...
Don't update the ratelimiter before sending a 3PID invite
2019-06-28 17:43:48 +01:00
Brendan Abolivier
15d9fc31bd
Only ratelimit when sending the email
...
If we do the opposite, an event can arrive after or while sending the email and the 3PID invite event will get ratelimited.
2019-06-28 16:04:05 +01:00
Brendan Abolivier
b339f6489f
Changelog
2019-06-28 15:24:59 +01:00
Brendan Abolivier
01d0f8e701
Don't update the ratelimiter before sending a 3PID invite
...
This would cause emails being sent, but Synapse responding with a 429 when creating the event. The client would then retry, and with bad timing the same scenario would happen again. Some testing I did ended up sending me 10 emails for one single invite because of this.
2019-06-28 15:22:16 +01:00
Amber Brown
071150ce19
Don't log GC 0s at INFO ( #5557 )
2019-06-28 21:45:33 +10:00
Amber Brown
be3b901ccd
Update the TLS cipher string and provide configurability for TLS on outgoing federation ( #5550 )
2019-06-28 18:19:09 +10:00
Daniel Hoffend
9646a593ac
Added possibilty to disable local password authentication ( #5092 )
...
Signed-off-by: Daniel Hoffend <dh@dotlan.net >
2019-06-27 18:37:29 +01:00
Silke Hofstra
457b8e4c4d
Include systemd-python in Debian package to allow logging to journal ( #5261 )
...
Signed-off-by: Silke Hofstra <silke@slxh.eu >
2019-06-27 18:26:41 +01:00
Andrew Morgan
c548dbc4b1
Make it clearer that the template dir is relative to synapse's root dir ( #5543 )
...
Helps address #5444
2019-06-27 18:20:17 +01:00
Erik Johnston
e79ec03165
Merge pull request #5559 from matrix-org/erikj/refactor_changed_devices
...
Refactor devices changed query to pull less from DB
2019-06-27 16:53:15 +01:00
Erik Johnston
729f5a4fb6
Review comments
2019-06-27 16:06:23 +01:00
Richard van der Hoff
555b6fa0d5
Docker image: Add a migrate_config mode ( #5567 )
...
... to help people escape env var hell
2019-06-27 13:52:40 +01:00
Richard van der Hoff
1ddc7b39c9
Docker image: open the non-TLS port by default. ( #5568 )
...
There's not much point in binding to localhost when it's in a docker container.
2019-06-27 13:50:10 +01:00
Richard van der Hoff
2f7ebc2a55
Deprecate the env var way of running the docker image ( #5566 )
...
This is mostly a documentation change, but also adds a default value for
SYNAPSE_CONFIG_PATH, so that running from the generated config is the default,
and will Just Work provided your config is in the right place.
2019-06-27 13:49:48 +01:00
PauRE
856ea04eb3
Fix JWT login ( #5555 )
...
* Fix JWT login with register
Signed-off-by: Pau Rodriguez-Estivill <prodrigestivill@gmail.com >
* Add pyjwt conditional dependency
Signed-off-by: Pau Rodriguez-Estivill <prodrigestivill@gmail.com >
* Added changelog file
Signed-off-by: Pau Rodriguez-Estivill <prodrigestivill@gmail.com >
* Improved changelog description
Signed-off-by: Pau Rodriguez-Estivill <prodrigestivill@gmail.com >
2019-06-27 12:02:41 +01:00
Richard van der Hoff
b4db70e167
Merge pull request #5565 from matrix-org/rav/docker/fix_log_config
...
Docker: generate our own log config
2019-06-27 11:19:37 +01:00
Richard van der Hoff
b2d2617c0d
Reduce the amount of stuff we send in the docker context ( #5564 )
...
this makes docker builds a bit faster.
2019-06-27 11:18:51 +01:00
Richard van der Hoff
b1b8a24b63
Merge pull request #5563 from matrix-org/rav/docker/data_dir
...
Docker image: add support for SYNAPSE_DATA_DIR parameter
2019-06-27 11:17:44 +01:00
Richard van der Hoff
53faa6a429
Merge pull request #5562 from matrix-org/rav/docker/no-generate-keys
...
Docker: only run --generate-keys when generating config on-the-fly.
2019-06-27 11:17:21 +01:00
Richard van der Hoff
02aeb5a98a
Merge pull request #5561 from matrix-org/rav/docker/refactor
...
Refactor the docker/start.py script
2019-06-27 11:16:37 +01:00
Richard van der Hoff
42a3619ef4
Merge pull request #5570 from almereyda/patch-2
...
Update purge_api README
2019-06-27 00:58:17 +01:00
Richard van der Hoff
a11475f396
fix changelog
2019-06-27 00:57:59 +01:00
Richard van der Hoff
47fa836abb
Merge pull request #5313 from twrist/patch-1
...
Update HAProxy example rules
2019-06-27 00:53:48 +01:00
Richard van der Hoff
79b9d9076d
rename BaseSSORedirectServlet for consistency
2019-06-27 00:46:57 +01:00
Richard van der Hoff
dde4118341
update sample config
2019-06-27 00:41:04 +01:00
Richard van der Hoff
28db0ae537
cleanups
2019-06-27 00:37:41 +01:00
Richard van der Hoff
a0acfcc73e
update sample config
2019-06-26 23:56:28 +01:00
Richard van der Hoff
36f4953dec
Add support for tracking SAML2 sessions.
...
This allows us to correctly handle `allow_unsolicited: False`.
2019-06-26 23:50:55 +01:00
jon r
536820e572
Create 5570.misc
...
Signed-off-by: Jon Richter <jon@allmende.io >
2019-06-27 00:13:34 +02:00
jon r
db56383b24
Update purge_api README
...
This points the reverse links at the intended location.
2019-06-27 00:08:18 +02:00
Richard van der Hoff
3705322103
Move all the saml stuff out to a centralised handler
2019-06-26 22:52:02 +01:00
Richard van der Hoff
0ade403f55
Revert redundant changes to static js
2019-06-26 22:46:23 +01:00
Richard van der Hoff
a4daa899ec
Merge branch 'develop' into rav/saml2_client
2019-06-26 22:34:41 +01:00
Erik Johnston
82028d723b
Move changelog
2019-06-26 19:39:49 +01:00
Erik Johnston
8624db3194
Refactor and comment sync device list code
2019-06-26 19:39:49 +01:00
Erik Johnston
f335e77d53
Use batch_iter and correct docstring
2019-06-26 19:39:46 +01:00
Erik Johnston
806a06daf2
Rename get_users_whose_devices_changed
2019-06-26 19:39:19 +01:00
Richard van der Hoff
b051cefc75
Merge pull request #5552 from matrix-org/rav/github_templates
...
Update github templates
2019-06-26 16:15:41 +01:00
Richard van der Hoff
befa116b31
changelog
2019-06-26 15:52:00 +01:00
Richard van der Hoff
28e30c6581
Docker: generate our own log config
...
When running under docker, we want to use docker's own logging stuff rather
than losing the logs somewhere on the container's filesystem, so let's use log
configs that spit logs out to stdout instead.
2019-06-26 15:48:38 +01:00
Richard van der Hoff
6347dc1bed
Add support for SYNAPSE_CONFIG_DIR
2019-06-26 15:48:38 +01:00
Richard van der Hoff
a0f2921ccf
changelog
2019-06-26 15:41:10 +01:00
Richard van der Hoff
7e433beb65
Docker image: add support for SYNAPSE_DATA_DIR parameter
...
Fixes #4830 .
2019-06-26 15:38:08 +01:00
Richard van der Hoff
c58a6e6108
document supported env vars for docker 'generate' option
2019-06-26 15:38:08 +01:00
Richard van der Hoff
7c453472e4
changelog
2019-06-26 15:32:55 +01:00
Richard van der Hoff
a5fba9c27c
Docker: only run --generate-keys when generating config on-the-fly.
...
We don't want to generate any missing configs when running from a precanned
config.
(There's a strong argument that we don't want to do this at all, since
generating a new signing key on each invocation sounds disasterous, but I don't
fancy unpicking that for now.)
2019-06-26 15:31:19 +01:00
Richard van der Hoff
a1732bbff9
improve logging for generate_config_from_template
2019-06-26 15:31:19 +01:00
Richard van der Hoff
043ab6da13
changelog
2019-06-26 15:28:28 +01:00
Richard van der Hoff
2d91988799
Improve docs on choosing server_name ( #5558 )
...
Fixes #4901
2019-06-26 15:15:04 +01:00
Erik Johnston
508c3ce3d7
Newsfile
2019-06-26 12:03:49 +01:00
Erik Johnston
a2f6d31a63
Refactor get_user_ids_changed to pull less from DB
...
When a client asks for users whose devices have changed since a token we
used to pull *all* users from the database since the token, which could
easily be thousands of rows for old tokens.
This PR changes this to only check for changes for users the client is
actually interested in.
Fixes #5553
2019-06-26 12:03:44 +01:00
Amber Brown
0e97284dfa
Remove & changelog ( #5548 )
2019-06-26 04:36:34 +10:00
Andrew Morgan
3eb8c7b0eb
Merge branch 'master' into develop
...
* master:
Fix broken link in MSC1711 FAQ
Update changelog to better expain password reset change (#5545 )
2019-06-25 18:08:56 +01:00
Andrew Morgan
52a4a90d05
Merge branch 'release-v1.0.0'
...
* release-v1.0.0:
Update changelog to better expain password reset change (#5545 )
2019-06-25 18:08:41 +01:00
Richard van der Hoff
5375c3a9b8
isort
2019-06-25 15:30:19 +01:00
Richard van der Hoff
3f24e4dce7
Add a main() function
2019-06-25 15:30:19 +01:00
Richard van der Hoff
b1fddb7f69
Factor out a run_generate_config function
2019-06-25 15:30:19 +01:00
Richard van der Hoff
a52e1a3b6c
Factor out "generate_config_from_template"
...
... and inline generate_secrets
2019-06-25 15:30:19 +01:00
Andrew Morgan
ef8c62758c
Prevent multiple upgrades on the same room at once ( #5051 )
...
Closes #4583
Does slightly less than #5045 , which prevented a room from being upgraded multiple times, one after another. This PR still allows that, but just prevents two from happening at the same time.
Mostly just to mitigate the fact that servers are slow and it can take a moment for the room upgrade to actually complete. We don't want people sending another request to upgrade the room when really they just thought the first didn't go through.
2019-06-25 14:19:21 +01:00
Richard van der Hoff
c8cb186260
Fix broken link in MSC1711 FAQ
2019-06-25 12:27:56 +01:00
Richard van der Hoff
a5222b386e
changelog
2019-06-25 12:24:47 +01:00
Richard van der Hoff
62e361a90f
Update github templates
2019-06-25 12:24:30 +01:00
Richard van der Hoff
1c4a38e377
Update SUPPORT.md
2019-06-25 12:24:23 +01:00
Richard van der Hoff
6fa36c22fa
Merge branch 'develop' of github.com:matrix-org/synapse into develop
2019-06-25 12:21:32 +01:00
Richard van der Hoff
a47f012501
Grafana dashboard updates
2019-06-25 11:51:51 +01:00
Richard van der Hoff
abd334d27b
Add extremities graphs to grafana dashboard
2019-06-25 11:51:32 +01:00
Richard van der Hoff
dd1c722a39
format json for grafana dashboard
2019-06-25 08:59:19 +01:00
Richard van der Hoff
fe2d876e2a
Increase default log level for docker image to INFO. ( #5547 )
...
Fixes #3370 .
2019-06-25 14:38:38 +10:00
Richard van der Hoff
f817fc9ad5
Update docker image to use Python 3.7. ( #5546 )
...
Python 3.7 is apparently faster than 3.6, and should be mature enough.
2019-06-25 14:20:53 +10:00
Andrew Morgan
78c00ad3ff
Update changelog to better expain password reset change ( #5545 )
...
Updates the v1.0.0 changelog to provide more information to those upgrading to v1.0 on why they may receive errors or find their password reset abilities have now been disabled.
Helps address #5444
2019-06-24 17:52:15 +01:00
Andrew Morgan
28604ab03d
Add info about black to code_style.rst ( #5537 )
...
Fixes #5533
Adds information about how to install and run black on the codebase.
2019-06-24 17:48:05 +01:00
Richard van der Hoff
4ac7ef4b67
Merge pull request #5524 from matrix-org/rav/new_cmdline_options
...
Add --data-dir and --open-private-ports options.
2019-06-24 17:25:57 +01:00
Richard van der Hoff
af8a962905
Merge pull request #5523 from matrix-org/rav/arg_defaults
...
Stop conflating generated config and default config
2019-06-24 17:24:35 +01:00
Richard van der Hoff
e59a8cd2e5
Merge pull request #5499 from matrix-org/rav/cleanup_metrics
...
Cleanups and sanity-checking in cpu and db metrics
2019-06-24 17:12:54 +01:00
Brendan Abolivier
deb4fe6ef3
Merge pull request #5534 from matrix-org/babolivier/federation-publicrooms
...
Split public rooms directory auth config in two
2019-06-24 16:08:02 +01:00
Brendan Abolivier
bfe84e051e
Split public rooms directory auth config in two
2019-06-24 15:42:31 +01:00
Erik Johnston
25433f212d
Merge pull request #5531 from matrix-org/erikj/workers_pagination_token
...
Fix /messages on workers when no from param specified.
2019-06-24 15:30:10 +01:00
Richard van der Hoff
e6b2ccbb51
changelog
2019-06-24 14:15:34 +01:00
Richard van der Hoff
3f8a252dd8
Add "--open-private-ports" cmdline option
...
This is helpful when generating a config file for running synapse under docker.
2019-06-24 14:15:34 +01:00
Richard van der Hoff
6a92b06cbb
Add --data-directory commandline argument
...
We don't necessarily want to put the data in the cwd.
2019-06-24 14:15:34 +01:00
Richard van der Hoff
c783294549
changelog
2019-06-24 14:14:52 +01:00
Richard van der Hoff
16b52642e2
Don't load the generated config as the default.
...
It's too confusing.
2019-06-24 14:14:52 +01:00
Richard van der Hoff
7c2f8881a9
Ensure that all config options have sensible defaults
...
This will enable us to skip the unintuitive behaviour where the generated
config and default config are the same thing.
2019-06-24 14:14:52 +01:00
Richard van der Hoff
cf7aef1114
Merge pull request #5516 from matrix-org/rav/acme_key_path
...
Allow configuration of the path used for ACME account keys.
2019-06-24 14:14:20 +01:00
Richard van der Hoff
5d9c101551
changelog
2019-06-24 13:51:22 +01:00
Richard van der Hoff
367a8263b3
Remove unused Config.config_dir_path attribute
...
This is no longer used and only serves to confuse.
2019-06-24 13:51:22 +01:00
Richard van der Hoff
edea4bb5be
Allow configuration of the path used for ACME account keys.
...
Because sticking it in the same place as the config isn't necessarily the right
thing to do.
2019-06-24 13:51:22 +01:00
Richard van der Hoff
c3c6b00d95
Pass config_dir_path and data_dir_path into Config.read_config. ( #5522 )
...
* Pull config_dir_path and data_dir_path calculation out of read_config_files
* Pass config_dir_path and data_dir_path into read_config
2019-06-24 11:34:45 +01:00
Richard van der Hoff
21bf4318b5
Factor acme bits out to a separate file ( #5521 )
...
This makes some of the conditional-import hoop-jumping easier.
2019-06-24 11:33:56 +01:00
Richard van der Hoff
1793de6c6d
black
2019-06-24 11:16:13 +01:00
Erik Johnston
14aff5cc0d
Newsfile
2019-06-24 10:22:34 +01:00
Erik Johnston
dddf20e8e1
Fix /messages on workers when no from param specified.
...
If no `from` param is specified we calculate and use the "current
token" that inlcuded typing, presence, etc. These are unused during
pagination and are not available on workers, so we simply don't
calculate them.
2019-06-24 10:06:51 +01:00
Richard van der Hoff
dc94773e60
Avoid raising exceptions in metrics
...
Sentry will catch the errors if they happen, so that should be good enough, and
woun't make things explode if we hit the error condition.
2019-06-24 10:01:16 +01:00
Richard van der Hoff
5097aee740
Merge branch 'develop' into rav/cleanup_metrics
2019-06-24 10:00:13 +01:00
Richard van der Hoff
c753c098dd
Merge pull request #5498 from matrix-org/rav/fix_clock_reversal
...
Use monotonic clock where possible for metrics
2019-06-24 09:55:12 +01:00
Richard van der Hoff
6cda36777b
Drop support for cpu_affinity ( #5525 )
...
This has no useful purpose on python3, and is generally a source of confusion.
2019-06-22 11:01:55 +10:00
Richard van der Hoff
e1a795758c
Improve help and cmdline option names for --generate-config options ( #5512 )
...
* group the arguments together into a group
* add new names "--generate-missing-config" and "--config-directory" for
existing cmdline options "--generate-keys" and "--keys-dir", which better
reflect their purposes.
2019-06-21 18:50:43 +01:00
Richard van der Hoff
03cea2b0fe
Refactor Config parser and add some comments. ( #5511 )
...
Add some comments, and simplify `read_config_files`.
2019-06-21 17:43:38 +01:00
Richard van der Hoff
37933a3bf8
Improve logging when generating config files ( #5510 )
...
Make it a bit clearer what's going on.
2019-06-21 17:14:56 +01:00
Andrew Morgan
5d6644efe0
Only import jinja2 when needed ( #5514 )
...
Fixes https://github.com/matrix-org/synapse/issues/5431
`jinja2` was being imported even when it wasn't strictly necessary. This made it required to run Synapse, even if the functionality that required it wasn't enabled. This was causing new Synapse installations to crash on startup.
Email modules are now required.
2019-06-21 16:52:09 +01:00
Richard van der Hoff
0e8b35f7b0
Fix "Unexpected entry in 'full_schemas'" log warning ( #5509 )
...
There is a README.txt which always sets off this warning, which is a bit
alarming when you first start synapse. I don't think we need to warn about
this.
2019-06-21 15:11:57 +01:00
Richard van der Hoff
2f8491daef
Fix logging error when a tampered event is detected. ( #5500 )
2019-06-21 15:11:42 +01:00
Erik Johnston
8fecb5fcbf
Merge pull request #5513 from matrix-org/erikj/fix_messages_token
...
Fix /messages on worker when no token supplied
2019-06-21 14:36:03 +01:00
Erik Johnston
2b0bde935a
Newsfile
2019-06-21 14:16:03 +01:00
Erik Johnston
7eadb74056
Fix /messages on worker when no token supplied
2019-06-21 14:15:59 +01:00
Erik Johnston
5f8a612af1
Merge pull request #5505 from matrix-org/erikj/messages_worker
...
Support pagination API in client_reader worker
2019-06-21 13:20:46 +01:00
Erik Johnston
60b912cf0d
Update docs/workers.rst
...
E_TOO_MANY_NEGATIVES
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2019-06-21 11:54:03 +01:00
Erik Johnston
8d452e0ca5
Newsfile
2019-06-21 11:13:13 +01:00
Erik Johnston
8181e290a9
Fix sync tightloop bug.
...
If, for some reason, presence updates take a while to persist then it
can trigger clients to tightloop calling `/sync` due to the presence
handler returning updates but not advancing the stream token.
Fixes #5503 .
2019-06-21 11:10:27 +01:00
Erik Johnston
626a26dbb8
Newsfile
2019-06-21 10:46:11 +01:00
Erik Johnston
f3ab533374
Support pagination API in client_reader worker
2019-06-21 10:43:12 +01:00
Erik Johnston
7456698241
Merge pull request #5476 from matrix-org/erikj/histogram_extremities
...
Add metrics for length of new extremities persisted.
2019-06-21 09:58:54 +01:00
Neil Johnson
f47969f42a
Improve email notification logging ( #5502 )
2019-06-20 15:14:26 +01:00
Erik Johnston
f8bd30af2a
Black
2019-06-20 13:10:06 +01:00
Erik Johnston
45f28a9d2f
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/histogram_extremities
2019-06-20 11:59:14 +01:00
Amber Brown
32e7c9e7f2
Run Black. ( #5482 )
2019-06-20 19:32:02 +10:00
Richard van der Hoff
ae4d97bf05
changelog
2019-06-19 21:18:38 +01:00
Richard van der Hoff
fe641df770
Sanity-checking for metrics updates
...
Check that our clocks go forward.
2019-06-19 21:18:38 +01:00
Richard van der Hoff
f682af052d
Simplify PerformanceCounters.update interface
...
we already have the duration for the update, so may as well use it rather than
passing extra params around and recalculating it.
2019-06-19 21:18:38 +01:00
Richard van der Hoff
68128d5626
Remove unused _get_event_counters
...
This has been redundant since cdb3757942 .
2019-06-19 21:14:25 +01:00
Richard van der Hoff
15bf32e062
Use monotonic clock where possible for metrics
...
Fixes intermittent errors observed on Apple hardware which were caused by
time.clock() appearing to go backwards when called from different threads.
Also fixes a bug where database activity times were logged as 1/1000 of their
correct ratio due to confusion between milliseconds and seconds.
2019-06-19 21:09:43 +01:00
Erik Johnston
7dcf984075
Merge pull request #5042 from matrix-org/erikj/fix_get_missing_events_error
...
Handle the case of `get_missing_events` failing
2019-06-19 13:20:09 +01:00
Erik Johnston
e0be8d7016
Merge pull request #5480 from matrix-org/erikj/extremities_dummy_events
...
Add experimental option to reduce extremities.
2019-06-19 13:19:18 +01:00
Erik Johnston
65787b0f7c
Add descriptions and remove redundant set(..)
2019-06-19 11:49:39 +01:00
Richard van der Hoff
ceb2fa60a5
Merge pull request #5490 from matrix-org/rav/xmlsec_in_docker
...
Include xmlsec in the docker image
2019-06-19 11:33:06 +01:00
Erik Johnston
554609288b
Run as background process and fix comments
2019-06-19 11:33:03 +01:00
Brendan Abolivier
10f9e35b43
Merge pull request #5493 from matrix-org/babolivier/deactivate_bg_job_typo
...
Fix typo in deactivation background job
2019-06-19 11:32:38 +01:00
Brendan Abolivier
092e36457a
Fix typo in deactivation background job
2019-06-19 11:09:41 +01:00
Richard van der Hoff
8fcd2ca907
Merge pull request #4276 from Ralith/performance-advice
...
Improve advice regarding poor performance
2019-06-18 23:29:58 +01:00
David Baker
f2d2ae03da
Add some logging to 3pid invite sig verification ( #5015 )
...
I had to add quite a lot of logging to diagnose a problem with 3pid
invites - we only logged the one failure which isn't all that
informative.
NB. I'm not convinced the logic of this loop is right: I think it
should just accept a single valid signature from a trusted source
rather than fail if *any* signature is invalid. Also it should
probably not skip the rest of middle loop if a check fails? However,
I'm deliberately not changing the logic here.
2019-06-18 22:51:24 +01:00
Richard van der Hoff
b093cfb02c
changelog
2019-06-18 22:36:40 +01:00
Richard van der Hoff
8e7ef3a023
Include xmlsec in the docker image
...
Fixes #5467 .
2019-06-18 22:35:19 +01:00
Richard van der Hoff
b36de88066
README.rst: fix header level
2019-06-18 18:32:51 +01:00
Erik Johnston
2b20d0fb59
Fix logline
2019-06-18 16:12:53 +01:00
Erik Johnston
19b80fe68a
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/fix_get_missing_events_error
2019-06-18 16:11:43 +01:00
Erik Johnston
fc51e21326
Newsfile
2019-06-18 15:03:12 +01:00
Erik Johnston
b42f90470f
Add experimental option to reduce extremities.
...
Adds new config option `cleanup_extremities_with_dummy_events` which
periodically sends dummy events to rooms with more than 10 extremities.
THIS IS REALLY EXPERIMENTAL.
2019-06-18 15:02:18 +01:00
Erik Johnston
16a3124b76
Only count non-cache state resolution
2019-06-18 13:02:06 +01:00
Erik Johnston
c9385dd238
Use consistent buckets
2019-06-18 12:43:41 +01:00
cclauss
82d9d524bd
Fix seven contrib files with Python syntax errors ( #5446 )
...
* Fix seven contrib files with Python syntax errors
Signed-off-by: cclauss <cclauss@me.com >
2019-06-18 03:21:30 +10:00
Brendan Abolivier
d6328e03fd
Merge pull request #5477 from matrix-org/babolivier/third_party_rules_3pid
...
Add third party rules hook for 3PID invites
2019-06-17 18:08:31 +01:00
Brendan Abolivier
33ea87be39
Make check_threepid_can_be_invited async
2019-06-17 17:39:38 +01:00
Brendan Abolivier
9ce4220d6c
Changelog
2019-06-17 17:39:09 +01:00
Brendan Abolivier
112cf5a73a
Add third party rules hook for 3PID invites
2019-06-17 17:39:09 +01:00
Erik Johnston
8353ddd951
Merge pull request #5479 from matrix-org/erikj/add_create_room_hook_develop
...
Add third party rules hook into create room
2019-06-17 17:30:05 +01:00
Jorik Schellekens
160c52d0d4
Merge pull request #5478 from matrix-org/joriks/demo_python3
...
Joriks/demo python3
2019-06-17 17:13:01 +01:00
Erik Johnston
4c4877bbc1
Newsfile
2019-06-17 17:02:53 +01:00
Erik Johnston
ff88d36dcb
Add metric fo number of state groups in resolution
2019-06-17 17:02:53 +01:00
Erik Johnston
499d4a32cd
Add metrics for len of new extremities persisted.
...
Of new events being persisted add metrics for total size of forward
extremities and number of unchanged, "stale" extremities.
2019-06-17 17:02:48 +01:00
Jorik Schellekens
25d16fea78
Changelog
2019-06-17 16:50:31 +01:00
Erik Johnston
187d2837a9
Add third party rules hook into create room
2019-06-17 16:41:19 +01:00
Erik Johnston
2d6308a043
Newsfile
2019-06-17 16:41:19 +01:00
Jorik Schellekens
839f9b9231
One shot demo server startup
...
Configure the demo servers to use untrusted
tls certs so that they communicate with each other.
This configuration makes them very unsafe so I've added warnings about
it in the readme.
2019-06-17 16:24:28 +01:00
Amber Brown
eba7caf09f
Remove Postgres 9.4 support ( #5448 )
2019-06-18 00:59:00 +10:00
Erik Johnston
6840ebeef8
Merge pull request #5385 from matrix-org/erikj/reduce_http_exceptions
...
Handle HttpResponseException when using federation client.
2019-06-17 13:54:47 +01:00
Erik Johnston
dd927b29e1
Merge pull request #5388 from matrix-org/erikj/fix_email_push
...
Fix email notifications for unnamed rooms with multiple people
2019-06-17 13:54:35 +01:00
Erik Johnston
414d2ca3a6
Merge pull request #5389 from matrix-org/erikj/renew_attestations_on_master
...
Only start background group attestation renewals on master
2019-06-17 13:54:29 +01:00
Amber Brown
97d7e4c7b7
Move SyTest to Buildkite ( #5459 )
...
Including workers!
2019-06-17 21:08:15 +10:00
Erik Johnston
a9dab970b8
Merge pull request #5464 from matrix-org/erikj/3pid_remote_invite_state
...
Fix 3PID invite room state over federation.
2019-06-17 10:18:28 +01:00
Brendan Abolivier
f12e1f029c
Merge pull request #5440 from matrix-org/babolivier/third_party_event_rules
...
Allow server admins to define implementations of extra rules for allowing or denying incoming events
2019-06-14 19:37:59 +01:00
Erik Johnston
9ca4ae7131
Merge pull request #5461 from matrix-org/erikj/histograms_are_cumalitive
...
Prometheus histograms are cumalative
2019-06-14 18:21:42 +01:00
Brendan Abolivier
f874b16b2e
Add plugin APIs for implementations of custom event rules.
2019-06-14 18:16:03 +01:00
Brendan Abolivier
14db086428
Merge pull request #5465 from matrix-org/babolivier/fix_deactivation_bg_job
...
Fix background job for deactivated flag
2019-06-14 18:12:56 +01:00
Brendan Abolivier
5cec6d1845
Fix changelog
2019-06-14 17:18:21 +01:00
Brendan Abolivier
4024520ff8
Changelog
2019-06-14 16:38:44 +01:00
Erik Johnston
3c9bb86fde
Newsfile
2019-06-14 16:19:11 +01:00
Erik Johnston
304a1376c2
Fix 3PID invite room state over federation.
...
Fixes that when a user exchanges a 3PID invite for a proper invite over
federation it does not include the `invite_room_state` key.
This was due to synapse incorrectly sending out two invite requests.
2019-06-14 16:19:11 +01:00
Brendan Abolivier
e0b77b004d
Fix background job for deactivated flag
2019-06-14 16:00:45 +01:00
Brendan Abolivier
9b14a810d2
Merge pull request #5462 from matrix-org/babolivier/account_validity_deactivated_accounts_2
...
Don't send renewal emails to deactivated users (second attempt)
2019-06-14 15:35:31 +01:00
Jorik Schellekens
1e7864c929
Merge pull request #5460 from matrix-org/joriks/demo_python3
...
Use python3 in the demo
2019-06-14 15:23:57 +01:00
Brendan Abolivier
6d56a694f4
Don't send renewal emails to deactivated users
2019-06-14 15:05:56 +01:00
Erik Johnston
e9344e0dee
Merge pull request #5390 from matrix-org/erikj/dont_log_on_fail_to_get_file
...
Don't log exception when failing to fetch remote content.
2019-06-14 14:25:14 +01:00
Erik Johnston
9fd4f83f1a
Newsfile
2019-06-14 14:19:37 +01:00
Jorik Schellekens
cc7cc853b1
Changelog
2019-06-14 14:07:47 +01:00
Erik Johnston
3ed595e327
Prometheus histograms are cumalative
2019-06-14 14:07:32 +01:00
Brendan Abolivier
d0530382ee
Track deactivated accounts in the database ( #5378 )
2019-06-14 13:18:24 +01:00
Jorik Schellekens
d8db29c481
Use python3 in the demo
2019-06-14 13:03:46 +01:00
Erik Johnston
f03f8b7f4c
Merge pull request #5458 from matrix-org/hawkowl/fix-prometheus
...
Fix Prometheus erroring after the extremities monitoring
2019-06-14 12:59:02 +01:00
Amber H. Brown
b2a6f90a67
changelog
2019-06-14 21:10:21 +10:00
Amber H. Brown
a10c8dae85
fix prometheus rendering error
2019-06-14 21:09:33 +10:00
Neil Johnson
4f68188d0b
Change to absolute path for contrib/docker
...
because this file is reproduced on dockerhub and relative paths don't work
2019-06-13 16:42:36 +01:00
Richard van der Hoff
b59a4eba64
Updates to the federation_client script ( #5447 )
...
* py3 fixes for federation_client
* .well-known support for federation_client
2019-06-13 14:49:25 +01:00
Richard van der Hoff
5c15039e06
Clean up code for sending federation EDUs. ( #5381 )
...
This code confused the hell out of me today. Split _get_new_device_messages
into its two (unrelated) parts.
2019-06-13 13:52:08 +01:00
Amber Brown
6312d6cc7c
Expose statistics on extrems to prometheus ( #5384 )
2019-06-13 22:40:52 +10:00
Amber Brown
09e9a26b71
Remove Python 2.7 support. ( #5425 )
...
* remove 2.7 from CI and publishing
* fill out classifiers and also make it not be installed on 3.5
* some minor bumps so that the old deps work on python 3.5
2019-06-12 21:31:59 +10:00
Erik Johnston
7e68691ce9
Merge branch 'master' of github.com:matrix-org/synapse into develop
2019-06-11 17:25:16 +01:00
Erik Johnston
97174780ce
1.0.0
2019-06-11 17:10:01 +01:00
Erik Johnston
9532eb55ec
Merge pull request #5424 from matrix-org/erikj/change_password_reset_links
...
Change password reset links to /_matrix.
2019-06-11 13:29:42 +01:00
Erik Johnston
a766c41d25
Bump bleach version so that tests can run on old deps.
2019-06-11 12:34:18 +01:00
Neil Johnson
426218323b
Neilj/improve federation docs ( #5419 )
...
Add FAQ questions to federate.md. Add a health warning making it clear that the 1711 upgrade FAQ is now out of date.
2019-06-11 12:17:43 +01:00
Erik Johnston
453aaaadc0
Newsfile
2019-06-11 11:34:38 +01:00
Erik Johnston
10383e6e6f
Change password reset links to /_matrix.
2019-06-11 11:34:33 +01:00
Erik Johnston
5bc9484537
Merge branch 'release-v1.0.0' of github.com:matrix-org/synapse into develop
2019-06-11 10:37:43 +01:00
Richard van der Hoff
880005c3b7
changelog
2019-06-11 00:40:31 +01:00
Richard van der Hoff
b55e8840e4
Merge tag 'v1.0.0rc3' into rav/saml2_client
...
Synapse 1.0.0rc3 (2019-06-10)
=============================
Security: Fix authentication bug introduced in 1.0.0rc1. Please upgrade to rc3 immediately
2019-06-11 00:28:57 +01:00
Andrew Morgan
2ddc13577c
Don't warn user about password reset disabling through config code ( #5387 )
...
Moves the warning about password resets being disabled to the point where a user actually tries to reset their password. Is this an appropriate place for it to happen?
Also removed the disabling of msisdn password resets when you don't have an email config, as that just doesn't make sense.
Also change the error a user receives upon disabled passwords to specify that only email-based password reset is disabled.
2019-06-11 00:25:07 +01:00
Erik Johnston
6bac9ca6d7
1.0.0rc3
2019-06-11 00:13:02 +01:00
Richard van der Hoff
426049247b
Code cleanups and simplifications.
...
Also: share the saml client between redirect and response handlers.
2019-06-11 00:03:57 +01:00
Neil Johnson
94dac0f3e5
add monthly active users to phonehome stats ( #5252 )
...
* add monthly active users to phonehome stats
2019-06-10 23:33:59 +01:00
Erik Johnston
49e01e5710
Fix defaults on checking threepids
2019-06-10 23:09:31 +01:00
Richard van der Hoff
69a43d9974
Merge remote-tracking branch 'origin/develop' into rav/saml2_client
2019-06-10 20:28:08 +01:00
Erik Johnston
78e74ab8a1
Merge pull request #5418 from matrix-org/erikj/fix_send_fed_with_limit_zero
...
Fix bug sending federation transactions with lots of EDUs
2019-06-10 20:19:49 +01:00
Erik Johnston
abce00fc6a
Merge branch 'release-v1.0.0' of github.com:matrix-org/synapse into develop
2019-06-10 18:33:55 +01:00
Erik Johnston
0167447965
1.0.0rc2
2019-06-10 18:17:43 +01:00
Erik Johnston
a6b1817940
Merge pull request #5417 from matrix-org/rav/shared_ssl_context
...
Share an SSL context object between SSL connections
2019-06-10 18:16:12 +01:00
Richard van der Hoff
db74c4fc6c
fix ci on py2, again
2019-06-10 17:55:01 +01:00
Richard van der Hoff
81b8fdedf2
rename gutwrenched attr
2019-06-10 17:51:11 +01:00
Richard van der Hoff
19780a521e
fix CI on python 2.7
2019-06-10 17:41:10 +01:00
Erik Johnston
48748c00c4
Update changelog.d/5418.bugfix
...
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2019-06-10 16:28:45 +01:00
Erik Johnston
1fb6f68616
Newsfile
2019-06-10 16:26:36 +01:00
Richard van der Hoff
8d0bd9bb60
fix build fails
2019-06-10 16:23:39 +01:00
Erik Johnston
c413540fb9
Fix bug sending federation transactions with lots of EDUs
...
If we try and send a transaction with lots of EDUs and we run out of
space, we call get_new_device_msgs_for_remote with a limit of 0, which
then failed.
2019-06-10 16:22:45 +01:00
Richard van der Hoff
e016681221
Tests for SSL certs for federation connections
...
Add some tests for bad certificates for federation and .well-known connections
2019-06-10 16:14:20 +01:00
Richard van der Hoff
efe7b3176e
Fix federation connections to literal IP addresses
...
turns out we need a shiny version of service_identity to enforce this
correctly.
2019-06-10 15:58:35 +01:00
Erik Johnston
0382b0ffee
Merge pull request #5415 from matrix-org/erikj/fix_null_valid_until_ms
...
Fix key verification when key stored with null valid_until_ms
2019-06-10 15:56:36 +01:00
Erik Johnston
8da0d83a54
Merge branch 'erikj/fix_null_valid_until_ms' of github.com:matrix-org/synapse into release-v1.0.0
2019-06-10 15:56:28 +01:00
Richard van der Hoff
d11c634ced
clean up impl, and import idna directly
2019-06-10 15:55:12 +01:00
Erik Johnston
9bc7768ad3
Newsfile
2019-06-10 15:37:10 +01:00
Erik Johnston
43badd2cd4
Fix key verification when key stored with null valid_until_ms
...
Some keys are stored in the synapse database with a null valid_until_ms
which caused an exception to be thrown when using that key. We fix this
by treating nulls as zeroes, i.e. they keys will match verification
requests with a minimum_valid_until_ms of zero (i.e. don't validate ts)
but will not match requests with a non-zero minimum_valid_until_ms.
Fixes #5391 .
2019-06-10 15:37:10 +01:00
Erik Johnston
6d1e699b5c
Merge pull request #5412 from SohamG/fix-4130
...
Add --no-daemonize option to synctl
2019-06-10 15:09:49 +01:00
sohamg
ca7abb129c
Accidentally reversed pep8 fixed before, fixed now
2019-06-10 19:09:14 +05:30
sohamg
12f49b22ec
Edited description to note that the arg will not work with daemonize set in the config.
2019-06-10 18:47:35 +05:30
sohamg
0afcbc65cb
Resolved pep8 extra spacing issue
2019-06-10 18:28:20 +05:30
Brendan Abolivier
843dd714cb
Merge pull request #5325 from matrix-org/babolivier/port_db_account_validity
...
Add account_validity's email_sent column to the list of boolean columns in synapse_port_db
2019-06-10 13:51:46 +01:00
sohamg
b56a224e22
Added changelog file.
2019-06-10 17:54:29 +05:30
sohamg
ab157e61a2
- Fix https://github.com/matrix-org/synapse/issues/4130
...
- Add parser argument "--no-daemonize"
Signed-off-by: sohamg <sohamg2@gmail.com >
2019-06-10 17:41:48 +05:30
Brendan Abolivier
26b62796c2
Merge pull request #5363 from matrix-org/babolivier/account_validity_send_mail_auth
...
Don't check whether the user's account is expired on /send_mail requests
2019-06-10 11:57:02 +01:00
Brendan Abolivier
028f674cd3
Better wording
2019-06-10 11:35:54 +01:00
Brendan Abolivier
4914a88829
Doc
2019-06-10 11:34:45 +01:00
Richard van der Hoff
88d7182ada
Improve startup checks for insecure notary configs ( #5392 )
...
It's not really a problem to trust notary responses signed by the old key so
long as we are also doing TLS validation.
This commit adds a check to the config parsing code at startup to check that
we do not have the insecure matrix.org key without tls validation, and refuses
to start without it.
This allows us to remove the rather alarming-looking warning which happens at
runtime.
2019-06-10 10:33:00 +01:00
Benjamin Saunders
047486a384
Improve advice regarding poor performance
...
Signed-off-by: Benjamin Saunders <ben.e.saunders@gmail.com >
2019-06-09 15:20:28 -07:00
Richard van der Hoff
c2b6e945e1
Share an SSL context object between SSL connections
...
This involves changing how the info callbacks work.
2019-06-09 14:01:32 +01:00
Andrew Morgan
2decc92e2f
Liberapay is now officially recognised, update FUNDING.yml ( #5386 )
2019-06-09 02:20:23 +01:00
Erik Johnston
5009d988da
Newsfile
2019-06-07 12:39:12 +01:00
Erik Johnston
95d38afe96
Don't log exception when failing to fetch remote content.
...
In particular, let's not log stack traces when we stop processing
becuase the response body was too large.
2019-06-07 12:39:10 +01:00
Erik Johnston
2cca90dd40
Newsfile
2019-06-07 12:26:59 +01:00
Erik Johnston
837340bdce
Only start background group attestation renewals on master
2019-06-07 12:25:06 +01:00
Erik Johnston
a099926fcc
Newsfile
2019-06-07 12:15:33 +01:00
Erik Johnston
2ebeda48b2
Add test
2019-06-07 12:15:33 +01:00
Erik Johnston
8182a1cfb5
Refactor email tests
2019-06-07 12:15:33 +01:00
Erik Johnston
928d1ccd73
Fix email notifications for large unnamed rooms.
...
When we try and calculate a description for a room for with no name but
multiple other users we threw an exception (due to trying to subscript
result of `dict.values()`).
2019-06-07 12:15:28 +01:00
Erik Johnston
6745b7de6d
Handle failing to talk to master over replication
2019-06-07 10:47:31 +01:00
Neil Johnson
8dc1eb6697
Merge tag 'v1.0.0rc1' into develop
...
Synapse 1.0.0rc1 (2019-06-07)
=============================
Features
--------
- Synapse now more efficiently collates room statistics. ([\#4338](https://github.com/matrix-org/synapse/issues/4338 ), [\#5260](https://github.com/matrix-org/synapse/issues/5260 ), [\#5324](https://github.com/matrix-org/synapse/issues/5324 ))
- Add experimental support for relations (aka reactions and edits). ([\#5220](https://github.com/matrix-org/synapse/issues/5220 ))
- Ability to configure default room version. ([\#5223](https://github.com/matrix-org/synapse/issues/5223 ), [\#5249](https://github.com/matrix-org/synapse/issues/5249 ))
- Allow configuring a range for the account validity startup job. ([\#5276](https://github.com/matrix-org/synapse/issues/5276 ))
- CAS login will now hit the r0 API, not the deprecated v1 one. ([\#5286](https://github.com/matrix-org/synapse/issues/5286 ))
- Validate federation server TLS certificates by default (implements [MSC1711](https://github.com/matrix-org/matrix-doc/blob/master/proposals/1711-x509-for-federation.md )). ([\#5359](https://github.com/matrix-org/synapse/issues/5359 ))
- Update /_matrix/client/versions to reference support for r0.5.0. ([\#5360](https://github.com/matrix-org/synapse/issues/5360 ))
- Add a script to generate new signing-key files. ([\#5361](https://github.com/matrix-org/synapse/issues/5361 ))
- Update upgrade and installation guides ahead of 1.0. ([\#5371](https://github.com/matrix-org/synapse/issues/5371 ))
- Replace the `perspectives` configuration section with `trusted_key_servers`, and make validating the signatures on responses optional (since TLS will do this job for us). ([\#5374](https://github.com/matrix-org/synapse/issues/5374 ))
- Add ability to perform password reset via email without trusting the identity server. ([\#5377](https://github.com/matrix-org/synapse/issues/5377 ))
- Set default room version to v4. ([\#5379](https://github.com/matrix-org/synapse/issues/5379 ))
Bugfixes
--------
- Fixes client-server API not sending "m.heroes" to lazy-load /sync requests when a rooms name or its canonical alias are empty. Thanks to @dnaf for this work! ([\#5089](https://github.com/matrix-org/synapse/issues/5089 ))
- Prevent federation device list updates breaking when processing multiple updates at once. ([\#5156](https://github.com/matrix-org/synapse/issues/5156 ))
- Fix worker registration bug caused by ClientReaderSlavedStore being unable to see get_profileinfo. ([\#5200](https://github.com/matrix-org/synapse/issues/5200 ))
- Fix race when backfilling in rooms with worker mode. ([\#5221](https://github.com/matrix-org/synapse/issues/5221 ))
- Fix appservice timestamp massaging. ([\#5233](https://github.com/matrix-org/synapse/issues/5233 ))
- Ensure that server_keys fetched via a notary server are correctly signed. ([\#5251](https://github.com/matrix-org/synapse/issues/5251 ))
- Show the correct error when logging out and access token is missing. ([\#5256](https://github.com/matrix-org/synapse/issues/5256 ))
- Fix error code when there is an invalid parameter on /_matrix/client/r0/publicRooms ([\#5257](https://github.com/matrix-org/synapse/issues/5257 ))
- Fix error when downloading thumbnail with missing width/height parameter. ([\#5258](https://github.com/matrix-org/synapse/issues/5258 ))
- Fix schema update for account validity. ([\#5268](https://github.com/matrix-org/synapse/issues/5268 ))
- Fix bug where we leaked extremities when we soft failed events, leading to performance degradation. ([\#5274](https://github.com/matrix-org/synapse/issues/5274 ), [\#5278](https://github.com/matrix-org/synapse/issues/5278 ), [\#5291](https://github.com/matrix-org/synapse/issues/5291 ))
- Fix "db txn 'update_presence' from sentinel context" log messages. ([\#5275](https://github.com/matrix-org/synapse/issues/5275 ))
- Fix dropped logcontexts during high outbound traffic. ([\#5277](https://github.com/matrix-org/synapse/issues/5277 ))
- Fix a bug where it is not possible to get events in the federation format with the request `GET /_matrix/client/r0/rooms/{roomId}/messages`. ([\#5293](https://github.com/matrix-org/synapse/issues/5293 ))
- Fix performance problems with the rooms stats background update. ([\#5294](https://github.com/matrix-org/synapse/issues/5294 ))
- Fix noisy 'no key for server' logs. ([\#5300](https://github.com/matrix-org/synapse/issues/5300 ))
- Fix bug where a notary server would sometimes forget old keys. ([\#5307](https://github.com/matrix-org/synapse/issues/5307 ))
- Prevent users from setting huge displaynames and avatar URLs. ([\#5309](https://github.com/matrix-org/synapse/issues/5309 ))
- Fix handling of failures when processing incoming events where calling `/event_auth` on remote server fails. ([\#5317](https://github.com/matrix-org/synapse/issues/5317 ))
- Ensure that we have an up-to-date copy of the signing key when validating incoming federation requests. ([\#5321](https://github.com/matrix-org/synapse/issues/5321 ))
- Fix various problems which made the signing-key notary server time out for some requests. ([\#5333](https://github.com/matrix-org/synapse/issues/5333 ))
- Fix bug which would make certain operations (such as room joins) block for 20 minutes while attemoting to fetch verification keys. ([\#5334](https://github.com/matrix-org/synapse/issues/5334 ))
- Fix a bug where we could rapidly mark a server as unreachable even though it was only down for a few minutes. ([\#5335](https://github.com/matrix-org/synapse/issues/5335 ), [\#5340](https://github.com/matrix-org/synapse/issues/5340 ))
- Fix a bug where account validity renewal emails could only be sent when email notifs were enabled. ([\#5341](https://github.com/matrix-org/synapse/issues/5341 ))
- Fix failure when fetching batches of events during backfill, etc. ([\#5342](https://github.com/matrix-org/synapse/issues/5342 ))
- Add a new room version where the timestamps on events are checked against the validity periods on signing keys. ([\#5348](https://github.com/matrix-org/synapse/issues/5348 ), [\#5354](https://github.com/matrix-org/synapse/issues/5354 ))
- Fix room stats and presence background updates to correctly handle missing events. ([\#5352](https://github.com/matrix-org/synapse/issues/5352 ))
- Include left members in room summaries' heroes. ([\#5355](https://github.com/matrix-org/synapse/issues/5355 ))
- Fix `federation_custom_ca_list` configuration option. ([\#5362](https://github.com/matrix-org/synapse/issues/5362 ))
- Fix missing logcontext warnings on shutdown. ([\#5369](https://github.com/matrix-org/synapse/issues/5369 ))
Improved Documentation
----------------------
- Fix docs on resetting the user directory. ([\#5282](https://github.com/matrix-org/synapse/issues/5282 ))
- Fix notes about ACME in the MSC1711 faq. ([\#5357](https://github.com/matrix-org/synapse/issues/5357 ))
Internal Changes
----------------
- Synapse will now serve the experimental "room complexity" API endpoint. ([\#5216](https://github.com/matrix-org/synapse/issues/5216 ))
- The base classes for the v1 and v2_alpha REST APIs have been unified. ([\#5226](https://github.com/matrix-org/synapse/issues/5226 ), [\#5328](https://github.com/matrix-org/synapse/issues/5328 ))
- Simplifications and comments in do_auth. ([\#5227](https://github.com/matrix-org/synapse/issues/5227 ))
- Remove urllib3 pin as requests 2.22.0 has been released supporting urllib3 1.25.2. ([\#5230](https://github.com/matrix-org/synapse/issues/5230 ))
- Preparatory work for key-validity features. ([\#5232](https://github.com/matrix-org/synapse/issues/5232 ), [\#5234](https://github.com/matrix-org/synapse/issues/5234 ), [\#5235](https://github.com/matrix-org/synapse/issues/5235 ), [\#5236](https://github.com/matrix-org/synapse/issues/5236 ), [\#5237](https://github.com/matrix-org/synapse/issues/5237 ), [\#5244](https://github.com/matrix-org/synapse/issues/5244 ), [\#5250](https://github.com/matrix-org/synapse/issues/5250 ), [\#5296](https://github.com/matrix-org/synapse/issues/5296 ), [\#5299](https://github.com/matrix-org/synapse/issues/5299 ), [\#5343](https://github.com/matrix-org/synapse/issues/5343 ), [\#5347](https://github.com/matrix-org/synapse/issues/5347 ), [\#5356](https://github.com/matrix-org/synapse/issues/5356 ))
- Specify the type of reCAPTCHA key to use. ([\#5283](https://github.com/matrix-org/synapse/issues/5283 ))
- Improve sample config for monthly active user blocking. ([\#5284](https://github.com/matrix-org/synapse/issues/5284 ))
- Remove spurious debug from MatrixFederationHttpClient.get_json. ([\#5287](https://github.com/matrix-org/synapse/issues/5287 ))
- Improve logging for logcontext leaks. ([\#5288](https://github.com/matrix-org/synapse/issues/5288 ))
- Clarify that the admin change password API logs the user out. ([\#5303](https://github.com/matrix-org/synapse/issues/5303 ))
- New installs will now use the v54 full schema, rather than the full schema v14 and applying incremental updates to v54. ([\#5320](https://github.com/matrix-org/synapse/issues/5320 ))
- Improve docstrings on MatrixFederationClient. ([\#5332](https://github.com/matrix-org/synapse/issues/5332 ))
- Clean up FederationClient.get_events for clarity. ([\#5344](https://github.com/matrix-org/synapse/issues/5344 ))
- Various improvements to debug logging. ([\#5353](https://github.com/matrix-org/synapse/issues/5353 ))
- Don't run CI build checks until sample config check has passed. ([\#5370](https://github.com/matrix-org/synapse/issues/5370 ))
- Automatically retry buildkite builds (max twice) when an agent is lost. ([\#5380](https://github.com/matrix-org/synapse/issues/5380 ))
2019-06-07 10:37:34 +01:00
Erik Johnston
a2419b27fe
Newsfile
2019-06-07 10:31:53 +01:00
Andrew Morgan
8e0cee90d2
Add a sponsor button ( #5382 )
...
Add a sponsor button with links to matrixdotorg's patreon and liberapay accounts.
2019-06-07 10:31:48 +01:00
Erik Johnston
a46ef1e3a4
Handle HttpResponseException when using federation client.
...
Otherwise we just log exceptions everywhere.
2019-06-07 10:29:35 +01:00
Neil Johnson
7c455a86bc
1.0.0rc1
2019-06-07 10:29:32 +01:00
Andrew Morgan
4f581faa98
Automatically retry builds when a buildkite agent is lost ( #5380 )
...
Sometimes the build agents get lost or die (error codes -1 and 2). Retry automatically a maximum of 2 times if this happens.
Error code reference:
* -1: Agent was lost
* 0: Build successful
* 1: There was an error in your code
* 2: The build stopped abruptly
* 255: The build was cancelled
2019-06-07 00:20:17 +01:00
Andrew Morgan
2d1d7b7e6f
Prevent multiple device list updates from breaking a batch send ( #5156 )
...
fixes #5153
2019-06-06 23:54:00 +01:00
Neil Johnson
a11865016e
Set default room version to v4. ( #5379 )
...
Set default room version to v4.
2019-06-06 20:13:47 +01:00
Erik Johnston
1b8cb64393
Merge pull request #5320 from matrix-org/hawkowl/full-schema-v1
...
Make a full SQL schema
2019-06-06 18:35:38 +01:00
Neil Johnson
8acde3dc47
remove bloat
2019-06-06 18:00:06 +01:00
Amber H. Brown
ed872db8df
fix maybe
2019-06-07 02:53:47 +10:00
Andrew Morgan
3719680ee4
Add ability to perform password reset via email without trusting the identity server ( #5377 )
...
Sends password reset emails from the homeserver instead of proxying to the identity server. This is now the default behaviour for security reasons. If you wish to continue proxying password reset requests to the identity server you must now enable the email.trust_identity_server_for_password_resets option.
This PR is a culmination of 3 smaller PRs which have each been separately reviewed:
* #5308
* #5345
* #5368
2019-06-06 17:34:07 +01:00
Richard van der Hoff
9fbb20a531
Stop hardcoding trust of old matrix.org key ( #5374 )
...
There are a few changes going on here:
* We make checking the signature on a key server response optional: if no
verify_keys are specified, we trust to TLS to validate the connection.
* We change the default config so that it does not require responses to be
signed by the old key.
* We replace the old 'perspectives' config with 'trusted_key_servers', which
is also formatted slightly differently.
* We emit a warning to the logs every time we trust a key server response
signed by the old key.
2019-06-06 17:33:11 +01:00
Neil Johnson
833c406b9b
Neilj/1.0 upgrade notes ( #5371 )
...
1.0 upgrade/install notes
2019-06-06 17:23:02 +01:00
Amber H. Brown
837e32ef55
just user dir?
2019-06-07 01:49:25 +10:00
Andrew Morgan
f868c8df03
Regen sample config before kicking off agents ( #5370 )
...
* Regen sample config before kicking off agents
* Add changelog
2019-06-06 16:36:28 +01:00
Amber H. Brown
3b6645d3bf
remove background updates that arent needed
2019-06-07 01:20:58 +10:00
Richard van der Hoff
71063a69b8
Fix missing logcontext for PresenceHandler.on_shutdown. ( #5369 )
...
Fixes some warnings, and a scary-looking stacktrace when sytest kills the
process.
2019-06-06 14:45:17 +01:00
Erik Johnston
89d3d7b2c0
Merge pull request #5221 from matrix-org/erikj/fix_worker_sytest
...
Fix get_max_topological_token to never return None
2019-06-06 13:54:46 +01:00
Brendan Abolivier
8f06344e11
Merge pull request #5089 from dnaf/m-heroes-empty-room-name
...
Make /sync return heroes if room name or canonical alias are empty
2019-06-06 11:18:13 +01:00
Erik Johnston
7f08a3523a
Better words
2019-06-06 11:09:38 +01:00
Richard van der Hoff
cb3b381fcb
Merge pull request #5359 from matrix-org/rav/enable_tls_verification
...
Validate federation server TLS certificates by default.
2019-06-06 10:50:42 +01:00
Richard van der Hoff
42555bc18b
Merge pull request #5361 from matrix-org/rav/generate_signing_key
...
add a script to generate new signing_key files
2019-06-06 10:50:22 +01:00
Brendan Abolivier
7898a1a48d
Add credit in the changelog
2019-06-06 10:34:33 +01:00
Brendan Abolivier
64fa928792
Simplify condition
2019-06-06 10:34:12 +01:00
Brendan Abolivier
b9c43c8463
Merge pull request #5355 from matrix-org/babolivier/heroes_left_members
...
Include left members in room summaries' heroes
2019-06-06 10:05:27 +01:00
Richard van der Hoff
99d3497949
Merge pull request #5354 from matrix-org/rav/server_keys/99-room-v5
...
Implement room v5 which enforces signing key validity
2019-06-06 09:42:13 +01:00
Richard van der Hoff
2eb47e5ee7
Merge pull request #5353 from matrix-org/rav/verify_key_logging
...
Associate a request_name with each verify request, for logging
2019-06-06 09:33:09 +01:00
Richard van der Hoff
a39be79216
Merge pull request #5362 from matrix-org/rav/fix_custom_ca
...
Fix `federation_custom_ca_list` configuration option.
2019-06-05 22:54:41 +01:00
Amber Brown
6362e3af14
add more comments
2019-06-06 04:20:35 +10:00
Brendan Abolivier
ccbc9e5e17
Gah towncrier
2019-06-05 16:41:26 +01:00
Brendan Abolivier
d51ca9d9b3
Changelog
2019-06-05 16:38:51 +01:00
Brendan Abolivier
fe13bd52ac
Don't check whether the user's account is expired on /send_mail requests
2019-06-05 16:35:05 +01:00
Richard van der Hoff
7603a706eb
Merge branch 'rav/fix_custom_ca' into rav/enable_tls_verification
2019-06-05 16:32:35 +01:00
Richard van der Hoff
f8a45302c9
Fix federation_custom_ca_list configuration option.
...
Previously, setting this option would cause an exception at startup.
2019-06-05 16:19:07 +01:00
Neil Johnson
94f6c674df
Neilj/add r0.5 to versions ( #5360 )
...
* Update _matrix/client/versions to reference support for r0.5.0
2019-06-05 16:11:31 +01:00
Erik Johnston
75538813fc
Fix background updates to handle redactions/rejections ( #5352 )
...
* Fix background updates to handle redactions/rejections
In background updates based on current state delta stream we need to
handle that we may not have all the events (or at least that
`get_events` may raise an exception).
2019-06-06 00:45:46 +10:00
Richard van der Hoff
fb98c05e03
add a script to generate new signing_key files
2019-06-05 15:33:02 +01:00
Richard van der Hoff
b4f1cd31f4
Update sample config
2019-06-05 15:30:10 +01:00
Richard van der Hoff
95ab2eb4a1
Fix notes about well-known and acme ( #5357 )
...
fixes #4951
2019-06-05 15:12:33 +01:00
Richard van der Hoff
e2dfb922e1
Validate federation server TLS certificates by default.
2019-06-05 14:17:50 +01:00
Brendan Abolivier
0a2f522644
Simplify condition
2019-06-05 14:02:29 +01:00
Erik Johnston
d53faa40e9
Merge pull request #5317 from matrix-org/erikj/make_do_auth_non_essential
...
Fix handling of failures when calling /event_auth.
2019-06-05 14:01:32 +01:00
Brendan Abolivier
a4cf2c1184
Rewrite changelog
2019-06-05 14:00:18 +01:00
Neil Johnson
4650526b5e
Neilj/changelog clean up ( #5356 )
...
* group together key validity refactors
2019-06-05 13:47:03 +01:00
Brendan Abolivier
40596aec0e
Merge branch 'develop' into m-heroes-empty-room-name
2019-06-05 13:38:01 +01:00
Neil Johnson
26713515de
Neilj/mau tracking config explainer ( #5284 )
...
Improve documentation of monthly active user blocking and mau_trial_days
2019-06-05 13:16:23 +01:00
Brendan Abolivier
804f26a9ff
Properly format the changelog
2019-06-05 12:03:01 +01:00
Brendan Abolivier
a412be2bc7
Changelog
2019-06-05 11:53:50 +01:00
Brendan Abolivier
dbbaf25dd3
Do user_id != me checks before deciding whether we should pick heroes from the joined members or the parted ones
2019-06-05 11:50:27 +01:00
Erik Johnston
bc3d6b918b
Add logging when request fails and clarify we ignore errors.
2019-06-05 11:37:51 +01:00
Richard van der Hoff
d18e4ea0d4
Implement room v5 which enforces signing key validity
...
Implements [MSC2077](https://github.com/matrix-org/matrix-doc/pull/2077 ) and
fixes #5247 and #4364 .
2019-06-05 11:00:47 +01:00
Richard van der Hoff
cea9750d11
Associate a request_name with each verify request, for logging
...
Also:
* rename VerifyKeyRequest->VerifyJsonRequest
* calculate key_ids on VerifyJsonRequest construction
* refactor things to pass around VerifyJsonRequests instead of 4-tuples
2019-06-05 10:46:26 +01:00
Richard van der Hoff
14f13babb0
Add a test room version where we enforce key validity ( #5348 )
2019-06-05 10:38:25 +01:00
Richard van der Hoff
2615c6bd9e
Clean up debug logging ( #5347 )
...
Remove some spurious stuff, clarify some other stuff
2019-06-05 10:35:40 +01:00
Richard van der Hoff
016af01598
Rename VerifyKeyRequest.deferred field ( #5343 )
...
it's a bit confusing
2019-06-05 10:35:13 +01:00
Richard van der Hoff
aa530e6800
Call RetryLimiter correctly ( #5340 )
...
Fixes a regression introduced in #5335 .
2019-06-04 22:02:53 +01:00
Richard van der Hoff
dae224a73f
Fix failure to fetch batches of PDUs ( #5342 )
...
FederationClient.get_pdu is called in a loop to fetch a batch of PDUs. A
failure to fetch one should not result in a failure of the whole batch. Add the
missing `continue`.
2019-06-04 18:05:06 +01:00
Richard van der Hoff
b4189b112f
Rename get_events->get_events_from_store_or_dest ( #5344 )
...
We have too many things called get_event, and it's hard to figure out what we
mean. Also remove some unused params from the signature, and add some logging.
2019-06-04 18:01:09 +01:00
Brendan Abolivier
f6dd12d1e2
Merge pull request #5341 from matrix-org/babolivier/email_config
...
Make account validity renewal emails work when email notifs are disabled
2019-06-04 14:49:06 +01:00
Brendan Abolivier
2f62e1f6ff
Only parse from email if provided
2019-06-04 14:24:36 +01:00
Erik Johnston
d1d38081a7
Merge pull request #5324 from matrix-org/erikj/ignore_null
...
Ignore room state with null bytes in for room stats
2019-06-04 14:20:08 +01:00
Brendan Abolivier
1cc5fc1f6c
Lint
2019-06-04 13:51:23 +01:00
Brendan Abolivier
ac3cc32367
Make account validity renewal emails work when email notifs are disabled
2019-06-04 13:47:44 +01:00
Richard van der Hoff
df9c100542
Avoid rapidly backing-off a server if we ignore the retry interval ( #5335 )
2019-06-04 11:53:29 +01:00
Richard van der Hoff
4d08b8f30c
Don't do long retries when calling the key notary server. ( #5334 )
...
It takes at least 20 minutes to work through the long_retries schedule (11
attempts, each with a 60 second timeout, and 60 seconds between each request),
so if the notary server isn't returning within the timeout, we'll just end up
blocking whatever request is happening for 20 minutes.
Ain't nobody got time for that.
2019-06-04 11:53:07 +01:00
Richard van der Hoff
cb683d3e3c
Merge pull request #5333 from matrix-org/rav/server_keys/09_improve_notary_server
...
Fixes for the key-notary server
2019-06-04 11:48:18 +01:00
Richard van der Hoff
5bdb189f86
Improve docstrings on MatrixFederationClient. ( #5332 )
2019-06-04 11:14:16 +01:00
Brendan Abolivier
aeb2263320
Merge branch 'develop' into babolivier/port_db_account_validity
2019-06-04 09:13:42 +01:00
Amber Brown
b2b90b7d34
Hawkowl/fix missing auth ( #5328 )
2019-06-04 15:54:27 +10:00
Richard van der Hoff
a3f2d000e0
changelog
2019-06-04 00:16:56 +01:00
Richard van der Hoff
c5d60eadd5
Notary server: make requests to origins in parallel
...
... else we're guaranteed to time out.
2019-06-04 00:16:56 +01:00
Richard van der Hoff
def5ea4062
Don't bomb out on direct key fetches as soon as one fails
2019-06-04 00:16:56 +01:00
Richard van der Hoff
dce6e9e0c1
Avoid rapidly backing-off a server if we ignore the retry interval
2019-06-03 23:58:42 +01:00
Richard van der Hoff
06a1f3e207
Reduce timeout for outbound /key/v2/server requests.
2019-06-03 23:17:38 +01:00
Richard van der Hoff
fec2dcb1a5
Enforce validity period on server_keys for fed requests. ( #5321 )
...
When handling incoming federation requests, make sure that we have an
up-to-date copy of the signing key.
We do not yet enforce the validity period for event signatures.
2019-06-03 22:59:51 +01:00
Erik Johnston
0a56966f7d
Fix
2019-06-03 17:42:52 +01:00
Erik Johnston
0d67a8cd9d
Newsfile
2019-06-03 17:17:57 +01:00
Erik Johnston
fe2294ec8d
Revert "Newsfile"
...
This reverts commit 4bd67db100 .
2019-06-03 17:17:35 +01:00
Brendan Abolivier
deca87ddf2
Changelog
2019-06-03 17:11:28 +01:00
Erik Johnston
4bd67db100
Newsfile
2019-06-03 17:08:33 +01:00
Erik Johnston
fa4b54aca5
Ignore room state with null bytes in for room stats
2019-06-03 17:06:54 +01:00
Brendan Abolivier
83827c4922
Add account_validity's email_sent column to the list of boolean columns in synapse_port_db
...
Fixes #5306
2019-06-03 17:06:47 +01:00
Amber Brown
6f9f08005c
Merge remote-tracking branch 'origin/develop' into hawkowl/full-schema-v1
2019-06-04 01:16:01 +10:00
Amber Brown
2198b7ce2a
add stuff in bg updates
2019-06-04 01:06:00 +10:00
Amber Brown
4e75c5e02a
WHY IS THIS CALLED A SLIGHTLY DIFFERENT THING
2019-06-03 22:42:12 +10:00
Amber Brown
ed6138461b
more fix
2019-06-03 22:29:19 +10:00
Amber Brown
be452fc9ac
more fix
2019-06-03 22:24:23 +10:00
Amber Brown
7f81b967ca
fix schemas
2019-06-03 22:23:40 +10:00
Richard van der Hoff
862b2f9ad5
Merge pull request #5307 from matrix-org/rav/server_keys/07-fix-notary-cache-poison
...
Stop overwriting server keys with other keys
2019-06-03 13:19:20 +01:00
Amber Brown
dc72b90cd6
full schema
2019-06-03 22:03:28 +10:00
Amber Brown
37057d5d60
prepare
2019-06-03 22:02:47 +10:00
Amber Brown
2889b05554
Unify v1 and v2 REST client APIs ( #5226 )
2019-06-03 21:28:59 +10:00
Erik Johnston
fde37e4e98
Newsfile
2019-06-03 10:22:03 +01:00
Erik Johnston
220a733d73
Fix handling of failures when calling /event_auth.
...
When processing an incoming event over federation, we may try and
resolve any unexpected differences in auth events. This is a
non-essential process and so should not stop the processing of the event
if it fails (e.g. due to the remote disappearing or not implementing the
necessary endpoints).
Fixes #3330
2019-06-03 09:56:45 +01:00
Alexander Trost
dc3e586938
SAML2 Improvements and redirect stuff
...
Signed-off-by: Alexander Trost <galexrt@googlemail.com >
2019-06-02 18:14:40 +02:00
Ike Johnson
0df5b41759
Create 5313.misc
2019-06-02 23:23:58 +08:00
Ike Johnson
145f57897d
Update HAProxy example rules
...
These new rules allow a user to instead route only matrix traffic, allowing them to run matrix on the domain without affecting their existing websites
2019-06-02 23:10:27 +08:00
Richard van der Hoff
d828d1dc57
Merge pull request #5309 from matrix-org/rav/limit_displayname_length
...
Limit displaynames and avatar URLs
2019-06-01 11:34:50 +01:00
Richard van der Hoff
93003aa172
add some tests
2019-06-01 11:14:37 +01:00
Richard van der Hoff
d16c6375fe
Limit displaynames and avatar URLs
...
These end up in join events everywhere, so let's limit them.
Fixes #5079
2019-06-01 10:44:36 +01:00
Richard van der Hoff
37b165620d
Merge pull request #5299 from matrix-org/rav/server_keys/05-rewrite-gsvk-again
...
Rewrite get_server_verify_keys, again.
2019-05-31 17:07:31 +01:00
Richard van der Hoff
3600f5568b
Stop overwriting server keys with other keys
...
Fix a bug where we would discard a key result which the origin server is no
longer returning. Fixes #5305 .
2019-05-31 15:58:35 +01:00
Erik Johnston
58cce39f3a
Merge pull request #5276 from matrix-org/babolivier/account_validity_job_delta
...
Allow configuring a range for the account validity startup job
2019-05-31 12:11:56 +01:00
Richard van der Hoff
c605da97bf
Merge remote-tracking branch 'origin/develop' into rav/server_keys/05-rewrite-gsvk-again
2019-05-31 11:38:13 +01:00
Richard van der Hoff
fe79b5e521
Merge pull request #5300 from matrix-org/rav/server_keys/06-fix-serverkeys-handling
...
Remove some pointless exception handling
2019-05-31 11:35:29 +01:00
Richard van der Hoff
2ae3cc287e
Merge pull request #5296 from matrix-org/rav/server_keys/04-use-attrs-for_verify-request
...
use attr.s for VerifyKeyRequest
2019-05-31 11:34:09 +01:00
Brendan Abolivier
e975b15101
Sample config
2019-05-31 11:14:21 +01:00
Brendan Abolivier
4d794dae21
Move delta from +10% to -10%
2019-05-31 11:09:39 +01:00
Erik Johnston
e9981d58ca
Merge pull request #5293 from Kagamihime/messages-federation-format
...
Fix ignored filter field in `/messages` endpoint
2019-05-31 10:52:59 +01:00
Erik Johnston
31d44ec4bd
Merge pull request #5294 from matrix-org/erikj/speed_up_room_stats
...
Speed up room stats background update
2019-05-31 10:48:51 +01:00
Erik Johnston
39bbf6a4a5
Newsfile
2019-05-31 10:26:59 +01:00
Erik Johnston
5037326d66
Add indices. Remove room_ids accidentally added
...
We have to do this by re-inserting a background update and recreating
tables, as the tables only get created during a background update and
will later be deleted.
We also make sure that we remove any entries that should have been
removed but weren't due to a race that has been fixed in a previous
commit.
2019-05-31 10:26:56 +01:00
Brendan Abolivier
6bfc5ad3a1
Sample config
2019-05-31 09:56:57 +01:00
Brendan Abolivier
0c2362861e
Gah python
2019-05-31 09:56:52 +01:00
Brendan Abolivier
847b9dcd1c
Make max_delta equal to period * 10%
2019-05-31 09:54:46 +01:00
Travis Ralston
3e1af5109c
Clarify that the admin change password endpoint logs them out ( #5303 )
2019-05-31 09:45:46 +01:00
Richard van der Hoff
8ea2f756a9
Remove some pointless exception handling
...
The verify_request deferred already returns a suitable SynapseError, so I don't
really know what we expect to achieve by doing more wrapping, other than log
spam.
Fixes #4278 .
2019-05-30 18:29:56 +01:00
Richard van der Hoff
a82c96b87f
Rewrite get_server_verify_keys, again.
...
Attempt to simplify the logic in get_server_verify_keys by splitting it into
two methods.
2019-05-30 18:20:40 +01:00
Richard van der Hoff
099829d5a9
use attr.s for VerifyKeyRequest
...
because namedtuple is awful
2019-05-30 17:39:28 +01:00
Erik Johnston
99113e40ba
Merge branch 'master' into develop
2019-05-30 16:39:49 +01:00
Erik Johnston
c831748f4d
0.99.5.2
2019-05-30 16:29:47 +01:00
Richard van der Hoff
9315802221
fix changelog for 0.99.5.1 ( #5270 )
2019-05-30 16:28:02 +01:00
Erik Johnston
f5c7f90d72
Newsfile
2019-05-30 16:18:40 +01:00
Erik Johnston
e2c3660a0f
Add index to temp table
2019-05-30 16:18:40 +01:00
Erik Johnston
06eb408da5
Update synapse/storage/events_bg_updates.py
...
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2019-05-30 16:15:37 +01:00
Erik Johnston
7386c35f58
Rename constant
2019-05-30 16:15:37 +01:00
Erik Johnston
98f438b52a
Move event background updates to a separate file
2019-05-30 16:15:37 +01:00
Erik Johnston
9b8cd66524
Fixup comments and logging
2019-05-30 16:15:37 +01:00
Erik Johnston
9f5268388a
Newsfile
2019-05-30 16:15:37 +01:00
Erik Johnston
6574d4ad0a
Add test
2019-05-30 16:15:37 +01:00
Erik Johnston
1d818fde14
Log actual number of entries deleted
2019-05-30 16:15:37 +01:00
Erik Johnston
6ebc08c09d
Add DB bg update to cleanup extremities.
...
Due to #5269 we may have extremities in our DB that we shouldn't have,
so lets add a cleanup task such to remove those.
2019-05-30 16:15:37 +01:00
Erik Johnston
df9d900544
Correctly filter out extremities with soft failed prevs ( #5274 )
...
When we receive a soft failed event we, correctly, *do not* update the
forward extremity table with the event. However, if we later receive an
event that references the soft failed event we then need to remove the
soft failed events prev events from the forward extremities table,
otherwise we just build up forward extremities.
Fixes #5269
2019-05-30 16:12:50 +01:00
Eisha Chen-yen-su
0b6bc36402
Add changelog
2019-05-30 17:07:21 +02:00
Eisha Chen-yen-su
8824325b82
Fix ignored filter field in /messages endpoint
...
This fixes a bug which were causing the "event_format" field to be
ignored in the filter of requests to the `/messages` endpoint of the
CS API.
Signed-off-by: Eisha Chen-yen-su <chenyensu0@gmail.com >
2019-05-30 16:58:53 +02:00
Erik Johnston
57b3751918
Merge pull request #5291 from matrix-org/erikj/add_index
...
Add index to temp bg update extremity table
2019-05-30 15:28:37 +01:00
Erik Johnston
5ac75fc9a2
Join against events to use its room_id index
2019-05-30 15:26:55 +01:00
Erik Johnston
e2c46ed851
Move deletion from table inside txn
2019-05-30 15:26:38 +01:00
Erik Johnston
04710cc2d7
Fetch membership counts all at once
2019-05-30 15:25:41 +01:00
Erik Johnston
54d50fbfdf
Get events all at once
2019-05-30 15:15:13 +01:00
Erik Johnston
06675db684
Newsfile
2019-05-30 15:05:26 +01:00
Erik Johnston
6cdfb0207e
Add index to temp table
2019-05-30 15:02:31 +01:00
Erik Johnston
e9e5d3392d
Merge pull request #5278 from matrix-org/erikj/cleanup_bad_extremities
...
Add DB bg update to cleanup extremities.
2019-05-30 14:28:26 +01:00
Erik Johnston
cb967e2346
Update synapse/storage/events_bg_updates.py
...
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2019-05-30 14:06:42 +01:00
Erik Johnston
45f5d8f3fd
Merge pull request #5256 from aaronraimist/logout-correct-error
...
Show correct error when logging out and access token is missing
2019-05-30 13:33:44 +01:00
Erik Johnston
468bd090ff
Rename constant
2019-05-30 11:24:42 +01:00
Erik Johnston
5c1ece0ffc
Move event background updates to a separate file
2019-05-30 11:22:59 +01:00
Erik Johnston
640fcbb07f
Fixup comments and logging
2019-05-30 10:55:55 +01:00
Aaron Raimist
123918b739
Lint
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-05-29 14:44:28 -05:00
Richard van der Hoff
8d92329214
Remove spurious debug from MatrixFederationHttpClient.get_json ( #5287 )
...
This is just unhelpful spam
2019-05-29 19:31:52 +01:00
Richard van der Hoff
3dcf2feba8
Improve logging for logcontext leaks. ( #5288 )
2019-05-29 19:27:50 +01:00
Erik Johnston
8541db741a
Merge pull request #5283 from aaronraimist/captcha-docs
...
Specify the type of reCAPTCHA key to use (#5013 )
2019-05-29 19:02:27 +01:00
Amber Brown
46c8f7a517
Implement the SHHS complexity API ( #5216 )
2019-05-30 01:47:16 +10:00
Erik Johnston
67e0631f8f
Newsfile
2019-05-29 15:59:10 +01:00
Erik Johnston
d7add713a8
Add test
2019-05-29 15:59:06 +01:00
Amber Brown
532b825ed9
Serve CAS login over r0 ( #5286 )
2019-05-30 00:55:18 +10:00
Erik Johnston
7e8e683754
Log actual number of entries deleted
2019-05-29 15:11:28 +01:00
Erik Johnston
d79c9994f4
Add DB bg update to cleanup extremities.
...
Due to #5269 we may have extremities in our DB that we shouldn't have,
so lets add a cleanup task such to remove those.
2019-05-29 15:11:26 +01:00
Aaron Raimist
30858ff461
Fix error when downloading thumbnail with width/height param missing ( #5258 )
...
Fix error when downloading thumbnail with width/height param missing
Fixes #2748
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-05-29 14:27:41 +01:00
Erik Johnston
58c8ed5b0d
Correctly filter out extremities with soft failed prevs ( #5274 )
...
When we receive a soft failed event we, correctly, *do not* update the
forward extremity table with the event. However, if we later receive an
event that references the soft failed event we then need to remove the
soft failed events prev events from the forward extremities table,
otherwise we just build up forward extremities.
Fixes #5269
2019-05-29 11:56:24 +01:00
Richard van der Hoff
f76d407ef3
Fix dropped logcontexts during high outbound traffic. ( #5277 )
...
Fixes #5271 .
2019-05-29 09:17:33 +01:00
Amber Brown
7ddbbc45b7
Merge pull request #5282 from aaronraimist/user-directory
...
Fix docs on resetting the user directory (#5036 )
2019-05-29 17:37:06 +10:00
Amber Brown
0729ef01f8
regenerate sample config
2019-05-29 16:41:25 +10:00
Amber Brown
ecaa299cab
Rename 5282.misc to 5282.doc
2019-05-29 16:32:30 +10:00
Aaron Raimist
2ec2809460
Add changelog
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-05-28 22:05:53 -05:00
Aaron Raimist
f795595e95
Specify the type of reCAPTCHA key to use ( #5013 )
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-05-28 22:04:27 -05:00
Aaron Raimist
878b00c395
Add changelog
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-05-28 20:58:22 -05:00
Aaron Raimist
9b6f72663e
Fix docs on resetting the user directory ( #5036 )
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-05-28 20:54:01 -05:00
Richard van der Hoff
540f40f0cd
Merge pull request #5251 from matrix-org/rav/server_keys/01-check_sig
...
Ensure that server_keys fetched via a notary server are correctly signed.
2019-05-28 21:32:17 +01:00
Richard van der Hoff
5726378ece
Fix "db txn 'update_presence' from sentinel context" log messages ( #5275 )
...
Fixes #4414 .
2019-05-28 21:20:11 +01:00
Brendan Abolivier
7e1c7cc274
Typo
2019-05-28 17:13:26 +01:00
Brendan Abolivier
4aba561c65
Config and changelog
2019-05-28 16:55:10 +01:00
Brendan Abolivier
52839886d6
Allow configuring a range for the account validity startup job
...
When enabling the account validity feature, Synapse will look at startup for registered account without an expiration date, and will set one equals to 'now + validity_period' for them. On large servers, it can mean that a large number of users will have the same expiration date, which means that they will all be sent a renewal email at the same time, which isn't ideal.
In order to mitigate this, this PR allows server admins to define a 'max_delta' so that the expiration date is a random value in the [now + validity_period ; now + validity_period + max_delta] range. This allows renewal emails to be progressively sent over a configured period instead of being sent all in one big batch.
2019-05-28 16:52:45 +01:00
Brendan Abolivier
a97d4e218a
Merge pull request #5268 from matrix-org/babolivier/account_validity_fix_schema
...
Fix schema update for account validity
2019-05-28 10:30:07 +01:00
Brendan Abolivier
ddd30f44a0
Changelog
2019-05-28 10:14:21 +01:00
Brendan Abolivier
ba17de7fbc
Fix schema update for account validity
2019-05-28 10:11:38 +01:00
Aaron Raimist
119c9c10b0
Get rid of try except
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-05-27 00:13:56 -05:00
Erik Johnston
d0bba35197
Merge pull request #5260 from matrix-org/travis/fix-room-bg-task
...
Fix logging for room stats background update
2019-05-25 19:59:42 +01:00
Travis Ralston
4ccdbfcdb1
Changelog
2019-05-25 12:21:21 -06:00
Travis Ralston
bc4b2ecf70
Fix logging for room stats background update
2019-05-25 12:02:48 -06:00
Aaron Raimist
0b4f4cb0b4
Add changelog
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-05-25 11:39:18 -05:00
Erik Johnston
338dca58c0
Merge pull request #5257 from aaronraimist/fix-error-code-publicrooms
...
Fix error code for invalid parameter
2019-05-25 14:09:27 +01:00
Aaron Raimist
6dac0e738c
Add changelog
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-05-24 17:15:30 -05:00
Aaron Raimist
2d4853039f
Fix error code for invalid parameter
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-05-24 17:13:16 -05:00
Aaron Raimist
56f07d980a
Show correct error when logging out and access token is missing
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-05-24 16:32:27 -05:00
Richard van der Hoff
fa1b293da2
Simplification to Keyring.wait_for_previous_lookups. ( #5250 )
...
The list of server names was redundant, since it was equivalent to the keys on
the server_to_deferred map. This reduces the number of large lists being passed
around, and has the benefit of deduplicating the entries in `wait_on`.
2019-05-24 22:17:18 +01:00
Richard van der Hoff
cbcfd642a0
changelog
2019-05-24 15:47:30 +01:00
Richard van der Hoff
b825d1c800
Improve error handling/logging for perspectives-key fetching.
...
In particular, don't give up on the first failure.
2019-05-24 15:46:25 +01:00
Tulir Asokan
dd64b9dbdd
Fix appservice timestamp massaging ( #5233 )
...
Signed-off-by: Tulir Asokan <tulir@maunium.net >
2019-05-24 14:44:04 +01:00
Richard van der Hoff
dba9152d15
Add missing blank line in config ( #5249 )
2019-05-24 14:12:38 +01:00
Erik Johnston
d16f5574b6
Merge pull request #5220 from matrix-org/erikj/dont_bundle_live_events
...
Don't bundle aggregations with events in /sync or /events or state queries
2019-05-24 10:36:31 +01:00
Erik Johnston
4cb577c23f
Don't bundle aggs for /state and /members etc APIs
2019-05-24 09:52:33 +01:00
Erik Johnston
8c41c04ee4
Merge pull request #5244 from matrix-org/rav/server_keys/00-factor-out-fetchers
...
Factor out KeyFetchers from KeyRing
2019-05-23 16:28:51 +01:00
Richard van der Hoff
753b1270da
Require sig from origin server on perspectives responses
2019-05-23 15:01:09 +01:00
Andrew Morgan
6368150a74
Add config option for setting homeserver's default room version ( #5223 )
...
Replaces DEFAULT_ROOM_VERSION constant with a method that first checks the config, then returns a hardcoded value if the option is not present.
That hardcoded value is now located in the server.py config file.
2019-05-23 15:00:20 +01:00
Richard van der Hoff
ec24108cc2
Fix remote_key_resource
2019-05-23 14:52:13 +01:00
Richard van der Hoff
895b79ac2e
Factor out KeyFetchers from KeyRing
...
Rather than have three methods which have to have the same interface,
factor out a separate interface which is provided by three implementations.
I find it easier to grok the code this way.
2019-05-23 13:46:47 +01:00
Richard van der Hoff
b75537beaf
Store key validity time in the storage layer
...
This is a first step to checking that the key is valid at the required moment.
The idea here is that, rather than passing VerifyKey objects in and out of the
storage layer, we instead pass FetchKeyResult objects, which simply wrap the
VerifyKey and add a valid_until_ts field.
2019-05-23 11:52:22 +01:00
Richard van der Hoff
84660d91b2
Simplify process_v2_response ( #5236 )
...
* Pass time_added_ms into process_v2_response
* Simplify process_v2_response
We can merge old_verify_keys into verify_keys, and reduce the number of dicts
flying around.
2019-05-23 11:51:39 +01:00
Richard van der Hoff
cc187f9337
Remove unused VerifyKey.expired and .time_added fields ( #5235 )
...
These were never used, and poking arbitary data into objects from other
packages seems confusing at best.
2019-05-23 11:46:05 +01:00
Richard van der Hoff
2e052110ee
Rewrite store_server_verify_key to store several keys at once ( #5234 )
...
Storing server keys hammered the database a bit. This replaces the
implementation which stored a single key, with one which can do many updates at
once.
2019-05-23 11:45:39 +01:00
Richard van der Hoff
85d1e03b9d
Simplifications and comments in do_auth ( #5227 )
...
I was staring at this function trying to figure out wtf it was actually
doing. This is (hopefully) a non-functional refactor which makes it a bit
clearer.
2019-05-23 11:17:42 +01:00
Richard van der Hoff
1a94de60e8
Run black on synapse.crypto.keyring ( #5232 )
2019-05-22 18:39:33 +01:00
Neil Johnson
73f1de31d1
Merge branch 'master' into develop
2019-05-22 17:59:43 +01:00
Neil Johnson
3d5bba581b
0.99.5.1
2019-05-22 17:52:44 +01:00
Neil Johnson
006bd8f4f6
Revert "0.99.5"
...
This reverts commit c31e375ade .
2019-05-22 17:49:53 +01:00
Neil Johnson
c31e375ade
0.99.5
2019-05-22 17:45:44 +01:00
Marcus Hoffmann
62388a1e44
remove urllib3 pin ( #5230 )
...
requests 2.22.0 as been released supporting urllib3 1.25.2
Signed-off-by: Marcus Hoffmann <bubu@bubu1.eu >
2019-05-22 16:48:12 +01:00
Neil Johnson
ae5521be9c
Merge branch 'master' into develop
2019-05-22 15:56:55 +01:00
Neil Johnson
8031a6f3d5
0.99.5
2019-05-22 15:40:28 +01:00
Neil Johnson
66b75e2d81
Neilj/ensure get profileinfo available in client reader slaved store ( #5213 )
...
* expose SlavedProfileStore to ClientReaderSlavedStore
2019-05-22 13:55:32 +01:00
Steffen
2dfbeea66f
Update README.md ( #5222 )
...
Add missing backslash
2019-05-22 12:53:16 +01:00
Richard van der Hoff
b898a5600a
Merge branch 'master' into develop
2019-05-22 11:38:27 +01:00
Richard van der Hoff
e26e6b3230
update changelog
2019-05-21 17:37:19 +01:00
Amber Brown
4a30e4acb4
Room Statistics ( #4338 )
2019-05-21 11:36:50 -05:00
Richard van der Hoff
f3ff64e000
Merge commit 'f4c80d70f' into release-v0.99.5
2019-05-21 17:35:31 +01:00
Erik Johnston
f4c80d70f8
Merge pull request #5203 from matrix-org/erikj/aggregate_by_sender
...
Only count aggregations from distinct senders
2019-05-21 17:10:48 +01:00
Erik Johnston
9526aa96a6
Merge pull request #5212 from matrix-org/erikj/deny_multiple_reactions
...
Block attempts to annotate the same event twice
2019-05-21 17:08:14 +01:00
Erik Johnston
9259cd4bee
Newsfile
2019-05-21 17:06:21 +01:00
Richard van der Hoff
8aed6d87ff
Fix spelling in changelog
2019-05-21 16:58:22 +01:00
Richard van der Hoff
959550b645
0.99.5rc1
2019-05-21 16:51:49 +01:00
Erik Johnston
44b8ba484e
Fix words
2019-05-21 16:51:45 +01:00
Richard van der Hoff
17f6804837
Introduce room v4 which updates event ID format. ( #5217 )
...
Implements https://github.com/matrix-org/matrix-doc/pull/2002 .
2019-05-21 16:22:54 +01:00
Richard van der Hoff
c4aef549ad
Exclude soft-failed events from fwd-extremity candidates. ( #5146 )
...
When considering the candidates to be forward-extremities, we must exclude soft
failures.
Hopefully fixes #5090 .
2019-05-21 16:10:54 +01:00
Richard van der Hoff
bab3eddac4
Pin eliot to <1.8 on python 3.5.2 ( #5218 )
...
* Pin eliot to <1.8 on python 3.5.2
Fixes https://github.com/matrix-org/synapse/issues/5199
* Add support for 'markers' to python_dependencies
* tell xargs not to strip quotes
2019-05-21 15:58:01 +01:00
Erik Johnston
c448f35de2
Newsfile
2019-05-21 15:35:13 +01:00
Erik Johnston
7b0e804a4a
Fix get_max_topological_token to never return None
2019-05-21 15:21:43 +01:00
Brendan Abolivier
6a5a70edf0
Merge pull request #5204 from matrix-org/babolivier/account_validity_expiration_date
...
Add startup background job for account validity
2019-05-21 14:55:15 +01:00
Brendan Abolivier
384122efa8
Doc
2019-05-21 14:39:36 +01:00
Erik Johnston
ef13dc4846
Newsfile
2019-05-21 13:59:09 +01:00
Erik Johnston
de7672b78f
Don't bundle events in /sync or /events
...
As we'll send down the annotations too anyway, so this just ends up
confusing clients.
2019-05-21 13:54:09 +01:00
Richard van der Hoff
04d53794d6
Fix error handling for rooms whose versions are unknown. ( #5219 )
...
If we remove support for a particular room version, we should behave more
gracefully. This should make client requests fail with a 400 rather than a 500,
and will ignore individiual PDUs in a federation transaction, rather than the
whole transaction.
2019-05-21 13:47:25 +01:00
Brendan Abolivier
5ceee46c6b
Do the select and insert in a single transaction
2019-05-21 13:38:51 +01:00
Erik Johnston
0620dd49db
Newsfile
2019-05-20 17:40:24 +01:00
Erik Johnston
c7ec06e8a6
Block attempts to annotate the same event twice
2019-05-20 17:39:05 +01:00
Richard van der Hoff
24b93b9c76
Revert "expose SlavedProfileStore to ClientReaderSlavedStore ( #5200 )"
...
This reverts commit ce5bcefc60 .
This caused:
```
Traceback (most recent call last):
File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/synapse/src/synapse/app/client_reader.py", line 32, in <module>
from synapse.replication.slave.storage import SlavedProfileStore
ImportError: cannot import name 'SlavedProfileStore' from 'synapse.replication.slave.storage' (/home/synapse/src/synapse/replication/slave/storage/__init__.py)
error starting synapse.app.client_reader('/home/synapse/config/workers/client_reader.yaml') (exit code: 1); see above for logs
```
2019-05-20 16:21:34 +01:00
Richard van der Hoff
5206648a4a
Add a test room version which updates event ID format ( #5210 )
...
Implements MSC1884
2019-05-20 15:54:42 +01:00
Erik Johnston
edef6d29ae
Merge pull request #5211 from matrix-org/erikj/fixup_reaction_constants
...
Rename relation types to match MSC
2019-05-20 14:52:29 +01:00
Erik Johnston
d642178654
Newsfile
2019-05-20 14:32:16 +01:00
Erik Johnston
1dff859d6a
Rename relation types to match MSC
2019-05-20 14:31:19 +01:00
Erik Johnston
57ba3451b6
Merge pull request #5209 from matrix-org/erikj/reactions_base
...
Land basic reaction and edit support.
2019-05-20 14:06:40 +01:00
Erik Johnston
06671057b6
Newsfile
2019-05-20 12:39:07 +01:00
Erik Johnston
9ad246e6d2
Merge pull request #5207 from matrix-org/erikj/reactions_redactions
...
Correctly update aggregation counts after redaction
2019-05-20 12:36:06 +01:00
Erik Johnston
2ac9c965dd
Fixup comments
2019-05-20 12:32:26 +01:00
Erik Johnston
935af0da38
Correctly update aggregation counts after redaction
2019-05-20 12:09:27 +01:00
Erik Johnston
210cb6dae2
Merge pull request #5195 from matrix-org/erikj/edits
...
Add basic editing support
2019-05-20 12:06:19 +01:00
ReidAnderson
3787133c9e
Limit UserIds to a length that fits in a state key ( #5198 )
2019-05-20 11:20:08 +01:00
Brendan Abolivier
99c4ec1eef
Changelog
2019-05-17 19:38:41 +01:00
Brendan Abolivier
ad5b4074e1
Add startup background job for account validity
...
If account validity is enabled in the server's configuration, this job will run at startup as a background job and will stick an expiration date to any registered account missing one.
2019-05-17 19:37:31 +01:00
Erik Johnston
b63cc325a9
Only count aggregations from distinct senders
...
As a user isn't allowed to send a single emoji more than once.
2019-05-17 18:03:10 +01:00
Erik Johnston
d4ca533d70
Make tests use different user for each reaction it sends
...
As users aren't allowed to react with the same emoji more than once.
2019-05-17 18:03:05 +01:00
bytepoets-blo
291e1eea5e
fix mapping of return values for get_or_register_3pid_guest ( #5177 )
...
* fix mapping of return values for get_or_register_3pid_guest
2019-05-17 17:27:14 +01:00
Erik Johnston
85ece3df46
Merge pull request #5191 from matrix-org/erikj/refactor_pagination_bounds
...
Make generating SQL bounds for pagination generic
2019-05-17 17:24:36 +01:00
Erik Johnston
8dd9cca8ea
Spelling and clarifications
2019-05-17 16:40:51 +01:00
Erik Johnston
5dbff34509
Fixup bsaed on review comments
2019-05-17 15:48:04 +01:00
Neil Johnson
ce5bcefc60
expose SlavedProfileStore to ClientReaderSlavedStore ( #5200 )
...
* expose SlavedProfileStore to ClientReaderSlavedStore
2019-05-17 13:27:19 +01:00
Richard van der Hoff
afb463fb7a
Some vagrant hackery for testing the debs
2019-05-17 12:56:46 +01:00
Richard van der Hoff
da5ef0bb42
Merge remote-tracking branch 'origin/master' into develop
2019-05-17 12:39:48 +01:00
Richard van der Hoff
7ce1f97a13
Stop telling people to install the optional dependencies. ( #5197 )
...
* Stop telling people to install the optional dependencies.
They're optional.
Also update the postgres docs a bit for clarity(?)
2019-05-17 12:38:03 +01:00
Brendan Abolivier
fdeac1e984
Merge pull request #5196 from matrix-org/babolivier/per_room_profiles
...
Add an option to disable per-room profiles
2019-05-17 12:10:49 +01:00
PauRE
f89f688a55
Fix image orientation when generating thumbnail ( #5039 )
2019-05-16 19:04:26 +01:00
David Baker
07cff7b121
Merge pull request #5174 from matrix-org/dbkr/add_dummy_flow_to_recaptcha_only
...
Re-order registration stages to do msisdn & email auth last
2019-05-16 17:27:39 +01:00
Erik Johnston
d46aab3fa8
Add basic editing support
2019-05-16 16:54:45 +01:00
Erik Johnston
5c39d262c0
Merge pull request #5192 from matrix-org/erikj/relations_aggregations
...
Add relation aggregation APIs
2019-05-16 16:54:05 +01:00
Erik Johnston
895179a4dc
Update docstring
2019-05-16 16:41:05 +01:00
Brendan Abolivier
8f9ce1a8a2
Lint
2019-05-16 15:25:54 +01:00
Brendan Abolivier
cc8c139a39
Lint
2019-05-16 15:20:59 +01:00
Brendan Abolivier
a5fe16c5a7
Changelog + sample config
2019-05-16 15:11:37 +01:00
Brendan Abolivier
efdc55db75
Forgot copyright
2019-05-16 15:10:24 +01:00
Brendan Abolivier
54a582ed44
Add test case
2019-05-16 15:09:16 +01:00
Brendan Abolivier
cd32375846
Add option to disable per-room profiles
2019-05-16 14:34:28 +01:00
Erik Johnston
7a7eba8302
Move parsing of tokens out of storage layer
2019-05-16 14:26:23 +01:00
Erik Johnston
2c662ddde4
Indirect tuple conversion
2019-05-16 14:21:39 +01:00
Erik Johnston
95f3fcda3c
Check that event is visible in new APIs
2019-05-16 14:19:06 +01:00
Matthew Hodgson
4a6d5de98c
Make /sync attempt to return device updates for both joined and invited users ( #3484 )
2019-05-16 13:23:43 +01:00
David Baker
fafb936de5
Merge pull request #5187 from matrix-org/dbkr/only_check_threepid_not_in_use_if_actually_registering
...
Only check 3pids not in use when registering
2019-05-16 10:58:09 +01:00
Erik Johnston
b5c62c6b26
Fix relations in worker mode
2019-05-16 10:38:13 +01:00
Erik Johnston
33453419b0
Add cache to relations
2019-05-16 10:02:14 +01:00
Erik Johnston
a0603523d2
Add aggregations API
2019-05-16 09:37:20 +01:00
Erik Johnston
f201a30244
Merge pull request #5186 from matrix-org/erikj/simple_pagination
...
Add simple relations API
2019-05-16 09:34:12 +01:00
David Baker
cd0faba7cd
Make newsfile clearer
2019-05-15 20:53:48 +01:00
Amber Brown
f1e5b41388
Make all the rate limiting options more consistent ( #5181 )
2019-05-15 12:06:04 -05:00
Richard van der Hoff
5f027a315f
Drop support for v2_alpha API prefix ( #5190 )
2019-05-15 17:37:46 +01:00
Erik Johnston
5be34fc3e3
Actually check for None rather falsey
2019-05-15 17:30:23 +01:00
Erik Johnston
e6459c26b4
Actually implement idempotency
2019-05-15 17:28:33 +01:00
Richard van der Hoff
1757e2d7c3
Merge branch 'master' into develop
2019-05-15 14:09:30 +01:00
Richard van der Hoff
13018bb997
fix some typos in the changelog
2019-05-15 14:04:02 +01:00
Richard van der Hoff
4a926f528e
0.99.4
2019-05-15 13:58:45 +01:00
Erik Johnston
5fb72e6888
Newsfile
2019-05-15 13:36:51 +01:00
Erik Johnston
b50641e357
Add simple pagination API
2019-05-15 13:36:51 +01:00
Erik Johnston
efe3c7977a
Add simple send_relation API and track in DB
2019-05-15 13:36:51 +01:00
Erik Johnston
a9fc71c372
Merge branch 'erikj/refactor_pagination_bounds' into erikj/reactions_base
2019-05-15 13:36:29 +01:00
Erik Johnston
7155162844
Newsfile
2019-05-15 11:33:22 +01:00
Erik Johnston
54d77107c1
Make generating SQL bounds for pagination generic
...
This will allow us to reuse the same structure when we paginate e.g.
relations
2019-05-15 11:30:05 +01:00
Erik Johnston
0aba6c8251
Merge pull request #5183 from matrix-org/erikj/async_serialize_event
...
Allow client event serialization to be async
2019-05-15 10:36:30 +01:00
Erik Johnston
d94544051b
Merge pull request #5184 from matrix-org/erikj/expose_get_events_as_array
...
Expose DataStore._get_events as get_events_as_list
2019-05-15 10:17:38 +01:00
Erik Johnston
99c7dae087
Merge pull request #5185 from matrix-org/erikj/fix_config_ratelimiting
...
Use correct config option for ratelimiting in tests
2019-05-15 09:54:15 +01:00
Erik Johnston
8ed2f182f7
Update docstring with correct return type
...
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2019-05-15 09:52:52 +01:00
Erik Johnston
52ddc6c0ed
Update docstring with correct type
...
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2019-05-15 09:52:15 +01:00
David Baker
efefb5bda2
Have I got newsfile for you
2019-05-14 19:18:42 +01:00
David Baker
6ca88c4693
Only check 3pids not in use when registering
...
We checked that 3pids were not already in use before we checked if
we were going to return the account previously registered in the
same UI auth session, in which case the 3pids will definitely
be in use.
https://github.com/vector-im/riot-web/issues/9586
2019-05-14 19:04:59 +01:00
Richard van der Hoff
daa2fb6317
comment about user_joined_room
2019-05-14 18:53:09 +01:00
Erik Johnston
495e859e58
Merge branch 'erikj/fix_config_ratelimiting' into erikj/test
2019-05-14 14:42:47 +01:00
Erik Johnston
db3046f565
Newsfile
2019-05-14 14:39:27 +01:00
Erik Johnston
dc4f6d1b01
Use correct config option for ratelimiting in tests
2019-05-14 14:37:40 +01:00
Erik Johnston
ae69a6aa9d
Merge branch 'erikj/async_serialize_event' into erikj/reactions_rebase
2019-05-14 14:09:33 +01:00
Erik Johnston
53788a447f
Newsfile
2019-05-14 13:41:36 +01:00
Erik Johnston
4fb44fb5b9
Expose DataStore._get_events as get_events_as_list
...
This is in preparation for reaction work which requires it.
2019-05-14 13:37:44 +01:00
Erik Johnston
a80e6b53f9
Newsfile
2019-05-14 13:12:23 +01:00
Erik Johnston
b54b03f9e1
Allow client event serialization to be async
2019-05-14 11:58:01 +01:00
Amber Brown
df2ebd75d3
Migrate all tests to use the dict-based config format instead of hanging items off HomeserverConfig ( #5171 )
2019-05-13 15:01:14 -05:00
Andrew Morgan
5a4b328f52
Add ability to blacklist ip ranges for federation traffic ( #5043 )
2019-05-13 19:05:06 +01:00
Brendan Abolivier
2e1129b5f7
0.99.4rc1
2019-05-13 16:11:21 +01:00
David Baker
822072b1bb
Terms might not be the last stage
2019-05-13 16:10:26 +01:00
David Baker
516a5fb64b
Merge remote-tracking branch 'origin/develop' into dbkr/add_dummy_flow_to_recaptcha_only
2019-05-13 15:54:25 +01:00
Brendan Abolivier
8cc9ba3522
Merge pull request #5179 from matrix-org/babolivier/isort
...
Fix CI after new release of isort
2019-05-13 15:48:29 +01:00
David Baker
9e99143c47
Merge remote-tracking branch 'origin/develop' into dbkr/add_dummy_flow_to_recaptcha_only
2019-05-13 15:37:03 +01:00
David Baker
8782bfb783
And now I realise why the test is failing...
2019-05-13 15:34:11 +01:00
Brendan Abolivier
2725cd2290
Fix changelog
2019-05-13 15:32:07 +01:00
Brendan Abolivier
1a536699fd
Changelog
2019-05-13 15:21:23 +01:00
Brendan Abolivier
bb93757b32
Fix CI after new release of isort
2019-05-13 15:19:44 +01:00
Richard van der Hoff
9a18e1d832
Merge branch 'master' into develop
2019-05-10 23:01:41 +01:00
Andrew Morgan
2f48c4e1ae
URL preview blacklisting fixes ( #5155 )
...
Prevents a SynapseError being raised inside of a IResolutionReceiver and instead opts to just return 0 results. This thus means that we have to lump a failed lookup and a blacklisted lookup together with the same error message, but the substitute should be generic enough to cover both cases.
2019-05-10 10:32:44 -07:00
David Baker
c9f811c5d4
Update changelog
2019-05-10 14:01:19 +01:00
David Baker
04299132af
Re-order flows so that email auth is done last
...
It's more natural for the user if the bit that takes them away
from the registration flow comes last. Adding the dummy stage allows
us to do the stages in this order without the ambiguity.
2019-05-10 13:58:03 +01:00
David Baker
7a3eb8657d
Thanks, automated grammar pedantry.
2019-05-10 11:18:35 +01:00
David Baker
9c61dce3c8
Comment
2019-05-10 11:14:55 +01:00
David Baker
a18f93279e
Add changelog entry
2019-05-10 11:11:59 +01:00
David Baker
8714ff6d51
Add a DUMMY stage to captcha-only registration flow
...
This allows the client to complete the email last which is more
natual for the user. Without this stage, if the client would
complete the recaptcha (and terms, if enabled) stages and then the
registration request would complete because you've now completed a
flow, even if you were intending to complete the flow that's the
same except has email auth at the end.
Adding a dummy auth stage to the recaptcha-only flow means it's
always unambiguous which flow the client was trying to complete.
Longer term we should think about changing the protocol so the
client explicitly says which flow it's trying to complete.
vector-im/riot-web#9586
2019-05-10 11:09:53 +01:00
David Baker
c2bb7476c9
Revert 085ae346ac
...
Accidentally went straight to develop
2019-05-10 11:08:01 +01:00
David Baker
085ae346ac
Add a DUMMY stage to captcha-only registration flow
...
This allows the client to complete the email last which is more
natual for the user. Without this stage, if the client would
complete the recaptcha (and terms, if enabled) stages and then the
registration request would complete because you've now completed a
flow, even if you were intending to complete the flow that's the
same except has email auth at the end.
Adding a dummy auth stage to the recaptcha-only flow means it's
always unambiguous which flow the client was trying to complete.
Longer term we should think about changing the protocol so the
client explicitly says which flow it's trying to complete.
https://github.com/vector-im/riot-web/issues/9586
2019-05-10 10:52:24 +01:00
Richard van der Hoff
a78996cc4a
fix sample config
2019-05-10 09:46:28 +01:00
Gergely Polonkai
cd3f30014a
Make Prometheus snippet less confusing on the metrics collection doc ( #4288 )
...
Signed-off-by: Gergely Polonkai <gergely@polonkai.eu >
2019-05-10 09:15:08 +01:00
Christoph Müller
ee90c06e38
Set syslog identifiers in systemd units ( #5023 )
2019-05-10 09:09:25 +01:00
Amber Brown
b36c82576e
Run Black on the tests again ( #5170 )
2019-05-10 00:12:11 -05:00
colonelkrud
d9a02d1201
Add AllowEncodedSlashes to apache ( #5068 )
...
* Add AllowEncodedSlashes to apache
Add `AllowEncodedSlashes On` to apache config to support encoding for v3 rooms. "The AllowEncodedSlashes setting is not inherited by virtual hosts, and virtual hosts are used in many default Apache configurations, such as the one in Ubuntu. The workaround is to add the AllowEncodedSlashes setting inside a <VirtualHost> container (/etc/apache2/sites-available/default in Ubuntu)." Source: https://stackoverflow.com/questions/4390436/need-to-allow-encoded-slashes-on-apache
* change allowencodedslashes to nodecode
2019-05-09 23:27:04 +01:00
Richard van der Hoff
ea41c740ee
Merge remote-tracking branch 'origin/master' into develop
2019-05-09 22:54:04 +01:00
Richard van der Hoff
84cebb89cc
remove instructions for jessie installation ( #5164 )
...
We don't ship jessie packages, so these were a bit misleading.
2019-05-09 22:53:46 +01:00
Richard van der Hoff
130f932cbc
Run black on per_destination_queue
...
... mostly to fix pep8 fails
2019-05-09 16:27:02 +01:00
Quentin Dufour
11ea16777f
Limit the number of EDUs in transactions to 100 as expected by receiver ( #5138 )
...
Fixes #3951 .
2019-05-09 11:01:41 +01:00
Brendan Abolivier
d216a36b37
Fix bogus imports in tests ( #5154 )
2019-05-08 21:57:03 +01:00
Matthew Hodgson
c0e0740bef
add options to require an access_token to GET /profile and /publicRooms on CS API ( #5083 )
...
This commit adds two config options:
* `restrict_public_rooms_to_local_users`
Requires auth to fetch the public rooms directory through the CS API and disables fetching it through the federation API.
* `require_auth_for_profile_requests`
When set to `true`, requires that requests to `/profile` over the CS API are authenticated, and only returns the user's profile if the requester shares a room with the profile's owner, as per MSC1301.
MSC1301 also specifies a behaviour for federation (only returning the profile if the server asking for it shares a room with the profile's owner), but that's currently really non-trivial to do in a not too expensive way. Next step is writing down a MSC that allows a HS to specify which user sent the profile query. In this implementation, Synapse won't send a profile query over federation if it doesn't believe it already shares a room with the profile's owner, though.
Groups have been intentionally omitted from this commit.
2019-05-08 18:26:56 +01:00
Erik Johnston
c8c069db92
Merge pull request #5037 from matrix-org/erikj/limit_inflight_dns
...
Limit in flight DNS requests
2019-05-08 17:11:03 +01:00
Brendan Abolivier
1473058b5e
Do checks on aliases for incoming m.room.aliases events ( #5128 )
...
Follow-up to #5124
Also added a bunch of checks to make sure everything (both the stuff added on #5124 and this PR) works as intended.
2019-05-08 17:01:30 +01:00
Erik Johnston
de655e669a
Merge pull request #5104 from matrix-org/erikj/ratelimit_3pid_invite
...
Ratelimit 3pid invites
2019-05-07 10:12:49 +01:00
Richard van der Hoff
59e2d2694d
Remove the requirement to authenticate for /admin/server_version. ( #5122 )
...
This endpoint isn't much use for its intended purpose if you first need to get
yourself an admin's auth token.
I've restricted it to the `/_synapse/admin` path to make it a bit easier to
lock down for those concerned about exposing this information. I don't imagine
anyone is using it in anger currently.
2019-05-07 09:29:30 +01:00
Travis Ralston
3fdff14207
Fix spelling in server notices admin API docs ( #5142 )
2019-05-06 22:15:02 +01:00
Richard van der Hoff
4804206dbe
Fix sample config
...
... after it got broken in 1565ebec2c .
2019-05-06 22:13:35 +01:00
Richard van der Hoff
836d3adcce
Merge branch 'master' into develop
2019-05-03 19:25:01 +01:00
Richard van der Hoff
9b86d3dee6
Merge tag 'v0.99.3.2'
...
Synapse 0.99.3.2 (2019-05-03)
=============================
Internal Changes
----------------
- Ensure that we have `urllib3` <1.25, to resolve incompatibility with `requests`. ([\#5135](https://github.com/matrix-org/synapse/issues/5135 ))
2019-05-03 19:24:42 +01:00
Richard van der Hoff
fa21455e08
0.99.3.2
2019-05-03 18:56:24 +01:00
Richard van der Hoff
0b5cf95607
include disco in deb build target list
2019-05-03 18:55:13 +01:00
Richard van der Hoff
dd76e5ca62
Merge pull request #5135 from matrix-org/rav/build_fixes
...
Build fixes
2019-05-03 18:54:49 +01:00
Richard van der Hoff
5485852b43
changelog
2019-05-03 18:36:55 +01:00
Richard van der Hoff
ecc0967315
Debian: we now need libpq-dev.
...
psycopg 2.8 is now out, which means that the C library gets built from source,
so we now need libpq-dev when building.
Turns out the need for this package is already documented in
docs/postgres.rst.
2019-05-03 18:34:34 +01:00
Richard van der Hoff
e3281d7d26
pin urllib3 to <1.25
2019-05-03 18:33:10 +01:00
Richard van der Hoff
f73f18fe7b
changelog tweaks
2019-05-03 16:09:34 +01:00
Richard van der Hoff
863ec09622
0.99.3.1
2019-05-03 16:03:24 +01:00
Richard van der Hoff
a845abbf3a
Merge pull request #5134 from matrix-org/rav/url_preview_blacklist
...
Blacklist 0.0.0.0 and :: by default for URL previews
2019-05-03 15:59:20 +01:00
Richard van der Hoff
1565ebec2c
more config comment updates
2019-05-03 15:50:59 +01:00
Richard van der Hoff
1acfb9e9f0
Merge pull request #5133 from matrix-org/rav/systemrandom
...
Use SystemRandom for token generation.
2019-05-03 15:39:30 +01:00
Richard van der Hoff
1a7104fde3
Blacklist 0.0.0.0 and :: by default for URL previews
2019-05-03 15:35:49 +01:00
Neil Johnson
60c3635f05
typo
2019-05-03 14:40:15 +01:00
Richard van der Hoff
247dc1bd0b
Use SystemRandom for token generation
2019-05-03 13:02:55 +01:00
Erik Johnston
176f31c2e3
Rate limit early
2019-05-02 15:23:08 +01:00
Richard van der Hoff
12f9d51e82
Add admin api for sending server_notices ( #5121 )
2019-05-02 11:59:16 +01:00
Brendan Abolivier
c193b39134
Merge pull request #5124 from matrix-org/babolivier/aliases
...
Add some limitations to alias creation
2019-05-02 11:22:40 +01:00
Brendan Abolivier
84196cb231
Add some limitations to alias creation
2019-05-02 11:05:11 +01:00
Richard van der Hoff
0836cbb9f5
Factor out an "assert_requester_is_admin" function ( #5120 )
...
Rather than copying-and-pasting the same four lines hundreds of times
2019-05-02 10:45:52 +01:00
Richard van der Hoff
1df2f80367
Merge pull request #5119 from matrix-org/rav/admin_api_urls
...
Move the admin API to `/_synapse/admin/v1`
2019-05-02 10:11:59 +01:00
Richard van der Hoff
f203c98794
fix examples
2019-05-01 17:49:56 +01:00
Richard van der Hoff
cc4bd762df
Fix sample config
2019-05-01 16:48:23 +01:00
Richard van der Hoff
03ad6bd483
changelog
2019-05-01 15:44:30 +01:00
Richard van der Hoff
40e576e29c
Move admin api impl to its own package
...
It doesn't really belong under rest/client/v1 any more.
2019-05-01 15:44:30 +01:00
Richard van der Hoff
8e9ca83537
Move admin API to a new prefix
2019-05-01 15:44:30 +01:00
Richard van der Hoff
579b637b6c
Move admin API away from ClientV1RestServlet
2019-05-01 15:16:04 +01:00
Brendan Abolivier
c1799b0f85
Merge pull request #5116 from matrix-org/babolivier/account_expiration
...
Fix path in account validity admin route's doc
2019-05-01 11:59:56 +01:00
Brendan Abolivier
6aad81ec0c
Rename changelog file
2019-05-01 11:50:15 +01:00
Brendan Abolivier
803a28fd1d
Add changelog
2019-05-01 11:43:31 +01:00
Brendan Abolivier
031919dafb
Fix whole path for admin route
2019-05-01 11:38:27 +01:00
Brendan Abolivier
d8e357b7cf
Fix typo in account validity admin route
2019-05-01 11:34:22 +01:00
Travis Ralston
8c5b1e30d4
Add a default .m.rule.tombstone push rule ( #4867 )
...
* Add a default .m.rule.tombstone push rule
In support of MSC1930: https://github.com/matrix-org/matrix-doc/pull/1930
* changelog
* Appease the changelog linter
2019-04-29 15:40:31 -06:00
Richard van der Hoff
b31cc1c613
Merge pull request #5100 from matrix-org/rav/verification_hackery
...
Improve logging when event-signature checking fails
2019-04-29 13:19:32 +01:00
Erik Johnston
d6118c5be6
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/ratelimit_3pid_invite
2019-04-26 18:14:23 +01:00
Erik Johnston
19f0722b2c
Newsfile
2019-04-26 18:08:33 +01:00
Erik Johnston
28a81ed62f
Ratelimit 3pid invites
...
We do ratelimit sending the 3PID invite events, but that happens after
spamming the identity server.
2019-04-26 18:06:25 +01:00
Richard van der Hoff
63b75cf7d7
Merge pull request #5103 from matrix-org/rav/fix_notif_loop
...
Fix infinite loop in presence handler
2019-04-26 12:38:14 +01:00
Richard van der Hoff
bd0d45ca69
Fix infinite loop in presence handler
...
Fixes #5102
2019-04-26 11:14:49 +01:00
Richard van der Hoff
0962d3cdff
changelog
2019-04-25 23:05:06 +01:00
Richard van der Hoff
837d7f85a9
more logging improvements
2019-04-25 22:17:59 +01:00
Richard van der Hoff
fd8fb32bdd
remove extraneous exception logging
2019-04-25 22:02:03 +01:00
Richard van der Hoff
7ca638c761
Clarify logging when PDU signature checking fails
2019-04-25 20:55:12 +01:00
Richard van der Hoff
ce6d47934b
Merge remote-tracking branch 'origin/master' into develop
2019-04-25 17:09:04 +01:00
Richard van der Hoff
2ebf7d56fa
Merge pull request #5098 from matrix-org/rav/fix_pep_517
...
Workarounds for pep-517 errors
2019-04-25 15:11:27 +01:00
Richard van der Hoff
e86d74d748
Changelog
2019-04-25 14:56:06 +01:00
Richard van der Hoff
afe560b072
Add --no-pep-517 to README instructions
2019-04-25 14:54:54 +01:00
Richard van der Hoff
00714e5102
set PIP_USE_PEP517 = False for tests
...
pip 19.1 otherwise complains about "editable mode is not supported for
pyproject.toml-style projects"
2019-04-25 14:52:19 +01:00
*=0=1=4=*
4a9a118a94
Fix handling of SYNAPSE_NO_TLS in docker image ( #5005 )
2019-04-25 14:47:22 +01:00
Andrew Morgan
6824ddd93d
Config option for verifying federation certificates (MSC 1711) ( #4967 )
2019-04-25 14:22:49 +01:00
Michael Kaye
788163e204
Remove log error for .well-known/matrix/client ( #4972 )
2019-04-24 17:44:06 +01:00
Katie Wolfe
7e07dc429f
Lint
...
I probably should've just run autopep8 in the first place...
Signed-off-by: Katie Wolfe <katie@dnaf.moe >
2019-04-24 12:43:18 -04:00
Amber Brown
6b2b9a58c4
Prevent "producer not unregistered" message ( #5009 )
2019-04-24 17:37:32 +01:00
Katie Wolfe
b3e5db402d
Clean up code
...
Signed-off-by: Katie Wolfe <katie@dnaf.moe >
2019-04-24 12:26:55 -04:00
Katie Wolfe
5d3ed79944
Show heroes if room name or canonical alias are empty
...
Fixes #4194
Signed-off-by: Katie Wolfe <katie@dnaf.moe >
2019-04-24 12:26:53 -04:00
Katie Wolfe
60041eac4b
Add full stop to 5084.bugfix
...
Signed-off-by: Katie Wolfe <katie@dnaf.moe >
2019-04-24 12:26:51 -04:00
Katie Wolfe
0a4c135f68
Add changelog.d/5084.bugfix
...
Signed-off-by: Katie Wolfe <katie@dnaf.moe >
2019-04-24 12:26:47 -04:00
Katie Wolfe
7f025eb425
Show heroes if room name or canonical alias are empty
...
Fixes #4194
Signed-off-by: Katie Wolfe <katie@dnaf.moe >
2019-04-24 12:26:29 -04:00
Richard van der Hoff
3d26eae14a
add gpg key fingerprint
2019-04-22 14:36:51 +01:00
Brendan Abolivier
1a63c7c281
Merge pull request #5077 from matrix-org/babolivier/account_expiration
...
Don't crash on lack of expiry templates
2019-04-18 15:10:06 +01:00
Brendan Abolivier
f8826d31cd
Don't crash on lack of expiry templates
2019-04-18 14:50:05 +01:00
Richard van der Hoff
f30a882cc6
Merge remote-tracking branch 'origin/master' into develop
2019-04-17 23:53:00 +01:00
Richard van der Hoff
95c603ae6f
Update debian install docs for new key and repo ( #5074 )
2019-04-17 23:52:00 +01:00
Brendan Abolivier
8383a553a6
Merge pull request #5073 from matrix-org/babolivier/account_expiration
...
Add some endpoints for account validity management
2019-04-17 19:59:27 +01:00
Erik Johnston
ca90336a69
Merge branch 'develop' of github.com:matrix-org/synapse into babolivier/account_expiration
2019-04-17 19:44:40 +01:00
Brendan Abolivier
eaf41a943b
Add management endpoints for account validity
2019-04-17 19:34:45 +01:00
Brendan Abolivier
91934025b9
Merge pull request #5047 from matrix-org/babolivier/account_expiration
...
Send out emails with links to extend an account's validity period
2019-04-17 14:57:39 +01:00
Brendan Abolivier
20f0617e87
Send out emails with links to extend an account's validity period
2019-04-17 14:42:20 +01:00
Brendan Abolivier
49ff74da9b
Merge pull request #5071 from matrix-org/babolivier/3pid-check
...
Make sure we're not registering the same 3pid twice
2019-04-17 14:37:42 +01:00
Brendan Abolivier
600ec04739
Make sure we're not registering the same 3pid twice
2019-04-17 14:23:01 +01:00
Erik Johnston
fd2fcb817c
Merge pull request #5070 from matrix-org/erikj/postpath
...
Remove usage of request.postpath
2019-04-17 09:03:26 +01:00
Erik Johnston
a1eb4c6d2f
Merge pull request #5065 from matrix-org/erikj/fix_versions
...
VersionRestServlet doesn't take a param
2019-04-16 17:52:36 +01:00
Erik Johnston
14d5ad7d2b
Newsfile
2019-04-16 17:52:00 +01:00
Erik Johnston
ad010f6306
Remove usage of request.postpath
...
This is an undocumented variable in twisted, and relies on the servlet
being mounted in the right way.
This also breaks getting push rules on workers.
2019-04-16 17:42:50 +01:00
Travis Ralston
3f22e993f0
Use packages.matrix.org for packages ( #5067 )
...
* Use packages.matrix.org for packages
See https://github.com/vector-im/riot-web/issues/9497 (applies to more than just Olm)
* changelog
2019-04-16 08:31:59 -06:00
Silke Hofstra
a137f4eac0
Add systemd-python to optional dependencies ( #4339 )
...
Using systemd-python allows for logging to the systemd journal,
as is documented in: `synapse/contrib/systemd/log_config.yaml`.
Signed-off-by: Silke Hofstra <silke@slxh.eu >
2019-04-16 20:41:17 +10:00
Erik Johnston
468b2bcb2e
Newsfile
2019-04-15 19:41:25 +01:00
Erik Johnston
38642614cf
VersionRestServlet doesn't take a param
2019-04-15 19:39:47 +01:00
Erik Johnston
6e27a8620f
Merge pull request #5063 from matrix-org/erikj/move_endpoints
...
Move some rest endpoints to client reader
2019-04-15 18:55:01 +01:00
Erik Johnston
ec638a1602
Only handle GET requests for /push_rules
2019-04-15 18:51:48 +01:00
Erik Johnston
208251956d
Newsfile
2019-04-15 17:21:08 +01:00
Erik Johnston
d5adf297e6
Move some rest endpoints to client reader
2019-04-15 17:21:03 +01:00
Richard van der Hoff
6b0ddf8ee5
update grafana dashboard
2019-04-13 13:10:46 +01:00
Andrew Morgan
caa76e6021
Remove periods from copyright headers ( #5046 )
2019-04-11 17:08:13 +01:00
Erik Johnston
42e1aa5b2c
Newsfile
2019-04-10 10:43:47 +01:00
Erik Johnston
c132c8e505
Handle the case of get_missing_events failing
...
Currently if a call to `/get_missing_events` fails we log an exception
and stop processing the top level event we received over federation.
Instead let's try and handle it sensibly given it is a somewhat expected
failure mode.
2019-04-10 10:39:54 +01:00
Erik Johnston
e446921def
Merge pull request #5033 from matrix-org/erikj/fix_schema_delta
...
Fix schema upgrade when dropping tables
2019-04-10 10:22:35 +01:00
Richard van der Hoff
329688c161
Fix disappearing exceptions in manhole. ( #5035 )
...
Avoid sending syntax errors from the manhole to sentry.
2019-04-10 07:23:48 +01:00
Erik Johnston
02491e009d
Newsfile
2019-04-09 17:23:46 +01:00
Erik Johnston
a0fc256d65
Limit in flight DNS requests
...
This is to work around a bug in twisted where a large number of
concurrent DNS requests cause it to tight loop forever.
c.f. https://twistedmatrix.com/trac/ticket/9620#ticket
2019-04-09 17:23:42 +01:00
Brendan Abolivier
bfc8fdf1fc
Merge pull request #5027 from matrix-org/babolivier/account_expiration
...
Add time-based account expiration
2019-04-09 17:02:41 +01:00
Brendan Abolivier
747aa9f8ca
Add account expiration feature
2019-04-09 16:46:04 +01:00
Erik Johnston
5e45b558b0
Newsfile
2019-04-09 14:39:36 +01:00
Erik Johnston
50d2a3059d
Fix schema upgrade when dropping tables
...
We need to drop tables in the correct order due to foreign table
constraints (on `application_services`), otherwise the DROP TABLE
command will fail.
Introduced in #4992 .
2019-04-09 14:39:18 +01:00
Richard van der Hoff
644b86677f
Merge pull request #5030 from matrix-org/rav/rewrite_g_s_v_k
...
Rewrite Datastore.get_server_verify_keys
2019-04-09 11:30:23 +01:00
Richard van der Hoff
4abf5aa81a
Bump psycopg requirement ( #5032 )
2019-04-09 11:29:50 +01:00
Richard van der Hoff
1f1e8dd8ec
changelog
2019-04-09 00:00:10 +01:00
Richard van der Hoff
18b69be00f
Rewrite Datastore.get_server_verify_keys
...
Rewrite this so that it doesn't hammer the database.
2019-04-09 00:00:10 +01:00
Richard van der Hoff
0084309cd2
Rewrite test_keys as a HomeserverTestCase
2019-04-08 23:59:57 +01:00
Richard van der Hoff
f50efcb65d
Replace SlavedKeyStore with a shim
...
since we're pulling everything out of KeyStore anyway, we may as well simplify
it.
2019-04-08 23:59:07 +01:00
Richard van der Hoff
f88a9e6323
Remove redundant merged_keys dict
...
There's no point in collecting a merged dict of keys: it is sufficient to
consider just the new keys which have been fetched by the most recent
key_fetch_fns.
2019-04-08 22:36:18 +01:00
Richard van der Hoff
3352baac4b
Remove unused server_tls_certificates functions ( #5028 )
...
These have been unused since #4120 , and with the demise of perspectives, it is
unlikely that they will ever be used again.
2019-04-08 21:50:18 +01:00
Neil Johnson
b25e387c0d
add context to phonehome stats ( #5020 )
...
add context to phonehome stats
2019-04-08 15:47:39 +01:00
Richard van der Hoff
67d7b44784
Merge pull request #5024 from matrix-org/rav/record_correct_server_in_serverkeys
...
Fix from_server buglet in get_keys_from_perspectives
2019-04-08 15:40:37 +01:00
Neil Johnson
2d951686a7
drop tables listed in #1830 ( #4992 )
...
Tables dropped:
* application_services,
* application_services_regex,
* transaction_id_to_pdu,
* stats_reporting
* current_state_resets
* event_content_hashes
* event_destinations
* event_edge_hashes
* event_signatures
* feedback
* room_hosts
* state_forward_extremities
2019-04-08 15:37:26 +01:00
Richard van der Hoff
7d2a0c848e
Fix from_server buglet in get_keys_from_perspectives
...
make sure we store the name of the server the keys came from, rather than the
origin server, after doing a fetch-from-perspectives.
2019-04-08 12:51:16 +01:00
Richard van der Hoff
7fc1e17f4c
Merge pull request #5001 from matrix-org/rav/keyring_cleanups
...
Cleanups in the Keyring
2019-04-08 12:47:09 +01:00
Richard van der Hoff
b78aac5582
changelog
2019-04-04 19:12:54 +01:00
Richard van der Hoff
6ae9361510
Hoist server_name check out of process_v2_response
...
It's easier to check it in the caller than to complicate the interface with an
extra param.
2019-04-04 19:12:54 +01:00
Richard van der Hoff
ef27d434d1
Clean up Keyring.process_v2_response
...
Make this just return the key dict, rather than a single-entry dict mapping the
server name to the key dict. It's easy for the caller to get the server name
from from the response object anyway.
2019-04-04 19:12:54 +01:00
Richard van der Hoff
b2d574f126
test for get_keys_from_perspectives
2019-04-04 19:12:54 +01:00
Richard van der Hoff
30805237fa
add a test for get_keys_from_server
2019-04-04 19:12:54 +01:00
Richard van der Hoff
b43d9a920b
Fix docstring on get_server_keys_json
2019-04-04 18:54:03 +01:00
Brendan Abolivier
8e85493b0c
Add config option to block users from looking up 3PIDs ( #5010 )
2019-04-04 17:25:47 +01:00
Amber Brown
a33a5abc4c
Clean up the database pagination code ( #5007 )
...
* rewrite & simplify
* changelog
* cleanup potential sql injection
2019-04-05 00:21:16 +11:00
Erik Johnston
616e6a10bd
Merge pull request #5002 from matrix-org/erikj/delete_group
...
Add delete group admin API
2019-04-04 14:15:41 +01:00
Andrew Morgan
db265f0642
Prevent kicking users who aren't in the room ( #4999 )
...
Prevent kick events from succeeding if the user is not currently in the room.
2019-04-04 13:05:51 +01:00
Marcel Krüger
9f5d206c4a
Avoid redundant URL encoding ( #4555 )
...
* Do not double encode fallback redirect URL
Signed-off-by: Marcel Fabian Krüger <zauguin@gmail.com >
2019-04-04 12:05:56 +01:00
Erik Johnston
43c707a010
Merge pull request #5004 from ajensenwaud/develop
...
Fix issue #4596
2019-04-04 10:44:46 +01:00
*=0=1=4=*
40810b81d2
Correct default POSTGRES_USER in Docker README ( #4987 )
...
Correct default POSTGRES_USER in Docker README
2019-04-04 10:38:16 +01:00
Anders
2a59e8e429
Fix issue #4596
...
Make synapse_port_db --curses work with Python 3.
Signed-off-by: Anders Jensen-Waud <anders@jensenwaud.com >
2019-04-03 21:59:48 +00:00
Erik Johnston
bd3435e982
Newsfile
2019-04-03 16:35:33 +01:00
Erik Johnston
c6a233a936
Add unit test for deleting groups
2019-04-03 16:29:52 +01:00
Erik Johnston
c192bf8970
Add admin API for group deletion
2019-04-03 16:29:52 +01:00
Erik Johnston
4a2e13631d
Add functions to delete a group
2019-04-03 16:29:52 +01:00
Andrew Morgan
4a4d5c4fd6
Fix grammar and document get_current_users_in_room ( #4998 )
2019-04-03 14:32:20 +01:00
Richard van der Hoff
e4d473d855
Rewrite KeyringTestCase as a HomeServerTestCase ( #4986 )
...
This is a bit fiddly due to the keyring doing weird things with logcontexts.
2019-04-03 14:11:27 +01:00
Neil Johnson
e8419554ff
Remove presence lists ( #4989 )
...
Remove presence list support as per MSC 1819
2019-04-03 11:11:15 +01:00
Erik Johnston
8f549c1177
Merge pull request #4982 from matrix-org/erikj/msc1915
...
Implement MSC1915 - 3PID unbind APIs
2019-04-03 11:07:09 +01:00
Amber Brown
7efd1d87c2
Run black on the rest of the storage module ( #4996 )
2019-04-03 10:07:29 +01:00
Erik Johnston
3039d61baf
Merge pull request #4991 from matrix-org/erikj/stagger_push_startup
...
Make starting pushers faster during start up
2019-04-02 18:23:32 +01:00
Erik Johnston
6f226eed42
s/misc/feature/
2019-04-02 18:22:28 +01:00
Andrew Morgan
66e78700a2
Transfer related groups on room upgrade ( #4990 )
...
Transfers the m.room.related_groups state event on room upgrade.
2019-04-02 17:15:24 +01:00
Erik Johnston
ac45b0df0b
Newsfile
2019-04-02 17:00:18 +01:00
Richard van der Hoff
8530090b16
Add config.signing_key_path. ( #4974 )
...
As requested by @andrewshadura
2019-04-02 16:59:27 +01:00
Erik Johnston
5bec8d660d
Make starting pushers faster during start up
...
We start all pushers on start up and immediately start a background
process to fetch push to send. This makes start up incredibly painful
when dealing with many pushers.
Instead, let's do a quick fast DB check to see if there *may* be push to
send and only start the background processes for those pushers. We also
stagger starting up and doing those checks so that we don't try and
handle all pushers at once.
2019-04-02 16:59:13 +01:00
Richard van der Hoff
297bf2547e
Fix sync bug when accepting invites ( #4956 )
...
Hopefully this time we really will fix #4422 .
We need to make sure that the cache on
`get_rooms_for_user_with_stream_ordering` is invalidated *before* the
SyncHandler is notified for the new events, and we can now do so reliably via
the `events` stream.
2019-04-02 12:42:39 +01:00
Erik Johnston
4ef5d17b96
Correctly handle id_server param
2019-04-02 11:20:09 +01:00
Erik Johnston
24232514bf
Remove threepid binding if id server returns 400/404/501
2019-04-02 11:20:09 +01:00
Erik Johnston
c75e2017f1
Fixup docstrings
2019-04-02 11:20:06 +01:00
Neil Johnson
4c552ed78a
Neilj/fix threepid auth check (with tests) ( #4474 )
...
test threepid checking
2019-04-01 17:42:18 +01:00
Erik Johnston
39fb971e85
Newsfile
2019-04-01 15:31:47 +01:00
Erik Johnston
862d6e5ba5
Add unbind API to /r0 as it is now stabalised
2019-04-01 15:25:19 +01:00
Erik Johnston
3715c124b3
Grandfather in existing user threepids
...
We assume, as we did before, that users bound their threepid to one of
the trusted identity servers. So we simply fill the new table with all
threepids in `user_threepids` joined with the trusted identity servers.
2019-04-01 15:25:19 +01:00
Erik Johnston
057715aaa2
Allowing specifying IS to use in unbind API.
...
By default the homeserver will use the identity server used during the
binding of the 3PID to unbind the 3PID. However, we need to allow
clients to explicitly ask the homeserver to unbind via a particular
identity server, for the case where the 3PID was bound out of band from
the homeserver.
Implements MSC915.
2019-04-01 15:25:18 +01:00
Erik Johnston
9fbbc3d9e5
For unbind poke IS used during binding of 3PID
...
This changes the behaviour from using the server specified trusted
identity server to using the IS that used during the binding of the
3PID, if known.
This is the behaviour specified by MSC1915.
2019-04-01 15:23:30 +01:00
Erik Johnston
1666c0696a
Track IS used to bind 3PIDs
...
This will then be used to know which IS to default to when unbinding the
threepid.
2019-04-01 15:23:01 +01:00
manuroe
d461c65465
Merge pull request #4981 from matrix-org/manuroe/demo_bypass_account_rate_limiting
...
start.sh: Fix the --no-rate-limit option for messages
2019-04-01 16:00:08 +02:00
Neil Johnson
62988f73fd
Merge branch 'master' into develop
2019-04-01 14:08:53 +01:00
Neil Johnson
35442efb75
0.99.3
2019-04-01 12:49:03 +00:00
manuroe
bb925b1bd7
start.sh: Fix the --no-rate-limit option for messages and make it bypass rate limit on registration and login too.
2019-04-01 14:27:28 +02:00
Neil Johnson
ed1ce0333c
convert rst link to md
2019-04-01 12:53:08 +01:00
Richard van der Hoff
54a87a7b08
Collect room-version variations into one place ( #4969 )
...
Collect all the things that make room-versions different to one another into
one place, so that it's easier to define new room versions.
2019-04-01 10:24:38 +01:00
Richard van der Hoff
215c15d049
Merge pull request #4968 from Jurrie/feature/fix_small_stuff_in_Docker_README.md
...
Feature/fix small stuff in docker readme.md
2019-03-29 10:09:39 +00:00
Jurrie Overgoor
50b5f08740
Add changelog.d entry
2019-03-29 10:30:24 +01:00
Jurrie Overgoor
e0f219789d
Add -p argument for docker run command example
...
Signed-off-by: Jurrie Overgoor <1213142+Jurrie@users.noreply.github.com >
2019-03-29 10:25:41 +01:00
Jurrie Overgoor
aee4ea8ba8
Fix typo in TLS filenames
...
Signed-off-by: Jurrie Overgoor <1213142+Jurrie@users.noreply.github.com >
2019-03-29 10:25:41 +01:00
Richard van der Hoff
902cdc63b6
Merge pull request #4955 from matrix-org/rav/merge_state_into_events
...
Combine the CurrentStateDeltaStream into the EventStream
2019-03-28 18:32:13 +00:00
Richard van der Hoff
d688a51736
Merge pull request #4954 from matrix-org/rav/refactor_parse_row
...
Refactors to replication stream row update/parsing
2019-03-28 18:31:17 +00:00
Neil Johnson
c7296bcb98
remove log line for password ( #4965 )
...
Remove log line for password.
2019-03-28 17:38:01 +00:00
Andrew Morgan
7a91b9d81c
Allow password providers to bind emails ( #4947 )
...
This PR allows password provider modules to bind email addresses when a user is registering and is motivated by matrix-org/matrix-synapse-ldap3#58
2019-03-28 15:48:07 +00:00
Erik Johnston
248014379e
Merge pull request #4942 from matrix-org/erikj/fix_presence
...
Use event streams to calculate presence
2019-03-28 14:38:31 +00:00
Erik Johnston
4e5f0f7ca0
Use an assert
2019-03-28 14:05:05 +00:00
Erik Johnston
40e56997bc
Review comments
2019-03-28 13:48:41 +00:00
Richard van der Hoff
d035d62f6b
Merge remote-tracking branch 'origin/develop' into rav/refactor_parse_row
2019-03-28 13:45:14 +00:00
Richard van der Hoff
4eeb2c2f07
Merge pull request #4953 from matrix-org/rav/refactor_replication_streams
...
Split up replication.tcp.streams into smaller files
2019-03-28 13:43:25 +00:00
Amber Brown
2e060774ad
Run black on some storage modules that the stats branch touches ( #4959 )
2019-03-29 00:37:16 +11:00
Richard van der Hoff
17d7bacbcf
changelog
2019-03-27 22:08:39 +00:00
Richard van der Hoff
4b91c313a9
Combine the CurrentStateDeltaStream into the EventStream
2019-03-27 22:07:05 +00:00
Richard van der Hoff
1f6d6f918a
Make EventStream rows have a type
...
... as a precursor to combining it with the CurrentStateDelta stream.
2019-03-27 22:07:05 +00:00
Richard van der Hoff
a65763a5d6
changelog
2019-03-27 22:04:01 +00:00
Richard van der Hoff
015b3622eb
Skip building a ROW_TYPE when building updates
...
We're about to turn it straight into a JSON object anyway so building a
ROW_TYPE is a bit pointless, and reduces flexibility in the update_function.
2019-03-27 21:58:03 +00:00
Richard van der Hoff
f570916a3e
Add parse_row method to replication stream class
...
This will allow individual stream classes to override how a row is parsed.
2019-03-27 21:32:33 +00:00
Richard van der Hoff
91c3513668
changelog
2019-03-27 21:30:01 +00:00
Richard van der Hoff
71dcb275f1
move FederationStream out to its own file
2019-03-27 21:13:14 +00:00
Richard van der Hoff
aa1e017864
move EventsStream out to its own file
2019-03-27 21:13:14 +00:00
Richard van der Hoff
a5798de067
Move replication.tcp.streams into a package
2019-03-27 21:13:14 +00:00
Richard van der Hoff
acaa18f7dd
Fix/improve some docstrings in the replication code. ( #4949 )
2019-03-27 21:12:36 +00:00
Erik Johnston
d5a5d1c632
Newsfile
2019-03-27 13:41:36 +00:00
Erik Johnston
b7fa834c40
Add unit tests
2019-03-27 13:41:36 +00:00
Erik Johnston
197fae1639
Use event streams to calculate presence
...
Primarily this fixes a bug in the handling of remote users joining a
room where the server sent out the presence for all local users in the
room to all servers in the room.
We also change to using the state delta stream, rather than the
distributor, as it will make it easier to split processing out of the
master process (as well as being more flexible).
Finally, when sending presence states to newly joined servers we filter
out old presence states to reduce the number sent. Initially we filter
out states that are offline and have a last active more than a week ago,
though this can be changed down the line.
Fixes #3962
2019-03-27 13:41:36 +00:00
Neil Johnson
6a69bf67db
0.99.3rc1
2019-03-27 10:24:24 +00:00
Neil Johnson
4aa914369b
bump version
2019-03-27 10:23:03 +00:00
Andrew Morgan
bbd244c7b2
Support 3PID login in password providers ( #4931 )
...
Adds a new method, check_3pid_auth, which gives password providers
the chance to allow authentication with third-party identifiers such
as email or msisdn.
2019-03-26 17:48:30 +00:00
Amber Brown
903f04c21f
Use the state event amount for userdir import batching, not room count ( #4944 )
2019-03-27 02:49:28 +11:00
Andrew Morgan
4a125be138
Make federation endpoints more tolerant of trailing slashes v2 ( #4935 )
...
Redo of https://github.com/matrix-org/synapse/pull/4840
2019-03-26 11:35:29 +00:00
Richard van der Hoff
8cbbedaa2b
Fix ClientReplicationStreamProtocol.__str__ ( #4929 )
...
`__str__` depended on `self.addr`, which was absent from
ClientReplicationStreamProtocol, so attempting to call str on such an object
would raise an exception.
We can calculate the peer addr from the transport, so there is no need for addr
anyway.
2019-03-25 16:41:51 +00:00
Richard van der Hoff
9bde730ef8
Fix bug where read-receipts lost their timestamps ( #4927 )
...
Make sure that they are sent correctly over the replication stream.
Fixes : #4898
2019-03-25 16:38:05 +00:00
Richard van der Hoff
a54a44734f
Use an explicit dbname for postgres connections in the tests. ( #4928 )
...
I don't have a database with the same name as my user, so leaving the database
name unset fails.
While we're at it, clear out some unused stuff in the test setup.
2019-03-25 16:36:56 +00:00
Richard van der Hoff
7105057cf2
Fix nginx example in ACME doc. ( #4923 )
2019-03-25 09:59:36 +00:00
Amber Brown
ac396a0d32
Refactor out state delta handling into its own class ( #4917 )
2019-03-25 20:37:08 +11:00
Erik Johnston
5fee9d8067
Merge pull request #4869 from matrix-org/erikj/yaml_load
...
Fix yaml warnings by using safe_load
2019-03-22 11:58:13 +00:00
Erik Johnston
d21a4d6be6
Newsfile
2019-03-22 10:24:58 +00:00
Erik Johnston
3677548a82
Use yaml safe_load
2019-03-22 10:20:17 +00:00
Richard van der Hoff
224783a73f
Allow newsfragments to end with exclamation marks! ( #4912 )
2019-03-21 15:28:19 +00:00
Amber Brown
a68e00fca8
Some more porting to HomeserverTestCase and remove old RESTHelper ( #4913 )
2019-03-22 02:10:21 +11:00
Andrew Morgan
7bef97dfb7
Remove trailing slashes from outbound federation requests and retry on 400 ( #4840 )
...
As per #3622 , we remove trailing slashes from outbound federation requests. However, to ensure that we remain backwards compatible with previous versions of Synapse, if we receive a HTTP 400 with `M_UNRECOGNIZED`, then we are likely talking to an older version of Synapse in which case we retry with a trailing slash appended to the request path.
2019-03-21 15:07:28 +00:00
Andrew Morgan
b41c2eaadc
Clean up backoff_on_404 and metehod calls
2019-03-21 14:32:47 +00:00
Erik Johnston
01e6b405be
Merge pull request #4908 from matrix-org/erikj/block_peek_on_blocked_rooms
...
Deny peeking into rooms that have been blocked
2019-03-21 14:07:17 +00:00
Richard van der Hoff
27813b4ca1
Update changelog.d/4908.bugfix
...
Co-Authored-By: erikjohnston <erikj@jki.re >
2019-03-21 14:05:59 +00:00
Colin W
ab4e4c6c2f
Update Apache Setup To Remove Location Syntax ( #4870 )
...
This one should close #4841 . Many thanks to @dev4223 for bringing it up and finding a solution.
Signed-off-by: Colin White
2019-03-21 14:05:56 +00:00
Erik Johnston
d3f640f0ac
isort
2019-03-21 11:29:48 +00:00
Erik Johnston
017ed9d423
Newsfile
2019-03-21 11:26:47 +00:00
Erik Johnston
3959858eaa
Merge pull request #4904 from matrix-org/erikj/fix_shutdown
...
Fixup shutdown room API
2019-03-21 11:24:42 +00:00
Erik Johnston
cd80cbffea
Fix typo and add description
2019-03-21 11:24:04 +00:00
Erik Johnston
536a266520
Deny peeking into rooms that have been blocked
2019-03-21 11:20:13 +00:00
Erik Johnston
4a8a1ac962
Rejig testcase to make it more extensible
2019-03-21 11:02:11 +00:00
Erik Johnston
9c9e618b93
Remove debug
2019-03-21 10:58:56 +00:00
Erik Johnston
5c6f61f81c
Add tests
2019-03-21 10:51:21 +00:00
Erik Johnston
3ecec5ede2
Fix upsert
2019-03-21 10:21:15 +00:00
Erik Johnston
09f991a63d
Merge pull request #4896 from matrix-org/erikj/disable_room_directory
...
Add option to disable search room lists
2019-03-21 10:16:54 +00:00
Richard van der Hoff
a6f2d3053d
Log requests which are simulated by the unit tests. ( #4905 )
...
Rather than stubbing out the access_log, make it actually log the requests,
which makes it a lot more obvious what is going on during tests.
2019-03-20 18:00:02 +00:00
Erik Johnston
cd62981a6a
Revert spurious delete
2019-03-20 17:51:27 +00:00
Erik Johnston
8d8834d3e7
comment block_room
2019-03-20 17:49:56 +00:00
Erik Johnston
aa959a6c07
Use flags
2019-03-20 17:40:29 +00:00
Erik Johnston
7d47cc1305
Move requester check into assert_accepted_privacy_policy
2019-03-20 17:08:36 +00:00
Erik Johnston
30e69ff9b6
Newsfile
2019-03-20 16:56:55 +00:00
Erik Johnston
72a14860ab
Gracefully handle failing to kick user
2019-03-20 16:54:21 +00:00
Erik Johnston
6b28890543
Log new room ID
2019-03-20 16:52:28 +00:00
Erik Johnston
74c46d81fa
Only require consent for events with an associated request
...
There are a number of instances where a server or admin may puppet a
user to join/leave rooms, which we don't want to fail if the user has
not consented to the privacy policy. We fix this by adding a check to
test if the requester has an associated access_token, which is used as a
proxy to answer the question of whether the action is being done on
behalf of a real request from the user.
2019-03-20 16:50:23 +00:00
Erik Johnston
67d618e111
Allow blocking a room multiple times
2019-03-20 16:50:05 +00:00
Erik Johnston
263f2c9ce1
Merge pull request #4895 from matrix-org/erikj/disable_user_search
...
Add option to disable searching in the user dir
2019-03-20 16:47:15 +00:00
Amber Brown
4d53017432
Batching in the user directory import ( #4900 )
2019-03-21 03:06:36 +11:00
Richard van der Hoff
cdb8036161
Add a config option for torture-testing worker replication. ( #4902 )
...
Setting this to 50 or so makes a bunch of sytests fail in worker mode.
2019-03-20 16:04:35 +00:00
Richard van der Hoff
a902d13180
Batch up outgoing read-receipts to reduce federation traffic. ( #4890 )
...
Rate-limit outgoing read-receipts as per #4730 .
2019-03-20 16:02:25 +00:00
Erik Johnston
3660d24ebe
Add test
2019-03-20 15:16:36 +00:00
Erik Johnston
cc09685830
Add test
2019-03-20 14:53:44 +00:00
Erik Johnston
cd8c5b91ad
Fix up sample config
2019-03-20 14:35:41 +00:00
Richard van der Hoff
ab20f85c59
Update synapse/config/user_directory.py
...
Co-Authored-By: erikjohnston <erikj@jki.re >
2019-03-20 14:33:11 +00:00
Erik Johnston
cc197a61a1
Disable publishing to room list when its disabled
2019-03-20 14:30:36 +00:00
Erik Johnston
2c90422146
Pull out config option
2019-03-20 14:25:58 +00:00
Erik Johnston
7529038e66
Return before we log
2019-03-20 14:25:28 +00:00
Erik Johnston
926f29ea6d
Fix up config comments
2019-03-20 14:24:53 +00:00
Andrew Morgan
2150151abe
kwargs doesn't like commas on calling funcs either. TIL
2019-03-20 14:13:32 +00:00
Andrew Morgan
bb52a2e653
lint
2019-03-20 14:08:57 +00:00
Andrew Morgan
cd36a1283b
New test, fix issues
2019-03-20 14:00:39 +00:00
Andrew Morgan
c69df5d5d3
Fix comments. v0.99.2 -> v0.99.3
2019-03-20 11:27:18 +00:00
Andrew Morgan
551ea11559
Just return if not doing any trailing slash shennanigans
2019-03-20 11:07:36 +00:00
Andrew Morgan
94cb7939e4
Federation test fixed!
2019-03-20 10:50:44 +00:00
Erik Johnston
bf5876990f
Newsfile
2019-03-19 17:10:54 +00:00
Erik Johnston
213c98c00a
Add option to disable search room lists
...
This disables both local and remote room list searching.
2019-03-19 17:10:52 +00:00
Erik Johnston
855bf4658d
Update sample config
2019-03-19 16:47:04 +00:00
Erik Johnston
0891202629
Newsfile
2019-03-19 16:41:57 +00:00
Erik Johnston
320667a479
Add option to disable searching in the user dir
...
We still populate it, as it can still be accessed via the admin API.
2019-03-19 16:40:19 +00:00
Erik Johnston
11f2125885
Merge pull request #4894 from matrix-org/erikj/postgres_tuning
...
Add note on tuning postgres
2019-03-19 16:21:24 +00:00
Erik Johnston
38ae23d5c2
Newsfile
2019-03-19 16:07:07 +00:00
Erik Johnston
b616a8717b
Add note on tuning postgres
2019-03-19 16:05:32 +00:00
Erik Johnston
4aa0b707d2
Merge pull request #4879 from matrix-org/erikj/test_old_deps
...
Add py27-old test case to buildkite
2019-03-19 13:05:39 +00:00
Erik Johnston
b0e767f7bb
Add comment back in
2019-03-19 12:51:32 +00:00
Richard van der Hoff
5cf00c9f60
Merge pull request #4889 from matrix-org/rav/test_real_config
...
Use a regular HomeServerConfig object for unit tests
2019-03-19 12:27:07 +00:00
Richard van der Hoff
7872638c31
Merge pull request #4888 from matrix-org/rav/fix_disabled_hs
...
Enforce hs_disabled_message correctly
2019-03-19 12:22:13 +00:00
Richard van der Hoff
b5d48560c7
Fix RegistrationTestCase
...
turns out this relies on there being a `user_consent_version` set.
2019-03-19 12:05:05 +00:00
Richard van der Hoff
07f057ac80
changelog
2019-03-19 11:44:43 +00:00
Richard van der Hoff
13bc1e0746
Use a regular HomeServerConfig object for unit tests
...
Rather than using a Mock for the homeserver config, use a genuine
HomeServerConfig object. This makes for a more realistic test, and means that
we don't have to keep remembering to add things to the mock config every time
we add a new config setting.
2019-03-19 11:44:43 +00:00
Richard van der Hoff
053c50bcb3
Fix resource limits tests
...
Make sure that we have a `server_notices_mxid` set, given that we are relying
on it.
2019-03-19 11:44:43 +00:00
Richard van der Hoff
45bb54a6c6
Fix registration test
...
* Set allow_guest_access = True, since we rely on it
* config doesn't have a `hostname` attribute; it is `server_name`
2019-03-19 11:44:43 +00:00
Richard van der Hoff
8c1774e821
Fix email test
...
The Mailer expects the config object to have `email_smtp_pass` and
`email_riot_base_url` attributes (and it won't by default, because the default
config impl doesn't set any of the attributes unless email_enable_notifs is
set).
2019-03-19 11:44:43 +00:00
Richard van der Hoff
45c4e19c74
Merge remote-tracking branch 'origin/develop' into HEAD
2019-03-19 11:43:46 +00:00
Neil Johnson
88f0675967
fix test_auto_create_auto_join_where_no_consent ( #4886 )
2019-03-19 11:38:59 +00:00
Richard van der Hoff
0dbfae03f9
Enforce hs_disabled_message correctly
...
Fixes a bug where hs_disabled_message was not enforced for 3pid-based requests
if there was no server_notices_mxid configured.
2019-03-19 11:30:54 +00:00
Erik Johnston
e9eeca1314
Fix user directory background update ( #4887 )
2019-03-19 22:13:53 +11:00
Erik Johnston
cfc5a442ac
Update newsfile
2019-03-19 10:56:11 +00:00
Richard van der Hoff
d2a537ea60
Merge remote-tracking branch 'origin/master' into develop
2019-03-19 10:37:50 +00:00
Michael Kaye
9482a84c0a
Repoint docs for federation ( #4881 )
2019-03-19 10:37:18 +00:00
Erik Johnston
4d25624ff6
Revert changes
2019-03-19 10:28:00 +00:00
Richard van der Hoff
fd463b4f5d
Comment out most options in the generated config. ( #4863 )
...
Make it so that most options in the config are optional, and commented out in
the generated config.
The reasons this is a good thing are as follows:
* If we decide that we should change the default for an option, we can do so,
and only those admins that have deliberately chosen to override that option
will be stuck on the old setting.
* It moves us towards a point where we can get rid of the super-surprising
feature of synapse where the default settings for the config come from the
generated yaml.
* It makes setting up a test config for unit testing an order of magnitude
easier (see forthcoming PR).
* It makes the generated config more consistent, and hopefully easier for users
to understand.
2019-03-19 10:06:40 +00:00
Amber Brown
282c97327f
Migrate the user directory initial population to a background task ( #4864 )
2019-03-19 04:50:24 +11:00
Andrew Morgan
a8ad39eec7
lint
2019-03-18 17:47:39 +00:00
Andrew Morgan
621e7f37f1
Better exception handling
2019-03-18 17:45:54 +00:00
Erik Johnston
00d97668bf
Bring py27-old into line with other test envs
2019-03-18 17:45:49 +00:00
Erik Johnston
b6ac5e40a0
Add coverage to py27-old
2019-03-18 17:38:22 +00:00
Erik Johnston
9ef1107b33
Newsfile
2019-03-18 17:19:49 +00:00
Erik Johnston
45f97de657
Add py27-old test case to buildkite
2019-03-18 17:15:46 +00:00
Brendan Abolivier
651ad8bc96
Add ratelimiting on failed login attempts ( #4865 )
2019-03-18 12:57:20 +00:00
Brendan Abolivier
899e523d6d
Add ratelimiting on login ( #4821 )
...
Add two ratelimiters on login (per-IP address and per-userID).
2019-03-15 17:46:16 +00:00
Richard van der Hoff
3b7ceb2c69
Merge pull request #4855 from matrix-org/rav/refactor_transaction_queue
...
Split TransactionQueue up
2019-03-15 12:32:11 +00:00
Richard van der Hoff
2dee441bdb
Merge pull request #4852 from matrix-org/rav/move_rr_sending_to_worker
...
Move client receipt processing to federation sender worker.
2019-03-15 12:30:30 +00:00
Erik Johnston
b0fa3f6ff3
Merge pull request #4853 from matrix-org/erikj/worker_docker_ci
...
Allow passing --daemonize to workers
2019-03-15 10:35:38 +00:00
Luca Corbatto
a6d84190eb
Add systemd setup that supports workers ( #4662 )
...
This setup is a way to manage workers with systemd. It does however not
require workers. You can use this setup without workers. You just have
to make sure that the homeserver is forking and writes its PID file
to the location the service is looking in.
The currently distributed setup in the debian package does not work in
conjunction with workers.
* Adds changelog
* Lets systemd handle the forking
Sets all services to `type=simple` and disables daemonizing on the
synapse side.
* Formats readme to 80 columns per line
* Allows for full restart of all workers
* Changes README to reflect the new setup
* Adds dot to end of changelog file
* Removes surplus word
Co-Authored-By: targodan <targodan@users.noreply.github.com >
* Adds missing word
Co-Authored-By: targodan <targodan@users.noreply.github.com >
* Fixes linebreak
Co-Authored-By: targodan <targodan@users.noreply.github.com >
* Fixes unit type
2019-03-15 09:51:46 +00:00
Richard van der Hoff
9ffadcdbad
fix some typos in federate.md
2019-03-15 09:43:24 +00:00
Aaron Raimist
2fb4ff8c89
Add some stuff back to the .gitignore ( #4843 )
...
* Add some stuff back to the .gitignore
Signed-off-by: Aaron Raimist <aaron@raim.ist >
* Add changelog
Signed-off-by: Aaron Raimist <aaron@raim.ist >
* Reorder and remove old items from .gitignore
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-03-15 09:22:29 +00:00
Erik Johnston
6861ce3fb1
Merge pull request #4859 from matrix-org/revert-4793-anoa/trailing_slashes
...
Revert "Make federation endpoints more tolerant of trailing slashes for some endpoints"
2019-03-14 14:31:40 +00:00
Erik Johnston
271cb1998b
Revert "Make federation endpoints more tolerant of trailing slashes for some endpoints ( #4793 )"
...
This reverts commit 290552fd83 .
2019-03-14 14:30:54 +00:00
Erik Johnston
9073cfc8bd
Merge pull request #4846 from matrix-org/hawkowl/userdir-search
...
Improve searching in the userdir
2019-03-14 13:54:15 +00:00
Erik Johnston
9ad448c1e5
Correctly handle all command line options
2019-03-14 13:32:14 +00:00
Richard van der Hoff
ec3a59de50
changelog
2019-03-13 22:08:37 +00:00
Andrew Morgan
ecea5af491
Correct var name
2019-03-13 21:21:03 +00:00
Andrew Morgan
b2df0e8e2c
receiving a 400 caused an exception. handle it
2019-03-13 21:08:10 +00:00
Andrew Morgan
9a2e22fd41
is this what purgatory feels like
2019-03-13 20:29:38 +00:00
Andrew Morgan
86c60bda15
i should have given up x3
2019-03-13 20:19:07 +00:00
Andrew Morgan
45524f2f5e
i should have given up x2
2019-03-13 20:17:39 +00:00
Andrew Morgan
8d16ffaf7a
i should have given up
2019-03-13 20:03:10 +00:00
Richard van der Hoff
02e23b36bc
Rename and move the classes
2019-03-13 20:02:56 +00:00
Andrew Morgan
26f8e2d099
there comes a time when you should give up. but you dont
2019-03-13 19:49:08 +00:00
Andrew Morgan
5ca857ad84
as above
2019-03-13 19:35:23 +00:00
Andrew Morgan
7c0295f13c
no kwargs today
2019-03-13 19:27:10 +00:00
Andrew Morgan
66cdb840a6
Or perhaps I was the one who was drunk
2019-03-13 19:18:25 +00:00
Andrew Morgan
bec313818c
go home python, you're drunk
2019-03-13 19:10:56 +00:00
Andrew Morgan
c991e7aec7
Syntax checker is bork
2019-03-13 19:08:08 +00:00
Andrew Morgan
c2d848b80d
Destructure again
2019-03-13 19:04:43 +00:00
Andrew Morgan
ee8ba397e8
Are you happy now
2019-03-13 18:48:31 +00:00
Andrew Morgan
9dd0e34679
Syntax test
2019-03-13 18:45:17 +00:00
Andrew Morgan
220607a618
Remove testing code
2019-03-13 18:43:40 +00:00
Andrew Morgan
660b77f362
Add missing docstring detail
2019-03-13 18:38:16 +00:00
Andrew Morgan
5526b054aa
Fix syntax issues
2019-03-13 18:35:21 +00:00
Andrew Morgan
09626bfd39
Switch to wrapper function around _send_request
2019-03-13 18:26:06 +00:00
Richard van der Hoff
5d89a526f1
Factor per-destination stuff out of TransactionQueue
...
This is easier than having to have a million fields keyed on destination.
2019-03-13 17:48:29 +00:00
Erik Johnston
f5d57d4848
Newsfile
2019-03-13 17:38:58 +00:00
Erik Johnston
72bfaf746d
Allow passing --daemonize to workers
2019-03-13 17:33:54 +00:00
Richard van der Hoff
6accbd25bc
changelog
2019-03-13 17:24:10 +00:00
Richard van der Hoff
fdcad8eabd
Move client receipt processing to federation sender worker.
...
This is mostly a prerequisite for #4730 , but also fits with the general theme
of "move everything off the master that we possibly can".
2019-03-13 17:21:19 +00:00
Richard van der Hoff
eed7271b3b
declare a ReadReceipt class
...
I'm going to use this in queues and things, so it'll be useful to give it more
of a structure.
2019-03-13 17:20:55 +00:00
Andrew Morgan
7998ca3a66
Document using a certificate with a full chain ( #4849 )
2019-03-13 15:26:29 +00:00
Andrew Morgan
7d053cfe10
Retry on 400:M_UNRECOGNIZED
2019-03-13 12:10:33 +00:00
Andrew Morgan
7e75d9644b
Fix paranthesis indent
2019-03-13 11:15:23 +00:00
Andrew Morgan
cf301e37d8
Add workaround note
2019-03-13 11:14:43 +00:00
Neil Johnson
332b60ec68
Merge branch 'master' of github.com:matrix-org/synapse into develop
2019-03-12 17:15:21 +00:00
Neil Johnson
83193a9362
fix orphaned sentence
2019-03-12 16:57:17 +00:00
Andrew Morgan
d42c81d724
Transfer local user's push rules on room upgrade ( #4838 )
...
Transfer push rules (notifications) on room upgrade
2019-03-12 14:42:53 +00:00
Amber Brown
c0332d095f
fixup
2019-03-13 01:30:54 +11:00
Andrew Morgan
97653ef1f4
Correct argument name
2019-03-12 14:30:26 +00:00
Neil Johnson
8b692bf7c2
Neilj/improved delegation doc 2 ( #4832 )
...
Improved federation configuration docs. Specifically detailing .well-known and SRV based delegation methods.
Inspiration Valentin Lab <valentin.lab@kalysto.org > for https://github.com/matrix-org/synapse/pull/4781
2019-03-12 14:23:28 +00:00
Amber Brown
797b6a63fc
fixup
2019-03-13 01:17:51 +11:00
Andrew Morgan
0ea8582f8b
Cleaner way of implementing trailing slashes
2019-03-12 14:11:11 +00:00
Amber Brown
d306bd1b26
fixup
2019-03-12 22:38:01 +11:00
Amber Brown
81d9d1bee6
fixup
2019-03-12 22:28:48 +11:00
Amber Brown
6f5890b2fa
fixup
2019-03-12 22:27:56 +11:00
Amber Brown
10480c4348
fixup
2019-03-12 21:47:14 +11:00
Amber Brown
8b618041ef
fixup
2019-03-12 18:06:28 +11:00
Amber Brown
c980c7e31f
use the old method
2019-03-12 17:51:14 +11:00
Andrew Morgan
4868b12029
and again
2019-03-11 18:22:26 +00:00
Aaron Raimist
8ea1b41a0e
Clarify what registration_shared_secret allows for ( #2885 ) ( #4844 )
...
* Clarify what registration_shared_secret allows for (#2885 )
Signed-off-by: Aaron Raimist <aaron@raim.ist >
* Add changelog
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-03-11 18:21:52 +00:00
Andrew Morgan
802cb5dcf0
Fix syntax error
2019-03-11 18:08:28 +00:00
Andrew Morgan
66f205e93d
We're calling different functions now
2019-03-11 18:01:58 +00:00
Andrew Morgan
f18dca26da
Merge branch 'develop' into anoa/trailing_slashes_client
2019-03-11 17:44:29 +00:00
Andrew Morgan
290552fd83
Make federation endpoints more tolerant of trailing slashes for some endpoints ( #4793 )
...
Server side of a solution towards #3622 .
2019-03-11 17:44:03 +00:00
Erik Johnston
9c0e6e8e7c
Merge pull request #4847 from matrix-org/erikj/fix_stacktrace_keyring
...
Correctly log expected errors when fetching server keys
2019-03-11 17:12:20 +00:00
Andrew Morgan
a8a028dfce
Merge branch 'develop' into anoa/trailing_slashes_client
2019-03-11 17:07:31 +00:00
Erik Johnston
33dfd9a288
Newsfile
2019-03-11 14:13:58 +00:00
Erik Johnston
78c563b77c
Correctly log expected errors when fetching server keys
2019-03-11 14:11:10 +00:00
Amber Brown
78a6b950b3
fix
2019-03-12 00:50:28 +11:00
Amber Brown
1b77bd69fb
pep8
2019-03-12 00:39:12 +11:00
Amber Brown
41a5ba1682
changelog
2019-03-12 00:38:17 +11:00
Amber Brown
5ba8ceab4c
fixes
2019-03-12 00:35:31 +11:00
Amber Brown
26eefca3b7
setup master
2019-03-11 21:16:10 +11:00
Amber Brown
8da22e2b53
master startup
2019-03-11 21:13:35 +11:00
Amber Brown
30a8deeb68
Merge remote-tracking branch 'origin/develop' into hawkowl/userdir-search
2019-03-11 21:12:30 +11:00
Amber Brown
4abc988c6a
initial
2019-03-11 21:11:36 +11:00
Andrew Morgan
b61ac9660a
Merge pull request #4839 from matrix-org/anoa/no_captcha_tests
...
Disable captcha registration by default in tests
2019-03-11 09:58:43 +00:00
Matthew Hodgson
2326e00bc4
fix incorrect encoding of filenames with spaces in ( #2090 )
...
fixes https://github.com/vector-im/riot-web/issues/3155
2019-03-11 09:53:45 +00:00
Erik Johnston
ca7f7d84f4
Merge pull request #4837 from matrix-org/erikj/optional_prev_state
...
Make `prev_state` field optional
2019-03-11 09:22:33 +00:00
Andrew Morgan
a5dd335cd8
lint
2019-03-08 18:25:59 +00:00
Andrew Morgan
f8740d57de
Add changelog
2019-03-08 18:23:54 +00:00
Andrew Morgan
64ff11019e
Retry certain federation requests on 404
2019-03-08 18:22:47 +00:00
Andrew Morgan
525dd02bbe
Remove trailing slashes from outbound federation requests
2019-03-08 16:55:52 +00:00
Andrew Morgan
50924ee34a
Add changelog
2019-03-08 16:49:16 +00:00
Erik Johnston
fe6c12e6cd
Add comment to schema
2019-03-08 16:38:23 +00:00
Andrew Morgan
d6e0be92fe
Disable captcha registration by default in tests
2019-03-08 15:49:38 +00:00
Erik Johnston
cac4723afe
Newsfile
2019-03-08 15:08:34 +00:00
Erik Johnston
5536ddba75
Make prev_state field optional
...
The `prev_state` field on events is not specced and so synapse shouldn't
explode if an event is missing the field.
Fixes #4787
2019-03-08 15:05:32 +00:00
Erik Johnston
39e57f9728
Merge pull request #4814 from matrix-org/erikj/soft_fail_impl
...
Implement soft fail
2019-03-08 14:51:06 +00:00
Erik Johnston
8c4896668f
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/soft_fail_impl
2019-03-08 11:44:20 +00:00
Erik Johnston
0ff8163eae
Factor out soft fail checks
2019-03-08 11:26:33 +00:00
Erik Johnston
469b66c102
Merge pull request #4829 from matrix-org/erikj/device_list_seen_updates
...
When re-syncing device lists reset the state
2019-03-08 09:54:54 +00:00
Erik Johnston
436b1c8be1
Merge pull request #4828 from matrix-org/erikj/debug_device_lists
...
Add some debug logging for device list handling
2019-03-07 17:02:58 +00:00
Erik Johnston
cef80da903
Newsfile
2019-03-07 16:18:02 +00:00
Erik Johnston
d42b41544a
When re-syncing device lists reset the state
...
We keep track of what stream IDs we've seen so that we know what updates
we've handled or missed. If we re-sync we don't know if the updates
we've seen are included in the re-sync (there may be a race), so we
should reset the seen updates.
2019-03-07 16:04:24 +00:00
Erik Johnston
7404fb3cdb
Newsfile
2019-03-07 16:00:09 +00:00
Erik Johnston
c633fc02d7
Add some debug logging for device list handling
2019-03-07 15:58:03 +00:00
Richard van der Hoff
fde26e47d6
Merge pull request #4824 from matrix-org/rav/docker_docs
...
Document the `generate` option for the docker image.
2019-03-07 14:12:44 +00:00
Richard van der Hoff
ba7a6807c8
Debian package: fix warning during preconfiguration. ( #4823 )
2019-03-07 14:12:27 +00:00
Richard van der Hoff
32471d63b7
Update example_log_config.yaml ( #4820 )
2019-03-07 14:12:10 +00:00
Richard van der Hoff
685704536f
Fix check-newsfragment for debian-only changes. ( #4825 )
2019-03-07 14:03:05 +00:00
Amber Brown
f6135d06cf
Rewrite userdir to be faster ( #4537 )
2019-03-07 01:22:53 -08:00
Richard van der Hoff
5580616235
Document the generate option for the docker image.
2019-03-07 07:35:42 +00:00
Richard van der Hoff
6e4931aa19
Debian package: fix warning during preconfiguration.
2019-03-07 07:18:06 +00:00
Matthew Hodgson
8f4b9f5210
Reword the sample config header to be less scary ( #4801 )
2019-03-07 07:09:01 +00:00
Travis Ralston
06cbf79fe3
Merge pull request #4779 from matrix-org/travis/icons
...
Use static locations for Riot icons
2019-03-06 15:11:41 -07:00
Richard van der Hoff
898378c9b5
Update changelog.d/4779.misc
...
Co-Authored-By: turt2live <travpc@gmail.com >
2019-03-06 14:29:56 -07:00
Erik Johnston
1f85c2c0ce
Merge pull request #4818 from matrix-org/erikj/prefill_client_ips
...
Prefill client IPs cache on workers
2019-03-06 19:17:39 +00:00
Erik Johnston
366877c579
Update changelog
2019-03-06 19:04:52 +00:00
Erik Johnston
0a6e716600
Merge pull request #4815 from matrix-org/erikj/docstrings
...
Add docstrings from matrix-org-hotfixes
2019-03-06 18:59:28 +00:00
Erik Johnston
c665b637de
Merge pull request #4816 from matrix-org/erikj/4422_debug
...
Port #4422 debug logging from hotfixes
2019-03-06 18:59:12 +00:00
Erik Johnston
ff7bd29ea9
Merge pull request #4817 from matrix-org/erikj/shutdown_room_message
...
Send message after room has been shutdown
2019-03-06 18:59:05 +00:00
Richard van der Hoff
b70ea3fa78
Add zwsp in bug report template ( #4811 )
...
Inserts a zero-width space in the `-->` which isn't supposed to close a
comment. This used to be here but it got lost in
d86826277d .
2019-03-06 17:55:59 +00:00
Erik Johnston
7791c5194e
Newsfile
2019-03-06 17:40:51 +00:00
Erik Johnston
face0c5b3c
Prefill client IPs cache on workers
2019-03-06 17:39:32 +00:00
Erik Johnston
03dce32019
Newsfile
2019-03-06 17:38:19 +00:00
Erik Johnston
b879870b2d
Send message after room has been shutdown
...
Currently the explanation message is sent to the abuse room before any
users are forced joined, which means it tends to get lost in the backlog
of joins.
So instead we send the message *after* we've forced joined everyone.
2019-03-06 17:35:11 +00:00
Erik Johnston
4238f63545
Newsfile
2019-03-06 17:32:48 +00:00
Erik Johnston
8b7790e68f
Port #4422 debug logging from hotfixes
2019-03-06 17:29:15 +00:00
Erik Johnston
9c50074c21
Newsfile
2019-03-06 17:24:53 +00:00
Erik Johnston
6d13bdec91
Add docstrings from matrix-org-hotfixes
2019-03-06 17:24:26 +00:00
Erik Johnston
4c473ba088
Newsfile
2019-03-06 16:24:03 +00:00
Erik Johnston
a9de04be72
Implement soft fail
2019-03-06 16:22:16 +00:00
Andrew Morgan
7b8a157b79
Merge pull request #4792 from matrix-org/anoa/replication_tokens
...
Support batch updates in the worker sender
2019-03-06 15:48:29 +00:00
Brendan Abolivier
20dd3403ee
Merge pull request #4804 from matrix-org/babolivier/ratelimit_registration_improvements
...
Improve ratelimit on registration
2019-03-06 11:40:10 +00:00
Brendan Abolivier
6f3cde8b25
Make registration ratelimiter separate from the main events one
2019-03-06 11:02:42 +00:00
Brendan Abolivier
f4195f4118
Revert "Split ratelimiters in two (one for events, one for registration)"
...
This reverts commit d7dbad3526 .
2019-03-06 10:55:22 +00:00
Brendan Abolivier
6fcecb4859
Add changelog
2019-03-05 18:55:29 +00:00
Brendan Abolivier
d7dbad3526
Split ratelimiters in two (one for events, one for registration)
2019-03-05 18:41:27 +00:00
Brendan Abolivier
c23e8c3333
Update sample config
2019-03-05 18:03:48 +00:00
Brendan Abolivier
067ce795c0
Move settings from registration to ratelimiting in config file
2019-03-05 18:03:14 +00:00
Erik Johnston
16c8b4ecbd
Merge pull request #4772 from jbweston/jbweston/server-version-api
...
Add 'server_version' endpoint to admin API
2019-03-05 16:31:00 +00:00
Brendan Abolivier
a4c3a361b7
Add rate-limiting on registration ( #4735 )
...
* Rate-limiting for registration
* Add unit test for registration rate limiting
* Add config parameters for rate limiting on auth endpoints
* Doc
* Fix doc of rate limiting function
Co-Authored-By: babolivier <contact@brendanabolivier.com >
* Incorporate review
* Fix config parsing
* Fix linting errors
* Set default config for auth rate limiting
* Fix tests
* Add changelog
* Advance reactor instead of mocked clock
* Move parameters to registration specific config and give them more sensible default values
* Remove unused config options
* Don't mock the rate limiter un MAU tests
* Rename _register_with_store into register_with_store
* Make CI happy
* Remove unused import
* Update sample config
* Fix ratelimiting test for py2
* Add non-guest test
2019-03-05 14:25:33 +00:00
Andrew Morgan
b9f6163092
Simplify token replication logic
2019-03-05 13:58:30 +00:00
Andrew Morgan
3887e0cd80
Merge pull request #4795 from matrix-org/anoa/configinatoractoring
...
Remove reference to that no longer exists in README
2019-03-05 09:47:14 +00:00
Andrew Morgan
ae90531036
Merge pull request #4794 from matrix-org/anoa/erroneous_dollahs
...
Remove unnecessary dollar signs
2019-03-05 09:46:59 +00:00
Erik Johnston
b050a10871
Merge pull request #4699 from matrix-org/erikj/stop_fed_not_in_room
...
Stop backpaginating when events not visible
2019-03-05 09:32:33 +00:00
Erik Johnston
9e8bca5667
Merge pull request #4799 from matrix-org/rav/clean_up_replication_code
...
Clean ups in replication notifier
2019-03-05 09:19:48 +00:00
Erik Johnston
aa06d26ae0
clarify comments
2019-03-05 09:16:35 +00:00
Erik Johnston
c3c542bb4a
Merge pull request #4796 from matrix-org/erikj/factor_out_e2e_keys
...
Allow /keys/{changes,query} API to run on worker
2019-03-05 09:06:25 +00:00
Richard van der Hoff
48583cef7e
Merge pull request #4798 from matrix-org/rav/rr_debug
...
Add some debug about processing read receipts.
2019-03-04 19:04:05 +00:00
Richard van der Hoff
cd7110c869
Merge pull request #4797 from matrix-org/rav/inline_rr_send
...
Clean up read-receipt handling.
2019-03-04 19:03:40 +00:00
Richard van der Hoff
eaa9f43603
changelog
2019-03-04 19:01:19 +00:00
Richard van der Hoff
c7325776a7
Remove redundant PreserveLoggingContext
...
Both (!) things that register as replication listeners do the right thing wrt
logcontexts, so this is redundant.
2019-03-04 18:31:18 +00:00
Erik Johnston
00b0e8b7df
Newsfile
2019-03-04 18:30:07 +00:00
Erik Johnston
bfa7d46a10
Allow /keys/{changes,query} API to run on worker
2019-03-04 18:30:01 +00:00
Erik Johnston
157e5a8f27
Split DeviceHandler into master and worker
2019-03-04 18:29:26 +00:00
Richard van der Hoff
daa10e3e66
Remove unused wait_for_replication method
...
I guess this was used once? It's not now, anyway.
2019-03-04 18:27:32 +00:00
Richard van der Hoff
2db49ea476
Add some debug about processing read receipts.
...
I'm hoping to establish which rooms are having lots of RRs sent for them, and
how old the events are when they are sent.
2019-03-04 18:19:40 +00:00
Richard van der Hoff
b29693a30b
Clean up read-receipt handling.
...
Remove a call to run_as_background_process: there is no need to run this as a
background process, because build_and_send_edu does not block.
We may as well inline the whole of _push_remotes.
2019-03-04 18:16:43 +00:00
Erik Johnston
a84b8d56c2
Fixup slave stores
2019-03-04 18:04:57 +00:00
Richard van der Hoff
8e28bc5eee
Include a default configuration file in the 'docs' directory. ( #4791 )
2019-03-04 17:14:58 +00:00
Erik Johnston
0d2d046709
Fix missing null guard
2019-03-04 16:04:04 +00:00
Andrew Morgan
be18073692
Add changelog
2019-03-04 16:01:17 +00:00
Andrew Morgan
d3f270f06a
Remove reference to that no longer exists in README
2019-03-04 15:59:43 +00:00
Andrew Morgan
3a438c24a6
Add changelog
2019-03-04 15:28:22 +00:00
Andrew Morgan
336de1d45b
Remove unnecessary dollar signs
...
A dollar sign is already appended to the end of each PATH, so there's
no need to add one in the PATH declaration as well.
2019-03-04 15:25:12 +00:00
Andrew Morgan
fe7bd23a85
Clean up logic and add comments
2019-03-04 15:08:15 +00:00
Erik Johnston
d1523aed6b
Only check history visibility when filtering
...
When filtering events to send to server we check more than just history
visibility. However when deciding whether to backfill or not we only
care about the history visibility.
2019-03-04 14:43:42 +00:00
Andrew Morgan
9f7cdf3da1
Clearer branching, fix missing list clear
2019-03-04 14:36:52 +00:00
Andrew Morgan
0bc50fb60a
Add changelog
2019-03-04 14:05:16 +00:00
Andrew Morgan
5f0c449dd5
Prevent replication wedging
2019-03-04 14:03:18 +00:00
Seebi
aba5eeabd5
Fix v4v6 option in HAProxy example config ( #4790 )
...
The v4v6 option only has a usage one ipv6 socket: https://serverfault.com/q/747895
Signed-off-by: Flakebi <flakebi@t-online.de >
2019-03-04 13:19:41 +00:00
Richard van der Hoff
856c83f5f8
Avoid rebuilding Edu objects in worker mode ( #4770 )
...
In worker mode, on the federation sender, when we receive an edu for sending
over the replication socket, it is parsed into an Edu object. There is no point
extracting the contents of it so that we can then immediately build another Edu.
2019-03-04 12:57:44 +00:00
Erik Johnston
8b63fe4c26
s/get_forward_events/get_successor_events/
2019-03-04 11:56:03 +00:00
Erik Johnston
fbc047f2a5
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/stop_fed_not_in_room
2019-03-04 11:54:58 +00:00
Richard van der Hoff
2c3548d9d8
Update test_typing to use HomeserverTestCase. ( #4771 )
2019-03-04 10:05:39 +00:00
Joseph Weston
144cbfd650
add API documentation
...
Signed-off-by: Joseph Weston <joseph@weston.cloud >
2019-03-02 03:07:04 +01:00
Travis Ralston
13c18853b9
Changelog
2019-03-01 15:15:00 -07:00
Travis Ralston
4dfbae18fe
Use static locations for Riot icons
...
See https://github.com/vector-im/riot-web/issues/9009
2019-03-01 15:06:21 -07:00
Richard van der Hoff
3064952939
Fix incorrect log about not persisting duplicate state event. ( #4776 )
...
We were logging this when it was not true.
2019-03-01 16:47:12 +00:00
Richard van der Hoff
1beebe916f
Merge branch 'master' into develop
2019-03-01 10:58:39 +00:00
Richard van der Hoff
ac6a0d72b2
0.99.2
2019-03-01 10:56:22 +00:00
Richard van der Hoff
9ac72d9543
0.99.2
2019-03-01 10:55:44 +00:00
Joseph Weston
d3dcb64501
Add changelog and AUTHORS file entry
...
Signed-off-by: Joseph Weston <joseph@weston.cloud >
2019-03-01 10:44:40 +01:00
Joseph Weston
1e8388b311
Add 'server_version' endpoint to admin API
...
This is required because the 'Server' HTTP header is not always
passed through proxies.
2019-03-01 09:56:58 +01:00
Joseph Weston
b136ee10df
Import 'admin' module rather than 'register_servlets' directly
...
We will later need also to import 'register_servlets' from the
'login' module, so we un-pollute the namespace now to keep the
logical changes separate.
2019-03-01 09:46:25 +01:00
Andrew Morgan
ac61b45a75
Minor docstring fixes for MatrixFederationAgent ( #4765 )
2019-02-28 16:24:01 +00:00
Amber Brown
b131cc77df
Make 'event_id' a required parameter in federated state requests ( #4741 )
...
* make 'event_id' a required parameter in federated state requests
As per the spec: https://matrix.org/docs/spec/server_server/r0.1.1.html#id40
Signed-off-by: Joseph Weston <joseph@weston.cloud >
* add changelog entry for bugfix
Signed-off-by: Joseph Weston <joseph@weston.cloud >
* Update server.py
2019-02-27 14:35:47 -08:00
Richard van der Hoff
68f47d6744
Fix parsing of Content-Disposition headers ( #4763 )
...
* Fix parsing of Content-Disposition headers
TIL: filenames in content-dispostion headers can contain semicolons, and aren't
%-encoded.
* fix python2 incompatibility
* Fix docstrings
2019-02-27 14:29:10 -08:00
Amber Brown
f2a753ea38
Move from TravisCI to BuildKite ( #4752 )
2019-02-27 13:03:14 -08:00
Erik Johnston
76550c58d2
Merge pull request #4759 from matrix-org/erikj/3pid_client_reader
...
Move /account/3pid to client_reader
2019-02-27 16:11:21 +00:00
Erik Johnston
8267034a63
Merge pull request #4758 from matrix-org/erikj/use_presence_replication
...
When presence is disabled don't send over replication
2019-02-27 15:46:26 +00:00
Richard van der Hoff
3134964054
Update changelog.d/4759.feature
...
Co-Authored-By: erikjohnston <erikj@jki.re >
2019-02-27 15:32:21 +00:00
Erik Johnston
46b0151524
Merge pull request #4757 from matrix-org/erikj/key_api_fed_readae
...
Move server key queries to federation reader
2019-02-27 15:30:40 +00:00
Erik Johnston
95840d84d4
Newsfile
2019-02-27 14:28:52 +00:00
Erik Johnston
54f9ce11a7
Move /account/3pid to client_reader
2019-02-27 14:26:08 +00:00
Erik Johnston
d4dc527a1a
Fix unit tests
2019-02-27 14:24:45 +00:00
Erik Johnston
1b2940b3bd
Newsfile
2019-02-27 13:54:45 +00:00
Erik Johnston
1e315017d3
When presence is enabled don't send over replication
2019-02-27 13:53:46 +00:00
Erik Johnston
b5c13df0c4
Newsfile
2019-02-27 13:46:29 +00:00
Erik Johnston
4cff9376f7
Move server key queries to federation reader
2019-02-27 13:43:53 +00:00
Erik Johnston
71ef5fc411
Update newsfile to have a full stop
2019-02-27 13:22:23 +00:00
Erik Johnston
b183fef9ac
Update comments
2019-02-27 13:06:10 +00:00
Erik Johnston
7590e9fa28
Merge pull request #4749 from matrix-org/erikj/replication_connection_backoff
...
Fix tightloop over connecting to replication server
2019-02-27 11:00:59 +00:00
Richard van der Hoff
44a4d65586
0.99.2rc1
2019-02-27 10:48:34 +00:00
Erik Johnston
6bb1c028f1
Limit cache invalidation replication line length ( #4748 )
2019-02-27 10:28:37 +00:00
Erik Johnston
6870fc496f
Move connecting logic into ClientReplicationStreamProtocol
2019-02-27 10:23:51 +00:00
Richard van der Hoff
f191be822b
Add database version to phonehome stats. ( #4753 )
2019-02-27 10:21:49 +00:00
Richard van der Hoff
57426ec6a3
Fix check-newsfragment script ( #4750 )
...
* Fix check-newsfragment script
I previously broke this so that it always succeeded...
* more fixes
* fix newsfiles
2019-02-26 13:13:41 -08:00
Paul Tötterman
4bc7483518
Fix apache reverse proxy example ( #4742 )
...
So that it actually works. See https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypass
Signed-off-by: Paul Tötterman <paul.totterman@iki.fi >
2019-02-26 18:01:45 +00:00
Erik Johnston
09fc34c935
Newsfile
2019-02-26 15:13:55 +00:00
Erik Johnston
25814921f1
Increase the max delay between retry attempts
...
Otherwise if you have many workers they can easily take out master with
their connection attempts
2019-02-26 15:12:33 +00:00
Erik Johnston
313987187e
Fix tightloop over connecting to replication server
...
If the client failed to process incoming commands during the initial set
up of the replication connection it would immediately disconnect and
reconnect, resulting in a tightloop.
This can happen, for example, when subscribing to a stream that has a
row that is too long in the backlog.
The fix here is to not consider the connection successfully set up until
the client has succesfully subscribed and caught up with the streams.
This ensures that the retry logic timers aren't reset until then,
meaning that if an error does happen during start up the client will
continue backing off before retrying again.
2019-02-26 15:05:41 +00:00
Andrew Morgan
4dc945ba30
Merge pull request #4746 from matrix-org/anoa/public_rooms_federate_develop
...
Prevent showing non-fed rooms in fed /publicRooms v2
2019-02-26 14:39:39 +00:00
Andrew Morgan
802884d4ee
Merge branch 'develop' of github.com:matrix-org/synapse into anoa/public_rooms_federate_develop
2019-02-26 14:23:40 +00:00
Andrew Morgan
b8e6ed36c1
Add changelog
2019-02-26 14:21:20 +00:00
Andrew Morgan
6fcb25202f
Put function def back to the way it was
2019-02-26 14:17:38 +00:00
Andrew Morgan
7a4632af9c
Prevent showing non-fed rooms in fed /publicRooms
2019-02-26 13:37:24 +00:00
Andrew Morgan
c0b6955e3b
Merge pull request #4745 from matrix-org/revert-4736-anoa/public_rooms_federate
...
Revert "Prevent showing non-fed rooms in fed /publicRooms"
2019-02-26 13:22:06 +00:00
Andrew Morgan
c74624a633
Revert "Prevent showing non-fed rooms in fed /publicRooms"
2019-02-26 13:20:38 +00:00
Andrew Morgan
a1a6473293
Merge pull request #4736 from matrix-org/anoa/public_rooms_federate
...
Config option to prevent showing non-fed rooms in fed /publicRooms
2019-02-26 13:07:15 +00:00
Andrew Morgan
c4414768af
Cleaner chunk logic
2019-02-26 12:22:34 +00:00
Andrew Morgan
a712aa3a9c
Correct indent
2019-02-26 12:13:55 +00:00
Andrew Morgan
16565e67db
Correct docstring types and chunk logic
2019-02-26 12:12:48 +00:00
Andrew Morgan
40c2271680
Clean up room chunk logic
2019-02-26 12:04:34 +00:00
Andrew Morgan
6728bf3940
Make not showing non-federated rooms the default
2019-02-26 11:52:52 +00:00
Andrew Morgan
6946c20111
Result may be None
2019-02-26 11:27:19 +00:00
Andrew Morgan
71669a0fba
Address rich comments
2019-02-26 11:25:00 +00:00
Erik Johnston
899a119c2b
Don't log stack trace when client has gone away during media download ( #4738 )
...
* Don't log stack trace when client has gone away during media download
* Newsfile
* Fixup newsfile
2019-02-25 11:17:22 -08:00
Richard van der Hoff
641c409e4e
Fix ACME config for python 2. ( #4717 )
...
Fixes #4675 .
2019-02-25 11:16:33 -08:00
Matthew Hodgson
70ea2f4e1d
switch from google.com to recaptcha.net for reCAPTCHA ( #4731 )
...
* add trivial clarification about jemalloc
* switch from google.com to recaptcha.net
because https://developers.google.com/recaptcha/docs/faq#can-i-use-recaptcha-globally
2019-02-25 11:15:36 -08:00
Andrew Morgan
96c408273e
Fix group's call to generate_room_entry
2019-02-25 18:00:17 +00:00
Andrew Morgan
1330aa4a8f
elif not else if
2019-02-25 17:28:19 +00:00
Erik Johnston
65f3fbfbf7
Merge pull request #4737 from matrix-org/erikj/failure_log_tb
...
Log tracebacks correctly
2019-02-25 17:26:30 +00:00
Erik Johnston
1d0f2ec812
Newsfile
2019-02-25 17:02:31 +00:00
Erik Johnston
c7b333c545
Log tracebacks correctly
2019-02-25 16:56:41 +00:00
Erik Johnston
69efe6fb16
Merge pull request #4718 from matrix-org/erikj/fix_backfill_state_shred
...
Fix backfill storing incorrect state for events
2019-02-25 16:48:52 +00:00
Erik Johnston
108d5fb20d
Fixup changelog
2019-02-25 16:32:19 +00:00
Erik Johnston
9c598dddcb
Fix typo
2019-02-25 16:32:02 +00:00
Erik Johnston
b1a90da82e
Merge pull request #4721 from matrix-org/erikj/msc_1866
...
MSC 1866 - Use M_UNSUPPORTED_ROOM_VERSION for invite API
2019-02-25 15:53:10 +00:00
Erik Johnston
16c7afa94c
Merge pull request #4722 from matrix-org/erikj/correctly_handle_keyring_exceptions
...
Handle errors when fetching remote server keys
2019-02-25 15:53:02 +00:00
Andrew Morgan
8aaf7ffc44
syntax derp
2019-02-25 15:27:17 +00:00
Andrew Morgan
84c0a20dfe
Simplify call to generate_room_entry
2019-02-25 15:23:27 +00:00
Erik Johnston
4b9e5076c4
Merge branch 'develop' of github.com:matrix-org/synapse into anoa/public_rooms_federate
2019-02-25 15:08:18 +00:00
Andrew Morgan
07493607a8
Docs and arg name clarification
2019-02-25 15:04:46 +00:00
Andrew Morgan
bd398b874e
Don't restrict non-fed rooms over client APIs
2019-02-25 15:04:46 +00:00
Andrew Morgan
e4b078a600
Config option to prevent showing non-fed rooms in fed /publicRooms
2019-02-25 15:04:46 +00:00
Erik Johnston
d730c2c22b
More comments
2019-02-25 14:45:02 +00:00
Erik Johnston
890cb048fd
Assert rather than clobber the values
2019-02-25 14:42:11 +00:00
Erik Johnston
5b9786ee00
Merge pull request #4723 from matrix-org/erikj/frontend_proxy_exception
...
Correctly proxy exception in frontend_proxy worker
2019-02-25 14:34:19 +00:00
Erik Johnston
65d1003d01
raise_from already raises
2019-02-25 14:34:03 +00:00
Erik Johnston
f5050e148c
Newsfile
2019-02-25 10:02:58 +00:00
Erik Johnston
9342cc6ab1
Add comments and paranoia
2019-02-25 10:02:12 +00:00
Erik Johnston
21d3f82344
Newsfile
2019-02-23 15:18:38 +00:00
Erik Johnston
47a7e3928d
Correctly proxy exception in frontend_proxy worker
2019-02-23 15:17:57 +00:00
Erik Johnston
65bf9f1119
Newsfile
2019-02-23 15:10:59 +00:00
Erik Johnston
41285ffe5b
Handle errors when fetching remote server keys
2019-02-23 15:09:39 +00:00
Erik Johnston
71304bfc8d
Newsfile
2019-02-23 14:53:15 +00:00
Erik Johnston
59e0112209
MSC 1866 - Use M_UNSUPPORTED_ROOM_VERSION for invite API
2019-02-23 14:50:43 +00:00
Erik Johnston
d14e94bae4
Merge pull request #4716 from matrix-org/erikj/pusher_logging
...
Fix up pusher logging a bit
2019-02-22 15:29:16 +00:00
Erik Johnston
b82c9cf462
Add missing return
2019-02-22 15:27:40 +00:00
Erik Johnston
f2891d2487
Correctly handle PusherConfigException
2019-02-22 15:18:19 +00:00
Erik Johnston
9982c71515
Merge pull request #4715 from matrix-org/erikj/fix_state_invalidation
...
Fix state cache invalidation on workers
2019-02-22 15:04:57 +00:00
Richard van der Hoff
0969d688e3
Debian: fix overwriting of config settings on upgrade ( #4696 )
...
Make sure that users' changes to the config files are preserved.
Fixes #4440 .
2019-02-22 15:02:39 +00:00
Erik Johnston
5d3e3c051d
Newsfile
2019-02-22 14:51:33 +00:00
Erik Johnston
a164134a53
Drop logging level of creating a pusher
2019-02-22 14:48:06 +00:00
Erik Johnston
1d9df51ff1
Correctly handle null data in HttpPusher
2019-02-22 14:47:48 +00:00
Erik Johnston
e28ef831e6
Newsfile
2019-02-22 14:40:08 +00:00
Erik Johnston
80467bbac3
Fix state cache invalidation on workers
2019-02-22 14:38:14 +00:00
Erik Johnston
7b288826b7
Fix backfill storing incorrect state for events
2019-02-22 11:33:51 +00:00
Richard van der Hoff
e07384c4e1
Add prometheus metrics for number of badge update pushes. ( #4709 )
...
We're counting the number of push notifications, but not the number of badges;
I'd like to see if they are significant.
2019-02-22 10:57:15 +00:00
Richard van der Hoff
e1666af9be
Better checks on newsfragments ( #4698 )
...
* You need an entry in the debian changelog (and not a regular newsfragment)
for debian packaging changes.
* Regular newsfragments must end in full stops.
2019-02-22 10:56:59 +00:00
Richard van der Hoff
fcd6f01dc7
Minor tweaks to acme docs ( #4689 )
2019-02-22 10:56:42 +00:00
Richard van der Hoff
0abb094f1a
bail out early in on_new_receipts if no pushers ( #4706 )
2019-02-21 17:51:21 +00:00
Richard van der Hoff
6d65659b62
Run push_receipts_to_remotes as background job ( #4707 )
...
I suspect the CPU usage metrics for this are going to /dev/null at the moment.
2019-02-21 17:50:30 +00:00
Benoît S
16e0680498
Added HAProxy example ( #4660 )
...
* Added HAProxy example
Proposal of an example with HAProxy. Asked by #4541 .
Signed-off-by: Benoît S. (“Benpro”) <gitlab@benpro.fr >
* Following suggestions of @richvdh
2019-02-21 17:44:10 +00:00
Erik Johnston
b9d6756b14
Merge pull request #4263 from rkfg/develop
...
Prevent crash on pagination.
2019-02-21 17:42:15 +00:00
Erik Johnston
9bccd5e472
Merge pull request #4701 from fistons/fix-migration-script
...
Migration Script: consider e2e_room_keys.is_verified column as boolean
2019-02-21 11:45:47 +00:00
Eric
8184ae8a09
Consider e2e_room_keys.is_verified column as boolean
...
This column was considered as an int, crashing the whole
migration process
Signed-off-by: Eric <eric@pedr0.net >
2019-02-20 23:18:00 +01:00
Erik Johnston
56f4ece778
Newsfile
2019-02-20 18:15:13 +00:00
Erik Johnston
71b625d808
Stop backpaginating when events not visible
2019-02-20 18:14:12 +00:00
Erik Johnston
82fca11fc1
Merge pull request #4694 from matrix-org/erikj/fix_sentry_config_format
...
Fixup generated metrics config
2019-02-20 14:13:38 +00:00
Richard van der Hoff
82ca6d1f9f
Add metrics for number of outgoing EDUs, by type ( #4695 )
2019-02-20 14:13:14 +00:00
Erik Johnston
633e5c933b
Newsfile
2019-02-20 13:41:43 +00:00
Erik Johnston
3d672fec51
Fixup generated metrics config
2019-02-20 13:39:37 +00:00
Amber Brown
a06614bd2a
UPSERT many functionality ( #4644 )
2019-02-20 23:03:30 +11:00
Richard van der Hoff
b2200a8690
Logging improvements for the pusher ( #4691 )
2019-02-20 11:36:50 +00:00
Richard van der Hoff
c88bc53903
Fix TaskStopped exceptions when outbound requests time out ( #4690 )
2019-02-20 11:35:52 +00:00
Richard van der Hoff
8d98dc8ffe
Clean up gitignores ( #4688 )
...
I just got bitten by a file being caught by the .gitignore, which shouldn't
have been, and am now pissed off with the .gitignore. I have basically declared
bankruptcy on it and started again.
2019-02-20 11:10:50 +00:00
Richard van der Hoff
86920ac266
Merge pull request #4678 from matrix-org/rav/tls_install_instructions
...
Attempt to clarify installation/config instructions
2019-02-20 11:10:33 +00:00
Erik Johnston
dbdc565dfd
Fix registration on workers ( #4682 )
...
* Move RegistrationHandler init to HomeServer
* Move post registration actions to RegistrationHandler
* Add post regisration replication endpoint
* Newsfile
2019-02-20 18:47:31 +11:00
Richard van der Hoff
c594cc8076
Run unit tests against python 3.7 ( #4677 )
...
* Run unit tests against python 3.7
... so that we span the full range of our supported python versions
* Switch to xenial
* fix psql fail
* pep8 etc want python 3.6
2019-02-20 18:42:24 +11:00
Richard van der Hoff
ae753fed8c
changelog
2019-02-19 13:56:44 +00:00
Richard van der Hoff
5f9bdf90fe
Attempt to make default config more consistent
...
The general idea here is that config examples should just have a hash and no
extraneous whitespace, both to make it easier for people who don't understand
yaml, and to make the examples stand out from the comments.
2019-02-19 13:54:29 +00:00
Erik Johnston
c003450057
Merge pull request #4671 from matrix-org/erikj/state_cache_invalidation
...
Batch cache invalidation over replication
2019-02-19 13:14:30 +00:00
Richard van der Hoff
49b58f0a16
clarify TLS instructions
2019-02-19 13:09:38 +00:00
Erik Johnston
62175a20e5
Docs
2019-02-19 11:38:40 +00:00
Erik Johnston
1bb35e3a83
Use itertools
2019-02-19 11:34:40 +00:00
Erik Johnston
bc8fa1509d
Documentation
2019-02-19 11:24:59 +00:00
Richard van der Hoff
1c0eb8bbb2
Merge pull request #4676 from matrix-org/rav/pg95
...
Test against Postgres 9.5 as well as 9.4
2019-02-19 11:19:21 +00:00
Brendan Abolivier
a288bdf0b1
Merge pull request #4652 from matrix-org/babolivier/acme-delegated
...
Support .well-known delegation when issuing certificates through ACME
2019-02-19 11:15:38 +00:00
Brendan Abolivier
5a707a2f9a
Improve config documentation
2019-02-19 10:59:26 +00:00
Brendan Abolivier
a8626901cd
Fetch ACME domain into an instance member
2019-02-19 10:54:33 +00:00
Erik Johnston
32590b7139
Merge pull request #4670 from matrix-org/erikj/register_login_split
...
Split /login into client_reader
2019-02-19 10:46:22 +00:00
Richard van der Hoff
7c70b8f8a6
Try and make TLS federation client code faster ( #4674 )
...
* fix to use makeContext so that we don't need to rebuild the certificateoptions each time
2019-02-19 10:19:16 +00:00
Richard van der Hoff
107aeb6915
misc->feature
2019-02-19 10:18:48 +00:00
Andrew Morgan
968a30a75c
Merge pull request #4642 from matrix-org/anoa/bans_room_upgrade
...
Transfer bans on room upgrade
2019-02-19 10:16:42 +00:00
Richard van der Hoff
0869f01e74
Test against Postgres 9.5 as well as 9.4
...
Postgres 9.5 is the first to support UPSERTs, so we should really run against
it as well as 9.4.
2019-02-19 09:54:31 +00:00
Amber Brown
2b2466f78b
changelog
2019-02-19 16:18:48 +11:00
Amber Brown
561eebe170
fix to use makeContext so that we don't need to rebuild the certificateoptions each time
2019-02-19 16:18:05 +11:00
Andrew Morgan
34ac75ce2c
lint
2019-02-18 18:23:37 +00:00
Erik Johnston
92e6fb5c89
Newsfile
2019-02-18 17:58:17 +00:00
Erik Johnston
a9b5ea6fc1
Batch cache invalidation over replication
...
Currently whenever the current state changes in a room invalidate a lot
of caches, which cause *a lot* of traffic over replication. Instead,
lets batch up all those invalidations and send a single poke down
the replication streams.
Hopefully this will reduce load on the master process by substantially
reducing traffic.
2019-02-18 17:53:31 +00:00
Andrew Morgan
f8b9ca53ce
Move member event processing and changelog fix
2019-02-18 17:28:52 +00:00
Erik Johnston
d154f5a055
Merge pull request #4632 from matrix-org/erikj/basic_sentry
...
Add basic optional sentry.io integration
2019-02-18 17:22:45 +00:00
Erik Johnston
f3ab0b2390
Newsfile
2019-02-18 17:22:01 +00:00
Erik Johnston
128902d60a
Update worker docs
2019-02-18 17:21:51 +00:00
Erik Johnston
4cc4400b4d
Split /login into client_reader
2019-02-18 17:19:01 +00:00
Erik Johnston
fc2c245a1f
Merge pull request #4666 from matrix-org/erikj/register_login_split
...
Split out registration to worker
2019-02-18 17:18:06 +00:00
Erik Johnston
459d3d5046
Merge pull request #4668 from matrix-org/erikj/catch_exceptions
...
Correctly handle HttpResponseException when handling device updates
2019-02-18 16:55:43 +00:00
Erik Johnston
d328a93b51
Fixup error handling and message
2019-02-18 16:53:56 +00:00
Erik Johnston
af691e415c
Move register_device into handler
2019-02-18 16:49:38 +00:00
Erik Johnston
028267acd2
Merge pull request #4669 from matrix-org/erikj/log_exception
...
Cleanup top level request exception logging
2019-02-18 16:41:41 +00:00
Erik Johnston
d08bac4136
Merge pull request #4651 from matrix-org/matthew/well-known-cors
...
set CORS on .well-known URI to unbreak modular
2019-02-18 16:38:11 +00:00
Erik Johnston
c30f73c86a
Merge pull request #4667 from matrix-org/erikj/fix_revoke_guest_access_workers
...
Fix kicking guest users in worker mode
2019-02-18 15:55:48 +00:00
Erik Johnston
092b541401
Fixup
2019-02-18 15:52:26 +00:00
Brendan Abolivier
45bb55c6de
Use a configuration parameter to give the domain to generate a certificate for
2019-02-18 15:46:23 +00:00
Erik Johnston
8b9ae6d3a6
Update docs
2019-02-18 15:26:13 +00:00
Erik Johnston
94960cef03
pep8
2019-02-18 15:24:13 +00:00
Erik Johnston
12ae64ce0d
Newsfile
2019-02-18 15:23:10 +00:00
Erik Johnston
fe725f7e45
Cleanup top level request exception logging
...
Firstly, we always logged that the request was being handled via
`JsonResource._async_render`, so we change that to use the servlet name
we add to the request.
Secondly, we pass the exception information to the logger rather than
formatting it manually. This makes it consistent with other exception
logging, allwoing logging hooks and formatters to access the exception
information.
2019-02-18 15:11:04 +00:00
Erik Johnston
e85aabb030
Newsfile
2019-02-18 15:06:22 +00:00
Matthew Hodgson
d9713e916e
changelog
2019-02-18 16:00:22 +01:00
Matthew Hodgson
04dad5ac16
fix missig import
2019-02-18 15:59:23 +01:00
Erik Johnston
2f16857ca9
Newsfile
2019-02-18 14:55:11 +00:00
Erik Johnston
e07cc31cb8
Correctly handle HttpResponseException
2019-02-18 14:55:09 +00:00
Brendan Abolivier
68a53f825f
Merge branch 'develop' into babolivier/acme-delegated
2019-02-18 14:52:23 +00:00
Erik Johnston
32e54b472a
Fix kicking guest users in worker mode
...
When guest_access changes from allowed to forbidden all local guest
users should be kicked from the room. This did not happen when
revocation was received from federation on a worker.
Presumably broken in #4141
2019-02-18 14:16:07 +00:00
Andrew Morgan
915421065b
Membership events are done later
2019-02-18 14:02:09 +00:00
Erik Johnston
d1b060b492
Merge pull request #4643 from matrix-org/erikj/catch_exceptions
...
Correctly handle RequestSendFailed exceptions
2019-02-18 13:53:24 +00:00
Andrew Morgan
7033b05cad
Add changelog
2019-02-18 13:52:56 +00:00
Andrew Morgan
9caab0c364
Transfer bans on room upgrade
2019-02-18 13:52:51 +00:00
Erik Johnston
dc5efc92a8
Fixup
2019-02-18 13:52:49 +00:00
Will Hunt
e83a190643
Update changelog.d/4666.feature
...
Co-Authored-By: erikjohnston <erikj@jki.re >
2019-02-18 13:46:13 +00:00
Erik Johnston
41c3f21c3b
Fix unit tests
2019-02-18 13:43:16 +00:00
Erik Johnston
91c8a7f9f4
Newsfile
2019-02-18 12:15:27 +00:00
Erik Johnston
eb2b8523ae
Split out registration to worker
...
This allows registration to be handled by a worker, though the actual
write to the database still happens on master.
Note: due to the in-memory session map all registration requests must be
handled by the same worker.
2019-02-18 12:12:57 +00:00
Andrew Morgan
5b68e12fd8
Typo in changelog
...
Co-Authored-By: babolivier <contact@brendanabolivier.com >
2019-02-18 11:36:44 +00:00
Andrew Morgan
6d02a13d81
Typo in info log
...
Co-Authored-By: babolivier <contact@brendanabolivier.com >
2019-02-18 11:36:34 +00:00
Erik Johnston
4151111d95
Merge pull request #4657 from matrix-org/travis/linda/spelling
...
Fix spelling mistakes
2019-02-18 09:42:45 +00:00
Juuso "Linda" Lapinlampi
6575df647d
UPGRADE.rst: Fix a typo in "Upgrading Synapse" section
...
See: https://en.wiktionary.org/wiki/successful
2019-02-15 22:25:29 -07:00
Juuso "Linda" Lapinlampi
68d2869c8d
config: Remove a repeated word from a logger warning
...
The warning for missing macaroon_secret_key was "missing missing".
2019-02-15 22:24:53 -07:00
Travis Ralston
da95867d30
Changelog
2019-02-15 22:24:39 -07:00
Erik Johnston
bd4505f765
Merge pull request #4647 from matrix-org/erikj/add_room_publishing_rules
...
Add configurable room list publishing rules
2019-02-15 22:11:01 +00:00
Brendan Abolivier
f86b695cbd
Various cosmetics to make TravisCI happy
2019-02-15 12:29:34 +00:00
Brendan Abolivier
af8a2f679b
Remove unused import
2019-02-15 12:27:43 +00:00
Brendan Abolivier
1895d14e12
Support .well-known delegation when issuing certificates through ACME
2019-02-15 12:05:08 +00:00
Erik Johnston
b99c532c1c
Move defaults up into code
2019-02-15 10:53:39 +00:00
Erik Johnston
02c729d6b0
Hoist up checks to reduce overall work
2019-02-15 10:20:02 +00:00
Erik Johnston
02c46acc6a
Fixup comments
2019-02-15 10:17:13 +00:00
Matthew Hodgson
bfcefbb230
tabs
2019-02-14 19:53:12 +00:00
Matthew Hodgson
6f47bc3fb2
set CORS on .well-known URI to unbreak modular
...
otherwise a riot/web running on foo.riot.im can't query
the .well-known on foo.modular.im...
2019-02-14 19:51:41 +00:00
Erik Johnston
8e32f26cb8
Clarify comments
2019-02-14 18:21:24 +00:00
Erik Johnston
cb12a37708
Clarify and fix behaviour when there are multiple aliases
2019-02-14 18:16:32 +00:00
Erik Johnston
f61b2068e6
Only fetch aliases when publishing rooms
2019-02-14 18:08:09 +00:00
Erik Johnston
f666fe36d7
Fixup comments
2019-02-14 18:07:24 +00:00
Richard van der Hoff
bf4fd14806
Merge branch 'master' into develop
2019-02-14 17:34:09 +00:00
Richard van der Hoff
f830a3be2a
Merge branch 'release-v0.99.1'
2019-02-14 17:31:45 +00:00
Richard van der Hoff
649fe1c2be
Fix debian build dockerfile
...
Make sure it refreshes the apt cache before trying to install stuff
2019-02-14 17:29:40 +00:00
Richard van der Hoff
f595d6ac57
0.99.1.1
2019-02-14 17:20:02 +00:00
Richard van der Hoff
f311018823
Fix errors in acme provisioning ( #4648 )
...
* Better logging for errors on startup
* Fix "TypeError: '>' not supported" when starting without an existing
certificate
* Fix a bug where an existing certificate would be reprovisoned every day
2019-02-14 17:10:36 +00:00
Erik Johnston
4074c8b968
Newsfile
2019-02-14 16:04:12 +00:00
Erik Johnston
eaf4d11af9
Add configurable room list publishing rules
...
This allows specifying who and what is allowed to be published onto the
public room list
2019-02-14 16:02:23 +00:00
Richard van der Hoff
b02465b9db
Merge branch 'master' into develop
2019-02-14 14:42:03 +00:00
Richard van der Hoff
00cf679bf2
Merge tag 'v0.99.1'
...
Synapse 0.99.1 (2019-02-14)
===========================
Features
--------
- Include m.room.encryption on invites by default ([\#3902](https://github.com/matrix-org/synapse/issues/3902 ))
- Federation OpenID listener resource can now be activated even if federation is disabled ([\#4420](https://github.com/matrix-org/synapse/issues/4420 ))
- Synapse's ACME support will now correctly reprovision a certificate that approaches its expiry while Synapse is running. ([\#4522](https://github.com/matrix-org/synapse/issues/4522 ))
- Add ability to update backup versions ([\#4580](https://github.com/matrix-org/synapse/issues/4580 ))
- Allow the "unavailable" presence status for /sync.
This change makes Synapse compliant with r0.4.0 of the Client-Server specification. ([\#4592](https://github.com/matrix-org/synapse/issues/4592 ))
- There is no longer any need to specify `no_tls`: it is inferred from the absence of TLS listeners ([\#4613](https://github.com/matrix-org/synapse/issues/4613 ), [\#4615](https://github.com/matrix-org/synapse/issues/4615 ), [\#4617](https://github.com/matrix-org/synapse/issues/4617 ), [\#4636](https://github.com/matrix-org/synapse/issues/4636 ))
- The default configuration no longer requires TLS certificates. ([\#4614](https://github.com/matrix-org/synapse/issues/4614 ))
Bugfixes
--------
- Copy over room federation ability on room upgrade. ([\#4530](https://github.com/matrix-org/synapse/issues/4530 ))
- Fix noisy "twisted.internet.task.TaskStopped" errors in logs ([\#4546](https://github.com/matrix-org/synapse/issues/4546 ))
- Synapse is now tolerant of the `tls_fingerprints` option being None or not specified. ([\#4589](https://github.com/matrix-org/synapse/issues/4589 ))
- Fix 'no unique or exclusion constraint' error ([\#4591](https://github.com/matrix-org/synapse/issues/4591 ))
- Transfer Server ACLs on room upgrade. ([\#4608](https://github.com/matrix-org/synapse/issues/4608 ))
- Fix failure to start when not TLS certificate was given even if TLS was disabled. ([\#4618](https://github.com/matrix-org/synapse/issues/4618 ))
- Fix self-signed cert notice from generate-config. ([\#4625](https://github.com/matrix-org/synapse/issues/4625 ))
- Fix performance of `user_ips` table deduplication background update ([\#4626](https://github.com/matrix-org/synapse/issues/4626 ), [\#4627](https://github.com/matrix-org/synapse/issues/4627 ))
Internal Changes
----------------
- Change the user directory state query to use a filtered call to the db instead of a generic one. ([\#4462](https://github.com/matrix-org/synapse/issues/4462 ))
- Reject federation transactions if they include more than 50 PDUs or 100 EDUs. ([\#4513](https://github.com/matrix-org/synapse/issues/4513 ))
- Reduce duplication of ``synapse.app`` code. ([\#4567](https://github.com/matrix-org/synapse/issues/4567 ))
- Fix docker upload job to push -py2 images. ([\#4576](https://github.com/matrix-org/synapse/issues/4576 ))
- Add port configuration information to ACME instructions. ([\#4578](https://github.com/matrix-org/synapse/issues/4578 ))
- Update MSC1711 FAQ to calrify .well-known usage ([\#4584](https://github.com/matrix-org/synapse/issues/4584 ))
- Clean up default listener configuration ([\#4586](https://github.com/matrix-org/synapse/issues/4586 ))
- Clarifications for reverse proxy docs ([\#4607](https://github.com/matrix-org/synapse/issues/4607 ))
- Move ClientTLSOptionsFactory init out of `refresh_certificates` ([\#4611](https://github.com/matrix-org/synapse/issues/4611 ))
- Fail cleanly if listener config lacks a 'port' ([\#4616](https://github.com/matrix-org/synapse/issues/4616 ))
- Remove redundant entries from docker config ([\#4619](https://github.com/matrix-org/synapse/issues/4619 ))
- README updates ([\#4621](https://github.com/matrix-org/synapse/issues/4621 ))
2019-02-14 14:41:40 +00:00
Richard van der Hoff
06cd757ae7
0.99.1
2019-02-14 14:24:24 +00:00
Erik Johnston
0927adb012
Newsfile
2019-02-14 14:02:04 +00:00
Erik Johnston
7fc1196a36
Correctly handle RequestSendFailed exceptions
...
This mainly reduces the number of exceptions we log.
2019-02-14 14:01:04 +00:00
Дамјан Георгиевски
a214ba93e0
implement reload by sending the HUP signal ( #4622 )
...
* implement `reload` by sending the HUP signal
According to the 0.99 release info* synapse now uses the HUP signal to reload certificates:
> Synapse will now reload TLS certificates from disk upon SIGHUP. (#4495 , #4524 )
So the matrix-synapse.service unit file should include a reload directive.
Signed-off-by: Дамјан Георгиевски <gdamjan@gmail.com >
2019-02-14 13:44:22 +00:00
Erik Johnston
6cb415b63f
Fixup comments and add warning
2019-02-13 16:15:11 +00:00
Richard van der Hoff
c6e75c9f2d
Merge pull request #4450 from 14mRh4X0r/fix-dependency-message
...
Fix error message for optional dependencies
2019-02-13 16:12:49 +00:00
Richard van der Hoff
3bc238629e
0.99.1rc2
2019-02-13 14:46:18 +00:00
Richard van der Hoff
c1dfd6a18a
Merge remote-tracking branch 'origin/release-v0.99.1' into develop
2019-02-13 14:27:45 +00:00
Richard van der Hoff
464c301584
Merge pull request #4636 from matrix-org/rav/bind_address_fixes
...
Fix errors when using default bind_addresses with replication/metrics listeners
2019-02-13 14:16:02 +00:00
Erik Johnston
309f3bb322
Update synapse/app/_base.py
...
Co-Authored-By: richvdh <1389908+richvdh@users.noreply.github.com >
2019-02-13 13:24:27 +00:00
Amber Brown
bb4fd8f927
Run black on user directory code ( #4635 )
2019-02-13 23:05:32 +11:00
Richard van der Hoff
2d0e0a4044
changelog
2019-02-13 12:00:34 +00:00
Richard van der Hoff
767686af48
Use listen_tcp for the replication listener
...
Fixes the "can't listen on 0.0.0.0" error. Also makes it more consistent with
what we do elsewhere.
2019-02-13 11:59:04 +00:00
Richard van der Hoff
2a5a15aff8
Improve logging around listening services
...
I wanted to bring listen_tcp into line with listen_ssl in terms of returning a
list of ports, and wanted to check that was a safe thing to do - hence the
logging in `refresh_certificate`.
Also, pull the 'Synapse now listening' message up to homeserver.py, because it
was being duplicated everywhere else.
2019-02-13 11:58:54 +00:00
Richard van der Hoff
e3a0300431
Special-case the default bind_addresses for metrics listener
...
turns out it doesn't really support ipv6, so let's hack around that by only
listening on ipv4 by default.
2019-02-13 11:48:56 +00:00
Erik Johnston
dc70789056
Newsfile
2019-02-12 16:07:43 +00:00
Erik Johnston
93f7d2df3e
Comments
2019-02-12 16:03:40 +00:00
Erik Johnston
6a8f902edb
Raise an appropriate error message if sentry_sdk missing
2019-02-12 16:01:41 +00:00
Erik Johnston
ef2228c890
Basic sentry integration
2019-02-12 13:55:58 +00:00
Erik Johnston
19818d66af
Fixup changelog
2019-02-12 13:25:05 +00:00
Erik Johnston
d2fa7b7e99
Update changelog and version
2019-02-12 13:22:25 +00:00
Erik Johnston
ba3f27b69a
Merge pull request #4608 from matrix-org/anoa/acls_room_upgrade
...
Transfer Server ACLs on room upgrade
2019-02-12 13:20:06 +00:00
Erik Johnston
b18cd25e42
Fixup changelog entries
2019-02-12 13:05:31 +00:00
Erik Johnston
cf82338930
Merge pull request #4627 from matrix-org/erikj/user_ips_analyze
...
Analyze user_ips before running deduplication
2019-02-12 13:05:09 +00:00
Erik Johnston
3df8fcca25
Merge pull request #4626 from matrix-org/erikj/fixup_user_ips_dedupe
...
Reduce user_ips bloat during dedupe background update
2019-02-12 13:02:58 +00:00
Erik Johnston
495ea92350
Fix pep8
2019-02-12 12:40:42 +00:00
Erik Johnston
b2327eb9cb
Newsfile
2019-02-12 11:58:36 +00:00
Erik Johnston
483ba85c7a
Analyze user_ips before running deduplication
...
Due to the table locks taken out by the naive upsert, the table
statistics may be out of date. During deduplication it is important that
the correct index is used as otherwise a full table scan may be
incorrectly used, which can end up thrashing the database badly.
2019-02-12 11:55:27 +00:00
Erik Johnston
218cc071c5
Newsfile
2019-02-12 11:39:36 +00:00
Erik Johnston
362d80b770
Reduce user_ips bloat during dedupe background update
...
The background update to remove duplicate rows naively deleted and
reinserted the duplicates. For large tables with a large number of
duplicates this causes a lot of bloat (with postgres), as the inserted
rows are appended to the table, since deleted rows will not be
overwritten until a VACUUM has happened.
This should hopefully also help ensure that the query in the last batch
uses the correct index, as inserting a large number of new rows without
analyzing will upset the query planner.
2019-02-12 11:39:34 +00:00
Erik Johnston
3c03c37883
Merge pull request #4625 from matrix-org/rav/fix_generate_config_warnings
...
fix self-signed cert notice from generate-config
2019-02-12 11:24:45 +00:00
Richard van der Hoff
2418b91bb7
README updates ( #4621 )
...
Lots of updates to the README/INSTALL.md.
Fixes #4601 .
2019-02-12 10:53:28 +00:00
Richard van der Hoff
a4ce91396b
Disable TLS by default ( #4614 )
2019-02-12 10:52:08 +00:00
Richard van der Hoff
32b781bfe2
Fix error when loading cert if tls is disabled ( #4618 )
...
If TLS is disabled, it should not be an error if no cert is given.
Fixes #4554 .
2019-02-12 10:51:31 +00:00
Richard van der Hoff
dfc846a316
fix self-signed cert notice from generate-config
...
fixes #4620
2019-02-12 10:37:59 +00:00
Erik Johnston
46b8a79b3a
Merge pull request #4619 from matrix-org/rav/remove_docker_no_tls_hacks
...
Remove redundant entries from docker config
2019-02-12 10:00:38 +00:00
Erik Johnston
8a2e316413
Merge pull request #4613 from matrix-org/rav/deprecate_no_tls
...
Infer no_tls from presence of TLS listeners
2019-02-12 09:59:53 +00:00
Richard van der Hoff
91f8cd3307
Remove redundant entries from docker config
...
* no_tls is now redundant (#4613 )
* we don't need a dummy cert any more (#4618 )
2019-02-11 22:16:44 +00:00
Richard van der Hoff
0ca2908653
fix tests
2019-02-11 22:01:27 +00:00
Richard van der Hoff
4fddf8fc77
Infer no_tls from presence of TLS listeners
...
Rather than have to specify `no_tls` explicitly, infer whether we need to load
the TLS keys etc from whether we have any TLS-enabled listeners.
2019-02-11 21:39:14 +00:00
Richard van der Hoff
15272f837c
Merge branch 'rav/no_create_server_contexts_if_no_tls' into rav/tls_cert/work
2019-02-11 21:34:19 +00:00
Richard van der Hoff
9645728619
Don't create server contexts when TLS is disabled
...
we aren't going to use them anyway.
2019-02-11 21:32:01 +00:00
Richard van der Hoff
be794c7cf7
Merge branch 'rav/tls_config_logging_fixes' into rav/tls_cert/work
2019-02-11 21:16:00 +00:00
Richard van der Hoff
2129dd1a02
Fail cleanly if listener config lacks a 'port'
...
... otherwise we would fail with a mysterious KeyError or something later.
2019-02-11 21:15:01 +00:00
Richard van der Hoff
086f6f27d4
Logging improvements around TLS certs
...
Log which file we're reading keys and certs from, and refactor the code a bit
in preparation for other work
2019-02-11 21:02:06 +00:00
Richard van der Hoff
5d27730a73
Move ClientTLSOptionsFactory init out of refresh_certificates ( #4611 )
...
It's nothing to do with refreshing the certificates. No idea why it was here.
2019-02-11 18:03:30 +00:00
Erik Johnston
719e073f00
Merge pull request #4580 from matrix-org/uhoreg/e2e_backup_add_updating
...
add updating of backup versions
2019-02-11 13:45:49 +00:00
Richard van der Hoff
24b7f3916d
Clean up default listener configuration ( #4586 )
...
Rearrange the comments to try to clarify them, and expand on what some of it
means.
Use a sensible default 'bind_addresses' setting.
For the insecure port, only bind to localhost, and enable x_forwarded, since
apparently it's for use behind a load-balancer.
2019-02-11 12:50:30 +00:00
Richard van der Hoff
c475275926
Clarifications for reverse proxy docs ( #4607 )
...
Factor out the reverse proxy info to a separate file, add some more info on
reverse-proxying the federation port.
2019-02-11 11:44:28 +00:00
Andrew Morgan
eff2042217
Changelog
2019-02-11 11:41:57 +00:00
Andrew Morgan
a126f86eec
Transfer Server ACLs on room upgrade
2019-02-11 11:30:37 +00:00
Amber Brown
6e2a5aa050
ACME Reprovisioning ( #4522 )
2019-02-11 10:36:26 +00:00
Amber Brown
4ffd10f46d
Be tolerant of blank TLS fingerprints config ( #4589 )
2019-02-11 10:04:27 +00:00
Erik Johnston
b201149c7e
Merge pull request #4420 from matrix-org/jaywink/openid-listener
...
New listener resource for the federation API "openid/userinfo" endpoint
2019-02-11 09:44:00 +00:00
Valentin Anger
2dc2b6e9f1
Allow "unavailable" presence status for /sync ( #4592 )
...
* Allow "unavailable" presence status for /sync
Closes #3772 , closes #3779
Signed-off-by: Valentin Anger <valentin.an.1999@gmail.com >
* Add changelog for PR 4592
2019-02-08 21:09:56 +00:00
Richard van der Hoff
56710c7df5
Fix 'no unique or exclusion constraint' error ( #4591 )
...
Add more tables to the list of tables which need a background update to
complete before we can upsert into them, which fixes a race against the
background updates.
2019-02-08 18:30:46 +00:00
Amber Brown
9cd33d2f4b
Deduplicate some code in synapse.app ( #4567 )
2019-02-08 17:25:57 +00:00
Erik Johnston
4588b0d64a
Update MSC1711_certificates_FAQ.md
...
Fix incorrect heading level
2019-02-08 09:37:16 +00:00
Hubert Chathi
afae8442b5
make sure version is in body and wrap in linearizer queue
...
also add tests
2019-02-08 01:32:45 -05:00
Richard van der Hoff
d008330d7d
Merge branch 'master' into develop
2019-02-07 19:31:11 +00:00
Erik Johnston
acb2ac5863
Update MSC1711 FAQ to be explicit about well-known ( #4584 )
...
A surprising number of people are using the well-known method, and are
simply copying the example configuration. This is problematic as the
example includes an explicit port, which causes inbound federation
requests to have the HTTP Host header include the port, upsetting some
reverse proxies.
Given that, we update the well-known example to be more explicit about
the various ways you can set it up, and the consequence of using an
explict port.
2019-02-07 19:30:32 +00:00
Richard van der Hoff
7cadc4c918
cleanups
2019-02-07 19:29:20 +00:00
Richard van der Hoff
188ad47e73
Merge branch 'master' into erikj/msc1711_faq
2019-02-07 19:27:42 +00:00
Erik Johnston
43e16ea3bc
Newsfile
2019-02-07 19:24:11 +00:00
Erik Johnston
9285d5c2ce
Update MSC1711 FAQ to be explicit about well-known
...
A surprising number of people are using the well-known method, and are
simply copying the example configuration. This is problematic as the
example includes an explicit port, which causes inbound federation
requests to have the HTTP Host header include the port, upsetting some
reverse proxies.
Given that, we update the well-known example to be more explicit about
the various ways you can set it up, and the consequence of using an
explict port.
2019-02-07 19:24:11 +00:00
Richard van der Hoff
7a22a645b5
Merge branch 'master' into develop
2019-02-07 19:18:48 +00:00
Richard van der Hoff
624b172e08
Merge remote-tracking branch 'origin/release-v0.99.0'
2019-02-07 19:18:26 +00:00
Andrew Morgan
c17b128b83
Update ACME docs to include port instructions ( #4578 )
2019-02-07 19:18:08 +00:00
Richard van der Hoff
9b7aa543d9
clarify option 1
2019-02-07 18:46:02 +00:00
Hubert Chathi
d9e424bf64
re-try to make isort happy
2019-02-06 22:18:41 -05:00
Hubert Chathi
51b73be63b
add changelog entry
2019-02-06 21:39:56 -05:00
Hubert Chathi
9ff620a518
fix import to make isort happy
2019-02-06 21:32:52 -05:00
Hubert Chathi
8248637173
add new endpoint to update backup versions
2019-02-06 17:57:10 -05:00
Hubert Chathi
664c81e8b7
return proper error codes for some 404s
2019-02-06 17:47:22 -05:00
Richard van der Hoff
7fe407a87a
Merge branch 'master' into develop
2019-02-06 09:50:54 +00:00
Richard van der Hoff
d8e63846e2
Fix docker upload job to push -py2 images ( #4576 )
2019-02-06 09:41:54 +00:00
Richard van der Hoff
6fe1db5631
Merge branch 'master' into develop
2019-02-05 19:00:50 +00:00
Richard van der Hoff
b05dd4ac06
faq cleanups
2019-02-05 18:59:57 +00:00
Richard van der Hoff
2475434080
Merge branch 'master' into develop
2019-02-05 18:44:49 +00:00
Richard van der Hoff
3bd9daf4b8
v0.99.0
2019-02-05 18:33:02 +00:00
Richard van der Hoff
39bf0ea2e8
Add notes on SRV and .well-known ( #4573 )
2019-02-05 18:11:26 +00:00
Richard van der Hoff
61dc53abe9
fix some thinkos in UPGRADE.rst
2019-02-05 17:36:05 +00:00
Andrew Morgan
4a7524ffd3
Merge pull request #4570 from matrix-org/anoa/self_signed_upgrade
...
Add ACME docs and link to it from README and INSTALL
2019-02-05 17:34:43 +00:00
Neil Johnson
6585ef4799
Neilj/1711faq ( #4572 )
...
MSC1711 certificates FAQ
2019-02-05 17:19:28 +00:00
Andrew Morgan
a6345009f9
Add TL;DR and final step details to ACME
2019-02-05 17:04:34 +00:00
Andrew Morgan
56cb34ba8b
Merge branch 'anoa/self_signed_upgrade' of github.com:matrix-org/synapse into anoa/self_signed_upgrade
2019-02-05 16:53:05 +00:00
Andrew Morgan
2ca63df83b
Update ACME
2019-02-05 16:50:00 +00:00
Richard van der Hoff
13828f7d58
Update docs/ACME.md
...
Co-Authored-By: anoadragon453 <1342360+anoadragon453@users.noreply.github.com >
2019-02-05 16:46:28 +00:00
Andrew Morgan
e119cec229
Update INSTALL
2019-02-05 16:45:41 +00:00
Andrew Morgan
ed8b3289ff
Update README
2019-02-05 16:44:31 +00:00
Andrew Morgan
ffcbd80982
Actually add ACME docs
2019-02-05 15:50:18 +00:00
Andrew Morgan
0af50020fd
Move ACME docs from INSTALL.md to ACME.md
2019-02-05 15:49:34 +00:00
Andrew Morgan
d75e15edce
Re-add link to ACME docs from README
2019-02-05 15:45:00 +00:00
Andrew Morgan
c433d4c4d2
Merge branch 'release-v0.99.0' of github.com:matrix-org/synapse into anoa/self_signed_upgrade
2019-02-05 15:43:26 +00:00
Andrew Morgan
cbdc01cc3b
Convert ACME docs to md
2019-02-05 15:38:27 +00:00
Andrew Morgan
9793bf366e
Add link to ACME docs from README
2019-02-05 15:34:52 +00:00
Andrew Morgan
08b26afeee
Move ACME docs to docs/ACME.rst and link from UPGRADE.
2019-02-05 15:33:23 +00:00
Andrew Morgan
cd6fee3169
Don't imply self-signed certs are required
2019-02-05 14:29:09 +00:00
Richard van der Hoff
4561f3baa0
Move things from README.rst to UPDATE.md ( #4569 )
...
The readme was getting pretty unmanageable and hard to grok. This is an attempt to simplify things by moving installation instructions from the README to a separate file. I've tried to resist the temptation to fix too much stuff while I'm here - it mostly just copies-and-pastes from one doc to the other, and changes from rst to md syntax.
2019-02-05 13:55:21 +00:00
Richard van der Hoff
40b35fb875
Enable ACME support in the docker image ( #4566 )
...
Also:
* Fix wrapping in docker readme
* Clean up some docs on the docker image
* a workaround for #4554
2019-02-05 13:42:21 +00:00
Andrew Morgan
627ecd358e
Filter user directory state query to a subset of state events ( #4462 )
...
* Filter user directory state query to a subset of state events
* Add changelog
2019-02-05 12:16:28 +00:00
Richard van der Hoff
3ef71a6ea0
Docker: only copy what we need to the build image ( #4562 )
...
There are two reasons this is a good thing:
* first, it means that you don't end up with stuff kicking around your working
copy ending up in the build image by mistake (which can upset the pip
install process)
* second: it means that the docker image cache is more effective, and we can
reuse docker images when iterating on the docker stuff.
2019-02-05 11:44:40 +00:00
Richard van der Hoff
bf1e4d96ad
Fix default ACME config for py2 ( #4564 )
...
Fixes #4559
2019-02-05 11:37:33 +00:00
Richard van der Hoff
9a75c0b52e
switch docker image to py3 by default ( #4558 )
...
Switch the matrixdotorg/synapse:latest Docker image to use python 3
2019-02-05 11:33:26 +00:00
Richard van der Hoff
d7e27a1f08
fix typo in config comments ( #4557 )
2019-02-05 11:32:45 +00:00
Andrew Morgan
142b2cddf0
Merge pull request #4547 from matrix-org/anoa/acme_docs
...
Add docs for ACME setup
2019-02-01 17:19:52 +00:00
Andrew Morgan
da6df65e19
Fix nginx capatilization
2019-02-01 16:59:23 +00:00
Andrew Morgan
57164e17da
Address comments
2019-02-01 16:59:06 +00:00
Richard van der Hoff
9e89a420e8
Update README.rst
...
Co-Authored-By: anoadragon453 <1342360+anoadragon453@users.noreply.github.com >
2019-02-01 16:54:47 +00:00
Richard van der Hoff
897230f634
Update README.rst
...
Co-Authored-By: anoadragon453 <1342360+anoadragon453@users.noreply.github.com >
2019-02-01 16:54:32 +00:00
Andrew Morgan
14de15eaa4
Actually need to enable it
2019-02-01 16:48:07 +00:00
Andrew Morgan
bcc78bb0b8
Merge branch 'release-v0.99.0' of github.com:matrix-org/synapse into anoa/acme_docs
2019-02-01 15:57:32 +00:00
Richard van der Hoff
30fd2f89db
0.99.0rc4
2019-02-01 15:52:28 +00:00
Andrew Morgan
0d70288c59
Address changes
2019-02-01 15:38:09 +00:00
Andrew Morgan
7f914a2dbf
Remove error and add link to foks fed tester project
2019-02-01 15:05:10 +00:00
Andrew Morgan
57fe91f87b
Clean up portions of docs that talk about reversing fed port
2019-02-01 15:05:10 +00:00
Andrew Morgan
c5fc09322c
Add changelog
2019-02-01 15:05:10 +00:00
Andrew Morgan
a451d960cc
Add docs for ACME setup
2019-02-01 15:05:10 +00:00
Richard van der Hoff
ef43a03fc5
Merge pull request #4546 from matrix-org/rav/silence_critical_error_from_federation
...
Fix noisy "twisted.internet.task.TaskStopped" errors in logs
2019-02-01 14:37:22 +00:00
Richard van der Hoff
f8db967d5a
Merge remote-tracking branch 'origin/release-v0.99.0' into develop
2019-02-01 13:20:15 +00:00
Richard van der Hoff
fa794980ec
Merge pull request #4544 from matrix-org/rav/skip_invalid_well_known
...
Treat an invalid .well-known the same as an absent one
2019-02-01 13:18:36 +00:00
Richard van der Hoff
e9779a6f8f
Fix b'ab' noise in logs
2019-02-01 12:34:31 +00:00
Richard van der Hoff
9763a73af0
Merge branch 'release-v0.99.0' into develop
2019-02-01 12:30:22 +00:00
Richard van der Hoff
f0ba34f581
Fix noisy "twisted.internet.task.TaskStopped" errors in logs
...
Fixes #4003
2019-02-01 12:22:57 +00:00
Richard van der Hoff
8a21b03fba
Treat an invalid .well-known the same as an absent one
...
... basically, carry on and fall back to SRV etc.
2019-02-01 11:37:31 +00:00
Richard van der Hoff
582786fbf2
Merge pull request #4542 from matrix-org/rav/cache_for_bad_well_known
...
Caching for invalid .well-knowns
2019-02-01 11:20:07 +00:00
Richard van der Hoff
d9bdd26ae5
Merge pull request #4539 from matrix-org/rav/update_wellknown_routing
...
Update federation routing logic to check .well-known before SRV
2019-02-01 11:19:54 +00:00
Richard van der Hoff
0390c961ac
changelog
2019-02-01 09:40:58 +00:00
Richard van der Hoff
3c8a41140e
Cache failures to parse .well-known
...
Also add a Measure block around the .well-known fetch
2019-02-01 00:37:52 +00:00
Richard van der Hoff
24d59c7568
better logging for federation connections
2019-01-31 23:18:20 +00:00
Richard van der Hoff
d428b46346
Update federation routing logic to check .well-known before SRV
2019-01-31 23:14:18 +00:00
Andrew Morgan
c45fd0dda0
Merge pull request #4530 from matrix-org/anoa/room_upgrade_federatable
...
Copy over non-federatable trait on room upgrade
2019-01-31 20:28:37 +00:00
Richard van der Hoff
625385d684
Merge branch 'release-v0.99.0' into develop
2019-01-31 18:43:20 +00:00
Richard van der Hoff
85129d7068
v0.99.0rc3
2019-01-31 18:35:38 +00:00
Andrew Morgan
d239f67c25
Raise an exception instead of returning None
2019-01-31 18:34:15 +00:00
Richard van der Hoff
07dfe148de
Add some debug for membership syncing issues ( #4538 )
...
I can't figure out what's going on with #4422 and #4436 ; perhaps this will help.
2019-01-31 18:30:40 +00:00
Andrew Morgan
3ed3cb4339
New function for getting room's create event
2019-01-31 18:21:39 +00:00
Andrew Morgan
bbb97a35fd
Merge branch 'develop' of github.com:matrix-org/synapse into anoa/room_upgrade_federatable
2019-01-31 18:11:00 +00:00
Richard van der Hoff
e707e7b38d
Fix infinite loop when an event is redacted in a v3 room ( #4535 )
2019-01-31 15:34:17 +00:00
Andrew Morgan
563f6a832b
Reject large transactions on federation ( #4513 )
...
* Reject large transactions on federation
* Add changelog
* lint
* Simplify large transaction handling
2019-01-31 11:44:04 +00:00
Andrew Morgan
fb50934b8f
lint
2019-01-31 11:34:45 +00:00
Richard van der Hoff
35f544410a
update debian installation instructions ( #4526 )
...
* update debian installation instructions
* docs PR is docs
2019-01-31 10:29:15 +00:00
Andrew Morgan
cf9a2676d0
Add changelog
2019-01-30 19:04:48 +00:00
Richard van der Hoff
a332116276
cleanups for contrib/prometheus/README
2019-01-30 17:32:33 +00:00
Richard van der Hoff
6fba9fd20c
Merge remote-tracking branch 'origin/release-v0.99.0' into develop
2019-01-30 17:02:32 +00:00
Andrew Morgan
d621c5562e
Copy over non-federatable trait on room upgrade
2019-01-30 16:33:51 +00:00
Richard van der Hoff
b8b898666e
v0.99.0rc2
2019-01-30 16:31:07 +00:00
Matthew Hodgson
ad7ac8853c
by default include m.room.encryption on invites ( #3902 )
...
* by default include m.room.encryption on invites
* fix constant
* changelog
2019-01-30 16:26:13 +00:00
Richard van der Hoff
c74b96755c
Merge remote-tracking branch 'origin/develop' into release-v0.99.0
2019-01-30 16:23:28 +00:00
Amber Brown
fbaee26c68
ACME Upgrade Docs ( #4528 )
2019-01-30 16:22:37 +00:00
Erik Johnston
d534a27fe8
Merge pull request #4527 from matrix-org/erikj/fix_sending_remote_invite_rejections
...
Fix remote invite rejections not coming down sync
2019-01-30 16:15:35 +00:00
Neil Johnson
81b7e7eed3
Update constants.py
...
remove trailing ,
2019-01-30 16:11:36 +00:00
Erik Johnston
e25ab58c5e
Newsfile
2019-01-30 15:50:28 +00:00
Erik Johnston
ed8c5e4cda
Fix remote invite rejections not comming down sync
...
This was broken in PR #4405 , commit 886e5ac , where we changed remote
rejections to be outliers.
The fix is to explicitly add the leave event in when we know its an out
of band invite. We can't always add the event as if the server is/was in
the room there might be more events to send down the sync than just the
leave.
2019-01-30 15:46:27 +00:00
Richard van der Hoff
a5d0c771a3
0.99.0rc1
2019-01-30 15:11:18 +00:00
Erik Johnston
6587b0b89b
Merge pull request #4472 from matrix-org/neilj/room_capabilities
...
Server capabilities support
2019-01-30 14:26:56 +00:00
Erik Johnston
a4f52a33fe
Fix replication for room v3 ( #4523 )
...
* Fix replication for room v3
We were not correctly quoting the path fragments over http replication,
which meant that it exploded when the event IDs had a slash in them
* Newsfile
2019-01-30 14:19:52 +00:00
Richard van der Hoff
7615a8ced1
ACME config cleanups ( #4525 )
...
* Handle listening for ACME requests on IPv6 addresses
the weird url-but-not-actually-a-url-string doesn't handle IPv6 addresses
without extra quoting. Building a string which you are about to parse again
seems like a weird choice. Let's just use listenTCP, which is consistent with
what we do elsewhere.
* Clean up the default ACME config
make it look a bit more consistent with everything else, and tweak the defaults
to listen on port 80.
* newsfile
2019-01-30 14:17:55 +00:00
Erik Johnston
43c6fca960
Merge pull request #4524 from matrix-org/erikj/fix_no_tls
...
Fix bug where synapse fails to start if no_tls set
2019-01-30 13:11:05 +00:00
Erik Johnston
e87d7a4b0f
Raise ConfigError instead
2019-01-30 12:48:09 +00:00
Erik Johnston
e6a7a15f93
Newsfile
2019-01-30 12:17:38 +00:00
Erik Johnston
270f212a2a
_listener_http should return a list
2019-01-30 12:14:50 +00:00
Richard van der Hoff
a79034aedf
Merge pull request #4521 from matrix-org/rav/fed_routing/cleanups
...
Tiny .well-known fixes
2019-01-30 11:47:24 +00:00
Richard van der Hoff
c7b24ac3d0
Follow redirects on .well-known ( #4520 )
2019-01-30 11:43:33 +00:00
Amber Brown
f6813919e8
SIGHUP for TLS cert reloading ( #4495 )
2019-01-30 11:00:02 +00:00
Richard van der Hoff
283753c33a
newsfile
2019-01-30 10:59:21 +00:00
Richard van der Hoff
09a1a6b55e
fix exception text
2019-01-30 10:58:52 +00:00
Richard van der Hoff
928c50b59a
Also jitter the invalid cache period
2019-01-30 10:58:52 +00:00
Neil Johnson
b37e8c9572
Merge branch 'neilj/room_capabilities' of github.com:matrix-org/synapse into neilj/room_capabilities
2019-01-30 10:56:47 +00:00
Neil Johnson
f834d98402
isort
2019-01-30 10:55:42 +00:00
Richard van der Hoff
bc5f6e1797
Add a caching layer to .well-known responses ( #4516 )
2019-01-30 10:55:25 +00:00
Amber Brown
3f189c902e
Fix flake8 ( #4519 )
2019-01-30 10:53:17 +00:00
Neil Johnson
ee4df7fd7a
Merge branch 'develop' into neilj/room_capabilities
2019-01-30 10:28:08 +00:00
Neil Johnson
c5a0f82cca
define room dispositions for use in exposing room capabilities
2019-01-30 10:24:24 +00:00
Neil Johnson
9c850d9d5e
formatting and use constants where available
2019-01-30 10:23:26 +00:00
Neil Johnson
2f46804055
Populate default room version from Constants
2019-01-30 09:39:10 +00:00
Neil Johnson
c7837dce24
reflect that rooms v3 is a stable room version
2019-01-30 09:33:30 +00:00
Richard van der Hoff
457fbfaf22
Merge pull request #4486 from xperimental/workaround-4216
...
Implement workaround for login error.
2019-01-30 07:06:11 +00:00
Robert Jacob
2a7f0b8953
Implement workaround for login error.
...
Signed-off-by: Robert Jacob <xperimental@solidproject.de >
2019-01-30 01:06:39 +01:00
Erik Johnston
47d03a79fc
Merge pull request #4515 from matrix-org/erikj/room_version_v3
...
Enable support for room version 3
2019-01-29 23:53:14 +00:00
Erik Johnston
0b24d58e05
No vdh tests!
2019-01-29 23:11:48 +00:00
Erik Johnston
ebcffbc3eb
Newsfile
2019-01-29 23:09:10 +00:00
Erik Johnston
a1b0e1879b
Enable room version v3
2019-01-29 23:09:10 +00:00
Erik Johnston
e12313ba25
Merge pull request #4499 from matrix-org/erikj/redactions_eiah
...
Implement rechecking of redactions for room versions v3
2019-01-29 23:07:00 +00:00
Erik Johnston
67b82f1336
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/redactions_eiah
2019-01-29 22:58:38 +00:00
Erik Johnston
afeea319df
Fixup comment
2019-01-29 22:55:29 +00:00
Erik Johnston
7740eddd04
Merge pull request #4514 from matrix-org/erikj/remove_event_id
...
Remove usages of event ID's domain
2019-01-29 22:54:25 +00:00
Erik Johnston
ff2f65d737
Update comment
2019-01-29 22:35:36 +00:00
Erik Johnston
655ce037fd
check event format version not room version
2019-01-29 22:33:43 +00:00
Erik Johnston
f46a818ce5
kill vdh test some more
2019-01-29 22:02:58 +00:00
Erik Johnston
a696c48133
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/redactions_eiah
2019-01-29 22:00:33 +00:00
Erik Johnston
c21b7cbc09
Update synapse/storage/events_worker.py
2019-01-29 21:53:48 +00:00
Erik Johnston
4db252c073
Check redaction state when event is pulled out of the database
2019-01-29 21:48:36 +00:00
Erik Johnston
6d23ec2111
Fix typo
2019-01-29 21:45:53 +00:00
Erik Johnston
b5d510ad64
Remove unused arg
2019-01-29 21:45:28 +00:00
Erik Johnston
6f9cdc2d47
Merge pull request #4483 from matrix-org/erikj/event_v2
...
Implement event format V2
2019-01-29 21:40:00 +00:00
Erik Johnston
47e2dd1994
Drop vdh support
2019-01-29 21:24:34 +00:00
Erik Johnston
38590a4870
Add docstring
2019-01-29 21:22:47 +00:00
Richard van der Hoff
82165eeb05
Update synapse/storage/events_worker.py
...
Co-Authored-By: erikjohnston <erikj@jki.re >
2019-01-29 21:14:39 +00:00
Andrew Morgan
03b086647f
Merge pull request #4512 from matrix-org/anoa/consent_dir
...
Check consent dir path on startup
2019-01-29 20:08:18 +00:00
Erik Johnston
3680bc18e9
Newsfile
2019-01-29 18:06:11 +00:00
Erik Johnston
84af577356
Implement event format v2
2019-01-29 18:06:11 +00:00
Neil Johnson
e4bef9d470
rework format of change password capability
2019-01-29 18:04:56 +00:00
Erik Johnston
b40abe0724
Newsfile
2019-01-29 18:02:26 +00:00
Erik Johnston
610f0830b0
Don't assert an event must have an event ID
2019-01-29 18:02:26 +00:00
Erik Johnston
840068bd78
Only check event ID domain for signatures for V1 events
...
In future version events won't have an event ID, so we won't be able to
do this check.
2019-01-29 18:02:02 +00:00
Erik Johnston
8e3d34e3c5
Use event origin for filtering incoming events
...
We only process events sent to us from a server if the event ID matches
the server, to help guard against federation storms. We replace this
with a check against the event origin.
2019-01-29 16:57:00 +00:00
Erik Johnston
55d9024835
Use snder and not event ID domain to check if ours
...
The transaction queue only sends out events that we generate. This was
done by checking domain of event ID, but that can no longer be used.
Instead, we may as well use the sender field.
2019-01-29 16:54:23 +00:00
Richard van der Hoff
cc2d650ef7
Relax requirement for a content-type on .well-known ( #4511 )
2019-01-29 16:49:17 +00:00
Erik Johnston
b1fffca345
Remove event ID usage when checking if new room
...
The event ID is changing, so we can no longer get the domain from it. On
the other hand, the check is unnecessary.
2019-01-29 16:15:02 +00:00
Erik Johnston
770b823445
Only check event IDs domain signed event for V1 and V2
...
Since newer versions of events don't have the same format for event ID.
2019-01-29 16:15:00 +00:00
Travis Ralston
d02c5ccb11
Merge pull request #4498 from matrix-org/travis/fix-docs-public_baseurl
...
Don't recommend :8448 to people on public_baseurl
2019-01-29 09:06:16 -07:00
Neil Johnson
19259d903c
update to reflect broadening scope
2019-01-29 16:01:46 +00:00
Neil Johnson
f03b3a7a3a
support change_password in capabilities end-point
2019-01-29 15:58:37 +00:00
Andrew Morgan
9adbc912b3
Add changelog
2019-01-29 15:34:06 +00:00
Andrew Morgan
e65a17b26f
Check consent dir path on startup
2019-01-29 15:30:33 +00:00
Amber Brown
6bd4374636
Do not generate self-signed TLS certificates by default. ( #4509 )
2019-01-29 14:09:10 +00:00
Erik Johnston
b8d75ef53e
Merge pull request #4481 from matrix-org/erikj/event_builder
...
Refactor event building into EventBuilder
2019-01-29 14:07:23 +00:00
Richard van der Hoff
99e36d5e24
Implement MSC1708 (.well-known lookups for server routing) ( #4489 )
2019-01-29 13:53:02 +00:00
Erik Johnston
b82a76c384
Finish comment...
2019-01-29 13:50:59 +00:00
Erik Johnston
2562319821
Merge pull request #4510 from matrix-org/erikj/fixup_compute_event_signature
...
Fixup calls to `comput_event_signature`
2019-01-29 13:35:19 +00:00
Neil Johnson
4eeb2fb215
isort
2019-01-29 12:44:10 +00:00
Erik Johnston
5891a6edc8
Correctly set context.app_service
2019-01-29 12:09:10 +00:00
Erik Johnston
fb99dae9c8
Don't set event_id twice
2019-01-29 12:08:23 +00:00
Richard van der Hoff
5488cadaae
Enable configuring test log level via env var ( #4506 )
...
I got fed up with always adding '@unittest.DEBUG' every time I needed to debug a test.
2019-01-29 12:07:00 +00:00
Erik Johnston
64c1bd1d21
Remove dead function
2019-01-29 12:06:28 +00:00
Erik Johnston
7d1024d574
Newsfile
2019-01-29 11:58:16 +00:00
Erik Johnston
7709d2bd16
Implement rechecking of redactions
2019-01-29 11:56:20 +00:00
Erik Johnston
7a3ec5b022
Add RoomVersions.V3 constant, without enabling it
...
We add the constant, but don't add it to the known room versions. This
lets us start adding V3 logic, but the servers will never join or create
V3 rooms
2019-01-29 11:55:33 +00:00
Erik Johnston
0c55b7701c
Newsfile
2019-01-29 11:42:33 +00:00
Erik Johnston
6598992b01
Fixup calls to comput_event_signature
...
We currently pass FrozenEvent instead of `dict` to
`compute_event_signature`, which works by accident due to `dict(event)`
producing the correct result.
This fixes PR #4493 commit 855a151
2019-01-29 11:41:58 +00:00
Neil Johnson
a124025dab
enforce auth for capabilities endpoint
2019-01-29 11:37:56 +00:00
Erik Johnston
ff37acb8ce
Merge pull request #4496 from matrix-org/erikj/invite_fallback
...
Implement fallback for V2 invite API
2019-01-29 11:28:23 +00:00
Erik Johnston
aee39f7de8
Fix test to use valid event format
2019-01-29 11:19:50 +00:00
Erik Johnston
5180f12bae
Replace usage of builder.user_id with builder.sender
...
`.user_id` is proxed to `.sender` in FrozenEvent, so this has no
functional change
2019-01-29 11:18:38 +00:00
Erik Johnston
a388d59d44
Newsfile
2019-01-29 11:13:08 +00:00
Erik Johnston
be47cfa9c9
Refactor event building into EventBuilder
...
This is so that everything is done in one place, making it easier to
change the event format based on room version
2019-01-29 11:13:00 +00:00
Erik Johnston
554ca58ea1
Make add_hashes_and_signatures operate on dicts
2019-01-29 11:12:38 +00:00
Amber Brown
f815bd7feb
Make linearizer more quiet ( #4507 )
2019-01-29 11:05:31 +00:00
Erik Johnston
073f6c2e5e
Merge pull request #4494 from matrix-org/erikj/fixup_event_validator
...
Split up event validation between event and builder
2019-01-29 10:55:07 +00:00
Erik Johnston
40638ae7f5
Remove duplicate checks
2019-01-29 10:37:40 +00:00
Erik Johnston
9fa3c6ffa3
Fix up error messages
2019-01-29 10:36:46 +00:00
Erik Johnston
28efc80723
Fold validate into validate_new
2019-01-29 10:34:49 +00:00
Erik Johnston
b6b73a0bcf
Fix receiving events from federation via a worker
...
This bug was introduced in PR #4470 , commit 678a92cb56
2019-01-29 10:30:26 +00:00
Neil Johnson
327b992e17
register capabilities servlet
2019-01-29 10:28:35 +00:00
Amber Brown
94fb63e44f
Fix typo in upserts code ( #4505 )
...
* fix obvious problem :|
* changelog
2019-01-29 10:04:23 +00:00
Erik Johnston
17709f8f9c
Merge pull request #4493 from matrix-org/erikj/refactor_event_signing
...
Refactor event signing to work on dicts
2019-01-29 09:52:54 +00:00
Richard van der Hoff
f2b553d656
Use SimpleResolverComplexifier in tests ( #4497 )
...
two reasons for this. One, it saves a bunch of boilerplate. Two, it squashes
unicode to IDNA-in-a-`str` (even on python 3) in a way that it turns out we
rely on to give consistent behaviour between python 2 and 3.
2019-01-29 09:38:29 +00:00
Erik Johnston
f1a04462eb
Merge pull request #4482 from matrix-org/erikj/event_auth_room_version
...
Pass through room version to event auth
2019-01-28 20:09:38 +00:00
Travis Ralston
c4045647eb
Create 4498.misc
2019-01-28 12:16:39 -07:00
Travis Ralston
6901ac7e9d
Don't recommend :8448 to people on public_baseurl
2019-01-28 12:15:22 -07:00
Erik Johnston
8cbc99cc19
Newsfile
2019-01-28 17:36:06 +00:00
Erik Johnston
d414f30019
Implement fallback for V2 invite API
...
If the room version is either 1 or 2 then a server should retry failed
`/v2/invite` requests with the v1 API
2019-01-28 17:33:25 +00:00
Erik Johnston
d758d5310e
Correctly use default room version if none is set
2019-01-28 17:26:39 +00:00
Amber Brown
5d976c0c7c
Fix worker TLS ( #4492 )
...
* load cert
* changelog
* fix
2019-01-28 17:18:33 +00:00
Erik Johnston
1977a9b006
Newsfile
2019-01-28 17:05:04 +00:00
Erik Johnston
b872c7b1b4
Split up event validation between event and builder
...
The validator was being run on the EventBuilder objects, and so the
validator only checked a subset of fields. With the upcoming
EventBuilder refactor even fewer fields will be there to validate.
To get around this we split the validation into those that can be run
against an EventBuilder and those run against a fully fledged event.
2019-01-28 17:00:14 +00:00
Erik Johnston
b8bea3424f
Newsfile
2019-01-28 16:47:12 +00:00
Erik Johnston
855a151015
Refactor event signing to work on dicts
...
This is in preparation for making EventBuilder format agnostic, which
means event signing should be done against the event dict rather than
the EventBuilder object.
2019-01-28 16:42:10 +00:00
Amber Brown
7072fe3084
Fix UPSERTs on SQLite 3.24+ ( #4477 )
2019-01-28 15:43:32 +00:00
Andrew Morgan
88f4df85ca
Merge pull request #4412 from matrix-org/anoa/dm_room_upgrade
...
Migrate direct message and tag state on room upgrade
2019-01-28 15:16:50 +00:00
Andrew Morgan
f0e96ab66a
Change return syntax in doc string
2019-01-28 14:09:45 +00:00
Andrew Morgan
4026d555fa
Merge branch 'develop' of github.com:matrix-org/synapse into anoa/dm_room_upgrade
2019-01-28 14:08:24 +00:00
Andrew Morgan
1ce463963d
Reuse predecessor method
2019-01-28 14:08:18 +00:00
Aaron Raimist
57a3e96e8e
Remove --process-dependency-links from UPGRADE.rst ( #4485 )
...
* Remove --process-dependency-links from UPGRADE.rst
Signed-off-by: Aaron Raimist <aaron@raim.ist >
* Add changelog
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-01-28 13:54:25 +00:00
Richard van der Hoff
d04ff2a03d
Merge pull request #4488 from matrix-org/rav/fed_routing/refactor
...
Refactoring in MatrixFederationAgent
2019-01-28 12:57:41 +00:00
Richard van der Hoff
3bd0f1a4a3
docstrings for _RoutingResult
2019-01-28 12:43:09 +00:00
Richard van der Hoff
ff05ad147a
changelog
2019-01-28 10:34:30 +00:00
Richard van der Hoff
0fd5b3b53e
Handle IP literals explicitly
...
We don't want to be doing .well-known lookups on these guys.
2019-01-28 10:34:30 +00:00
Richard van der Hoff
51958df766
MatrixFederationAgent: factor out routing logic
...
This is going to get too big and unmanageable.
2019-01-28 10:34:30 +00:00
Richard van der Hoff
d840019192
Fix idna and ipv6 literal handling in MatrixFederationAgent ( #4487 )
...
Turns out that the library does a better job of parsing URIs than our
reinvented wheel. Who knew.
There are two things going on here. The first is that, unlike
parse_server_name, URI.fromBytes will strip off square brackets from IPv6
literals, which means that it is valid input to ClientTLSOptionsFactory and
HostnameEndpoint.
The second is that we stay in `bytes` throughout (except for the argument to
ClientTLSOptionsFactory), which avoids the weirdness of (sometimes) ending up
with idna-encoded values being held in `unicode` variables. TBH it probably
would have been ok but it made the tests fragile.
2019-01-28 09:56:59 +00:00
Erik Johnston
f01c7488ab
Newsfile
2019-01-25 18:32:50 +00:00
Erik Johnston
ae2a957dba
Pass through room version to event auth
2019-01-25 18:31:41 +00:00
Neil Johnson
893107be78
backout v3
2019-01-25 17:27:36 +00:00
Erik Johnston
b6dce9b9fd
Merge pull request #4470 from matrix-org/erikj/require_format_version
...
Require event format version to parse or create events
2019-01-25 15:59:36 +00:00
Erik Johnston
57c035debe
Merge pull request #4471 from matrix-org/erikj/sqlite_native_upsert
...
Disable native upsert on sqlite
2019-01-25 14:31:05 +00:00
Erik Johnston
431e485914
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/sqlite_native_upsert
2019-01-25 14:11:17 +00:00
Richard van der Hoff
4a3f138832
Fix quoting for allowed_local_3pids example config ( #4476 )
...
If you use double-quotes here, you have to escape your backslashes. It's much
easier with single-quotes.
(Note that the existing double-backslashes are already interpreted by python's
""" parsing.)
2019-01-25 13:57:52 +00:00
Richard van der Hoff
8520bc3109
Fix Host header sent by MatrixFederationAgent ( #4468 )
...
Move the Host header logic down here so that (a) it is used if we reuse the
agent elsewhere, and (b) we can mess about with it with .well-known.
2019-01-25 12:38:16 +00:00
Andrew Morgan
9244a3089e
Fixes
2019-01-25 11:48:38 +00:00
Andrew Morgan
da0d2219d2
Clean up direct_rooms access
2019-01-25 11:37:12 +00:00
Andrew Morgan
8265995498
Use python magic
2019-01-25 11:26:06 +00:00
Andrew Morgan
0b3fd1401f
Don't require sqlite3 when using postgres ( #4466 )
2019-01-25 22:25:02 +11:00
Andrew Morgan
c4cdafa81f
Destructure account data tuple before use
2019-01-25 11:24:28 +00:00
Andrew Morgan
516456b763
Remove unnecessary null check
2019-01-25 11:22:14 +00:00
Andrew Morgan
6f3fda79ce
Move room_tag declaration to be closer to its use
2019-01-25 11:21:25 +00:00
Neil Johnson
95f871fc0d
Support room version capabilities in CS API (MSC1804)
2019-01-25 11:16:29 +00:00
Neil Johnson
a3f0556bea
towncrier
2019-01-25 11:15:41 +00:00
Andrew Morgan
821b65aeb5
Merge branch 'develop' of github.com:matrix-org/synapse into anoa/dm_room_upgrade
2019-01-25 11:09:53 +00:00
Andrew Morgan
0862d35b8e
Move tag and direct state copying into separate function
2019-01-25 11:09:34 +00:00
Neil Johnson
53ef4da8c2
track unstable room v3
2019-01-25 11:04:11 +00:00
Andrew Morgan
b1b6dba2d2
Merge pull request #4415 from matrix-org/anoa/full_search_upgraded_rooms
...
Ability to search entire room history after upgrading room
2019-01-25 10:49:58 +00:00
Erik Johnston
8dcfa6e75c
Newsfile
2019-01-25 10:48:40 +00:00
Erik Johnston
1953067136
Disable native upserts for sqlite, as they don't work
2019-01-25 10:46:49 +00:00
Erik Johnston
5d881cbcb8
Newsfile
2019-01-25 10:37:13 +00:00
Erik Johnston
678a92cb56
Replace missed usages of FrozenEvent
2019-01-25 10:32:30 +00:00
Erik Johnston
9770ed91c2
Fix tests
2019-01-25 10:32:26 +00:00
Erik Johnston
a50cf929c1
Require event format version to parse or create events
2019-01-25 10:32:19 +00:00
Erik Johnston
28c21cd578
Merge pull request #4447 from matrix-org/erikj/msc_1813
...
Implement MSC 1813 - Add room version to make APIs
2019-01-25 10:27:25 +00:00
Erik Johnston
829a7b2032
Merge pull request #4469 from matrix-org/revert-4451-erikj/require_format_version
...
Revert "Require event format version to parse or create events"
2019-01-25 10:26:13 +00:00
Erik Johnston
be6a7e47fa
Revert "Require event format version to parse or create events"
2019-01-25 10:23:51 +00:00
Erik Johnston
03b7df1af2
Merge pull request #4451 from matrix-org/erikj/require_format_version
...
Require event format version to parse or create events
2019-01-25 10:20:22 +00:00
Erik Johnston
62514bb81b
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/msc_1813
2019-01-25 10:07:08 +00:00
Erik Johnston
efb8ed1d45
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/require_format_version
2019-01-24 18:52:34 +00:00
Erik Johnston
edc1e21dbe
Merge pull request #4448 from matrix-org/erikj/get_pdu_versions
...
Add room_version param to get_pdu
2019-01-24 18:47:15 +00:00
Erik Johnston
80bcca659e
Merge pull request #4405 from matrix-org/erikj/fixup_rejecting_invites
...
Store rejected remote invite events as outliers
2019-01-24 18:33:27 +00:00
Erik Johnston
664b7a2920
Merge pull request #4437 from matrix-org/erikj/event_format_version_v2
...
Add support for persisting event format versions
2019-01-24 18:32:30 +00:00
Erik Johnston
d148c43050
Review comments
2019-01-24 18:31:23 +00:00
Erik Johnston
26f44164c8
Review comments
2019-01-24 18:28:00 +00:00
Erik Johnston
5ee1f997a8
Update make_membership_event docs
2019-01-24 18:08:08 +00:00
Erik Johnston
9139b87be4
Remove unecessary setting of outlier bit
2019-01-24 18:04:02 +00:00
Erik Johnston
b8082a5445
Use term 'out of band membership' instead
2019-01-24 17:33:19 +00:00
Andrew Morgan
a383289b0d
Merge branch 'anoa/full_search_upgraded_rooms' of github.com:matrix-org/synapse into anoa/full_search_upgraded_rooms
2019-01-24 17:23:51 +00:00
Andrew Morgan
e1781b043b
Remove redundant create event None check
2019-01-24 17:23:39 +00:00
Richard van der Hoff
03c85335d1
Apply suggestions from code review
...
Co-Authored-By: anoadragon453 <1342360+anoadragon453@users.noreply.github.com >
2019-01-24 17:22:09 +00:00
Richard van der Hoff
8ea509a935
Update synapse/api/filtering.py
...
Co-Authored-By: anoadragon453 <1342360+anoadragon453@users.noreply.github.com >
2019-01-24 17:21:35 +00:00
Andrew Morgan
50c396a7ee
Merge pull request #4461 from matrix-org/anoa/room_dir_quick_fix
...
Add a 60s timeout to filtered room directory queries
2019-01-24 15:24:35 +00:00
Andrew Morgan
075ff3ede9
Change default timeout value from 0 to None
2019-01-24 15:10:22 +00:00
Andrew Morgan
5b1dc94083
Use self.clock instead of datetime
2019-01-24 14:59:50 +00:00
Andrew Morgan
a2d85144e5
isort
2019-01-24 14:22:26 +00:00
Richard van der Hoff
4a6e863843
Merge pull request #4464 from matrix-org/rav/fix_srv_lookup
...
MatrixFederationAgent: Look up the right SRV record
2019-01-24 13:57:51 +00:00
Richard van der Hoff
8c58c10697
Generate the debian config during build ( #4444 )
...
Rather than hardcoding a config which we always forget to update, generate it
from the default config.
2019-01-24 13:39:01 +00:00
Richard van der Hoff
f4697b5ec1
Fix UnboundLocalError in post_urlencoded_get_json ( #4460 )
...
This could cause exceptions if the id server returned 4xx responses.
2019-01-24 13:38:29 +00:00
Richard van der Hoff
afd69a0920
Look up the right SRV record
2019-01-24 13:31:43 +00:00
Richard van der Hoff
e1c8440e0c
lots more tests for MatrixFederationAgent
2019-01-24 13:28:07 +00:00
Neil Johnson
10b89d5c2e
Merge pull request #4435 from matrix-org/neilj/fix_threepid_auth_check
...
Neilj/fix threepid auth check
2019-01-24 13:02:50 +00:00
Andrew Morgan
2a360e834f
Add changelog
2019-01-24 12:47:35 +00:00
Andrew Morgan
5541645e80
lint
2019-01-24 12:45:32 +00:00
Andrew Morgan
068aa1d228
Time out filtered room dir queries after 60s
2019-01-24 12:44:27 +00:00
Neil Johnson
5c41b22359
Merge pull request #4458 from matrix-org/dbkr/public_baseurl_doc
...
Clarify docs for public_baseurl
2019-01-24 12:36:09 +00:00
Amber Brown
0e27501ee5
Fix UPSERT check ( #4459 )
2019-01-24 22:57:41 +11:00
Erik Johnston
e8c9f15397
Replace missed usages of FrozenEvent
2019-01-24 11:14:07 +00:00
David Baker
1f2058fca5
Changelog
2019-01-24 10:57:12 +00:00
David Baker
92d8a068ad
Clarify docs for public_baseurl
...
This is leading to problems with people upgrading to clients that
support MSC1730 because people have this misconfigured, so try
to make the docs completely unambiguous.
2019-01-24 10:52:06 +00:00
Amber Brown
58f6c48183
Use native UPSERTs where possible ( #4306 )
2019-01-24 21:31:54 +11:00
Richard van der Hoff
97fd29c019
Don't send IP addresses as SNI ( #4452 )
...
The problem here is that we have cut-and-pasted an impl from Twisted, and then
failed to maintain it. It was fixed in Twisted in
https://github.com/twisted/twisted/pull/1047/files ; let's do the same here.
2019-01-24 09:34:44 +00:00
Erik Johnston
e79ba9eb34
Fix tests
2019-01-24 09:28:16 +00:00
Erik Johnston
073173277c
Newsfile
2019-01-23 20:27:31 +00:00
Erik Johnston
f431ff3fb8
Require event format version to parse or create events
2019-01-23 20:21:33 +00:00
Erik Johnston
17898a5ba6
Merge branch 'erikj/fixup_rejecting_invites' of github.com:matrix-org/synapse into erikj/require_format_version
2019-01-23 20:13:07 +00:00
Erik Johnston
7c288c2250
Clarify the invite flows
2019-01-23 20:07:47 +00:00
Erik Johnston
07f62da55a
Remove unnecessary '_sign_event'
2019-01-23 20:04:57 +00:00
Erik Johnston
183738f469
Newsfile
2019-01-23 20:04:57 +00:00
Erik Johnston
886e5acc76
Store rejected remote invite events as outliers
...
Currently they're stored as non-outliers even though the server isn't in
the room, which can be problematic in places where the code assumes it
has the state for all non outlier events.
In particular, there is an edge case where persisting the leave event
triggers a state resolution, which requires looking up the room version
from state. Since the server doesn't have the state, this causes an
exception to be thrown.
2019-01-23 20:04:57 +00:00
Willem Mulder
d528406cb8
Fix error message for optional dependencies
...
Signed-off-by: Willem Mulder <willemmaster@hotmail.com >
2019-01-23 18:44:57 +01:00
Erik Johnston
2a8edbaf74
Merge branch 'erikj/get_pdu_versions' into erikj/require_format_version
2019-01-23 17:27:49 +00:00
Erik Johnston
fd654a4d54
Merge branch 'erikj/msc_1813' into erikj/require_format_version
2019-01-23 17:27:43 +00:00
Erik Johnston
c5a125b24f
Update newsfile
2019-01-23 17:26:06 +00:00
Erik Johnston
4a8b715679
Newsfile
2019-01-23 17:25:27 +00:00
Erik Johnston
a4ef8d8dd5
Newsfile
2019-01-23 17:24:44 +00:00
Erik Johnston
6a41d2a187
Add room_version param to get_pdu
...
When we add new event format we'll need to know the event format or room
version when parsing events.
2019-01-23 17:19:58 +00:00
Erik Johnston
67cd4dad81
Implement MSC 1813 - Add room version to make APIs
...
We also implement `make_membership_event` converting the returned
room version to an event format version.
2019-01-23 16:51:46 +00:00
Andrew Morgan
6b90ae6efc
Merge pull request #4445 from matrix-org/anoa/user_dir_develop_backport
...
Add metric for user dir current event stream position
2019-01-23 15:58:40 +00:00
Richard van der Hoff
a0ae475219
Merge pull request #4428 from matrix-org/rav/matrix_federation_agent
...
Move SRV magic into an Agent-like thing
2019-01-23 15:50:25 +00:00
Andrew Morgan
cb0e637a94
Add changelog
2019-01-23 15:38:27 +00:00
Andrew Morgan
82a92ba535
Add metric for user dir current event stream position
2019-01-23 15:34:47 +00:00
Erik Johnston
be1065af59
isort
2019-01-23 11:48:16 +00:00
Richard van der Hoff
2f88881c93
debian package: symlink to python-3.X ( #4433 )
...
In the debian package, make the virtualenv symlink python to /usr/bin/python3.X
rather than /usr/bin/python3. Also make sure we depend on the right python3.x
package.
This might help a bit with subtle failures when people install a package from
the wrong distro (https://github.com/matrix-org/synapse/issues/4431 ).
2019-01-23 11:43:04 +00:00
Erik Johnston
4cd50d983d
Newsfile
2019-01-23 11:30:24 +00:00
Erik Johnston
c5a296b10c
Add support for persisting event format versions
...
Currently we only have the one event format version defined, but this
adds the necessary infrastructure to persist and fetch the format
versions alongside the events.
We specify the format version rather than the room version as:
1. We don't necessarily know the room version, existing events may be
either v1 or v2.
2. We'd need to be careful to prevent/handle correctly if different
events in the same room reported to be of different versions, which
sounds annoying.
2019-01-23 11:30:01 +00:00
Richard van der Hoff
6b574f3df7
fix python2 test failure
2019-01-23 11:25:36 +00:00
Jason Robinson
6f680241bd
Fix flake8 issues
...
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-01-23 10:53:48 +02:00
Erik Johnston
90743c9d89
Fixup removal of duplicate user_ips rows ( #4432 )
...
* Remove unnecessary ORDER BY clause
* Add logging
* Newsfile
2019-01-23 19:45:18 +11:00
Amber Brown
6129e52f43
Support ACME for certificate provisioning ( #4384 )
2019-01-23 19:39:06 +11:00
Jason Robinson
1838ef1ac3
Fix openid tests after rebase
...
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-01-23 10:38:13 +02:00
Jason Robinson
a47fac9af6
Fix sorting of imports in tests. Remove an unnecessary mock
...
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-01-23 10:32:41 +02:00
Jason Robinson
db33634b1d
Collapse changelog to one line
...
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-01-23 10:32:41 +02:00
Jason Robinson
0516dc4d85
Remove openid resource from default config
...
Instead document it commented out.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-01-23 10:32:41 +02:00
Jason Robinson
d39b7b6d38
Document servlet_groups parameters
...
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-01-23 10:32:41 +02:00
Jason Robinson
1d2c69fee8
Add changelog for openid resource addition
...
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-01-23 10:32:41 +02:00
Jason Robinson
82e13662c0
Split federation OpenID userinfo endpoint out of the federation resource
...
This allows the OpenID userinfo endpoint to be active even if the
federation resource is not active. The OpenID userinfo endpoint
is called by integration managers to verify user actions using the
client API OpenID access token. Without this verification, the
integration manager cannot know that the access token is valid.
The OpenID userinfo endpoint will be loaded in the case that either
"federation" or "openid" resource is defined. The new "openid"
resource is defaulted to active in default configuration.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-01-23 10:32:41 +02:00
Jason Robinson
5336e49b39
Add tests for the openid lister for SynapseHomeServer
...
Check all possible variants of openid and federation listener on/off
possibilities.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-01-23 10:32:41 +02:00
Jason Robinson
a17bac171f
Make SynapseHomeServer _http_listener use self.get_reactor()
...
For all the homeserver classes, only the FrontendProxyServer passes
its reactor when doing the http listen. Looking at previous PR's looks
like this was introduced to make it possible to write a test, otherwise
when you try to run a test with the test homeserver it tries to
do a real bind to a port. Passing the reactor that the homeserver
is instantiated with should probably be the right thing to do anyway?
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-01-23 10:32:41 +02:00
Jason Robinson
6d25599098
Add tests for the openid lister for FederationReaderServer
...
Check all possible variants of openid and federation listener on/off
possibilities.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-01-23 10:32:41 +02:00
Jason Robinson
4f8f41c824
Make FederationReaderServer _http_listen use self.get_reactor()
...
For all the homeserver classes, only the FrontendProxyServer passes
its reactor when doing the http listen. Looking at previous PR's looks
like this was introduced to make it possible to write a test, otherwise
when you try to run a test with the test homeserver it tries to
do a real bind to a port. Passing the reactor that the homeserver
is instantiated with should probably be the right thing to do anyway?
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-01-23 10:32:41 +02:00
Jason Robinson
899e60be80
Add parameterized Python module to test dependencies
...
Allows running parameterized tests. BSD license.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-01-23 10:32:41 +02:00
Jason Robinson
ab97b6e33c
Fix a test docstring in frontend proxy tests
...
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-01-23 10:32:41 +02:00
Richard van der Hoff
d02c4532c0
Add a test for MatrixFederationAgent
2019-01-22 20:35:12 +00:00
Richard van der Hoff
7021784d46
put resolve_service in an object
...
this makes it easier to stub things out for tests.
2019-01-22 20:35:12 +00:00
Richard van der Hoff
53a327b4d5
Require that service_name be a byte string
...
it is only ever a bytes now, so let's enforce that.
2019-01-22 20:35:12 +00:00
Richard van der Hoff
c66f4bf7f1
changelog
2019-01-22 20:34:35 +00:00
Richard van der Hoff
fe212bbe4a
Kill off matrix_federation_endpoint
...
this thing is now redundant.
2019-01-22 20:34:35 +00:00
Richard van der Hoff
7871146667
Make MatrixFederationClient use MatrixFederationAgent
...
... instead of the matrix_federation_endpoint
2019-01-22 20:34:35 +00:00
Richard van der Hoff
44be7513bf
MatrixFederationAgent
...
Pull the magic that is currently in matrix_federation_endpoint and friends into
an agent-like thing
2019-01-22 20:34:35 +00:00
Neil Johnson
c99c2d58d7
move guard out of is_threepid_reserved and into register.py
2019-01-22 17:47:00 +00:00
Neil Johnson
d619b113ed
Fix None guard in config.server.is_threepid_reserved
2019-01-22 16:52:29 +00:00
Erik Johnston
12699a701f
Merge pull request #4434 from matrix-org/erikj/fix_user_ips_dedup
...
Fix bug when removing duplicate rows from user_ips
2019-01-22 16:51:57 +00:00
Erik Johnston
7f503f83b9
Refactor to rewrite the SQL instead
2019-01-22 16:31:05 +00:00
Neil Johnson
388c164aea
Merge pull request #4423 from matrix-org/neilj/disable_msisdn_on_registration
...
Config option to disable requesting MSISDN on registration
2019-01-22 16:23:08 +00:00
Erik Johnston
1c9704f8ab
Don't shadow params
2019-01-22 16:20:33 +00:00
Andrew Morgan
766a172b99
lint
2019-01-22 13:51:40 +00:00
Erik Johnston
c658425e6f
Newsfile
2019-01-22 13:34:10 +00:00
Erik Johnston
2557531f0f
Fix bug when removing duplicate rows from user_ips
...
This was caused by accidentally overwritting a `last_seen` variable
in a for loop, causing the wrong value to be written to the progress
table. The result of which was that we didn't scan sections of the table
when searching for duplicates, and so some duplicates did not get
deleted.
2019-01-22 13:33:46 +00:00
Andrew Morgan
117bc94cd2
Merge branch 'develop' of github.com:matrix-org/synapse into anoa/dm_room_upgrade
2019-01-22 13:16:51 +00:00
Andrew Morgan
277e50462d
Do not return in a deferred function
2019-01-22 12:40:26 +00:00
Andrew Morgan
c4875d8c76
Prevent duplicate room IDs in m.direct
2019-01-22 12:13:46 +00:00
Andrew Morgan
c433f61091
Ensure new filter is actually created
2019-01-22 12:06:36 +00:00
Andrew Morgan
c9bfb058d8
Fix a bug with single-room search searching all rooms
...
* Create a new method for getting predecessor rooms
* Remove formatting change
2019-01-22 12:00:41 +00:00
Andrew Morgan
8086a5c05e
Fix comments
2019-01-22 11:16:23 +00:00
Richard van der Hoff
6bfa735a69
Make key fetches use regular federation client ( #4426 )
...
All this magic is redundant.
2019-01-22 11:04:20 +00:00
Andrew Morgan
48951f437f
Join logic covers both room creator and arbitrary users
2019-01-22 11:00:04 +00:00
Andrew Morgan
8c85f0833d
tags, m.direct copying over correctly
2019-01-22 11:00:04 +00:00
Andrew Morgan
25d64a846a
Fix typos
2019-01-22 11:00:04 +00:00
Andrew Morgan
ea8903fcc9
Migrating dm and room tags work for migrator
2019-01-22 11:00:04 +00:00
Andrew Morgan
887ca93a1b
Prevent crash on user who doesn't have any direct rooms
2019-01-22 11:00:04 +00:00
Andrew Morgan
1f18c7cfc9
Add changelog
2019-01-22 11:00:04 +00:00
Andrew Morgan
4ff6d22245
Preserve DM status of a room on upgrade
...
Signed-off-by: Andrew Morgan <andrew@amorgan.xyz >
2019-01-22 11:00:04 +00:00
Andrew Morgan
75942af1db
Fix typo
2019-01-22 11:00:04 +00:00
Richard van der Hoff
33a55289cb
Refactor and bugfix for resove_service ( #4427 )
2019-01-22 10:59:27 +00:00
Amber Brown
23b0813599
Require ECDH key exchange & remove dh_params ( #4429 )
...
* remove dh_params and set better cipher string
2019-01-22 21:58:50 +11:00
Neil Johnson
1b53cc3cb4
fix line length
2019-01-21 15:17:20 +00:00
Neil Johnson
5349262302
Config option to disable requesting MSISDN on registration
2019-01-21 14:59:37 +00:00
Erik Johnston
83f335bedf
Merge pull request #4402 from matrix-org/erikj/fed_v2_invite_server
...
Implement server side of MSC1794 - Federation v2 Invite API
2019-01-21 14:50:54 +00:00
Erik Johnston
35e1d67b4e
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/fed_v2_invite_server
2019-01-21 14:04:19 +00:00
Erik Johnston
5f54765587
Merge pull request #4390 from matrix-org/erikj/versioned_fed_apis
...
Add groundwork for new versions of federation APIs
2019-01-21 11:44:05 +00:00
Andrew Morgan
702c4b750c
Migrate encryption state on room upgrade ( #4411 )
...
* Migrate encryption state on room upgrade
Signed-off-by: Andrew Morgan <andrew@amorgan.xyz >
* Add changelog file
2019-01-21 20:42:58 +11:00
Erik Johnston
25dd56ace3
Fix race when persisting create event ( #4404 )
...
* Fix race when persisting create event
When persisting a chunk of DAG it is sometimes requried to do a state
resolution, which requires knowledge of the room version. If this
happens while we're persisting the create event then we need to use that
event rather than attempting to look it up in the database.
2019-01-18 23:17:04 +11:00
Erik Johnston
71b94eac46
Tweak code coverage settings ( #4400 )
...
* Tweak code coverage settings
* Fix manifest
* Newsfile
* Fix commit status?
2019-01-18 23:13:14 +11:00
Richard van der Hoff
de6888e7ce
Remove redundant WrappedConnection ( #4409 )
...
* Remove redundant WrappedConnection
The matrix federation client uses an HTTP connection pool, which times out its
idle HTTP connections, so there is no need for any of this business.
2019-01-18 23:07:38 +11:00
Andrew Morgan
cb80db8941
Add changelog
2019-01-18 11:22:00 +00:00
Andrew Morgan
df3a661e4a
Search for messages across predecessor rooms
...
Signed-off-by: Andrew Morgan <andrew@amorgan.xyz >
2019-01-18 11:19:20 +00:00
Richard van der Hoff
676cf2ee26
Fix incorrect logcontexts after a Deferred was cancelled ( #4407 )
2019-01-17 14:00:23 +00:00
Richard van der Hoff
9feb5d0b71
sign_request -> build_auth_headers ( #4408 )
...
Just got very confused about the fact that the headers are only an output, not
an input.
2019-01-17 12:40:09 +00:00
Richard van der Hoff
3982a6ee07
Changing macaroon_secret_key no longer logs you out ( #4387 )
2019-01-16 23:14:41 +00:00
Richard van der Hoff
05e1296649
don't store more remote device lists if they have more than 1K devices ( #4397 )
2019-01-16 23:14:11 +00:00
Erik Johnston
f788c9eb70
Newsfile
2019-01-16 13:46:36 +00:00
Erik Johnston
7f1a6a4ea5
Merge pull request #4399 from andrewshadura/update-python-deps
...
Update Dependencies
2019-01-16 13:37:47 +00:00
Andrej Shadura
3b31a54a6e
Add a changelog entry
...
Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk >
2019-01-16 10:54:43 +01:00
Andrej Shadura
64cf6788d9
Depend on pymacaroons >= 0.13.0 instead on pymacaroons-pynacl
...
Since 0.13.0, pymacaroons works correctly with pynacl, so there
isn’t any more reason to depend on an outdated pynacl fork.
Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk >
2019-01-16 10:54:41 +01:00
Andrej Shadura
fab948120f
Use msgpack instead of msgpack-python
...
The package msgpack-python has been deprecated.
Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk >
2019-01-16 10:53:49 +01:00
Erik Johnston
aa955f2d15
Merge pull request #4392 from matrix-org/neilj/fix_user_type_typo
...
ALL_USER_TYPES should be a tuple
2019-01-15 14:56:52 +00:00
Neil Johnson
9ec56d6935
ALL_USER_TYPES should be a tuple
2019-01-15 14:38:15 +00:00
Erik Johnston
4a4d2e17bc
Add /v2/invite federation API
2019-01-15 13:22:44 +00:00
Erik Johnston
1a8f4139a5
Newsfile
2019-01-15 11:21:52 +00:00
Erik Johnston
bb63e7ca4f
Add groundwork for new versions of federation APIs
2019-01-15 11:14:34 +00:00
Richard van der Hoff
7e41545e8b
Merge branch 'release-v0.34.1.1' into develop
2019-01-12 13:30:30 +00:00
Richard van der Hoff
4fd051f9c3
moar plusses!
...
turns out that 0.34.1.1+1 comes before 0.34.1.1+bionic (etc).
The version may only contain "~ 0-9 A-Z a-z + - ." (sorting in that order).
Option 1: replace "+" with something that sorts after +. Options are "-" (but
dpkg-source complains about that) or "." (but that would mean we couldn't
distinguish packaging-only changes from real changes).
Option 2: stick with + and just find something that sorts after 'xenial'. The
only options there are "-", "." (same problems as before), "z", and "+".
Hence, ++1. Sorry.
2019-01-12 13:08:32 +00:00
Richard van der Hoff
b5b868d41e
Rewrite build_debian_packages
...
Rewrite this in python so that it can be run in parallel.
2019-01-12 12:40:58 +00:00
Richard van der Hoff
34b25dcc8e
Silence travis-ci build warnings by removing non-functional python3.6 ( #4377 )
...
* Remove non-functional python3.6 in travis env
* changelog
2019-01-12 06:22:56 +11:00
Amber Brown
a35c66a00b
Remove duplicates in the user_ips table and add an index ( #4370 )
2019-01-12 06:21:50 +11:00
Richard van der Hoff
91fa34b3fa
s/Breaks/Conflicts/ in debian/control
...
Otherwise people can't upgrade from matrix-synapse without removing it first
2019-01-11 17:05:45 +00:00
Amber Brown
522dada206
Merge remote-tracking branch 'origin/master' into develop
2019-01-11 02:22:48 +11:00
Amber Brown
ea00f18135
Merge Synapse v0.34.1.1
2019-01-11 02:21:54 +11:00
Amber Brown
c0dba73aa0
changelog, for debian
2019-01-11 02:20:29 +11:00
Richard van der Hoff
8c818af38e
Merge pull request #4342 from aaronraimist/new-virtualenv
...
Update README to use new virtualenv (#4328 )
2019-01-10 14:59:33 +00:00
Amber Brown
5c792ee5c3
changelog
2019-01-11 01:59:10 +11:00
Amber Brown
6dc06c3775
version
2019-01-11 01:56:37 +11:00
Amber Brown
3933ce9f13
Merge pull request #4374 from matrix-org/rav/macaroon_key_fix_0.34.1
...
Fix spontaneous logout
2019-01-11 01:48:53 +11:00
Richard van der Hoff
de80e979c9
changelog
2019-01-10 14:26:01 +00:00
Richard van der Hoff
e0910d0145
Merge branch rav/macaroon_key_fix_0.34 into rav/macaroon_key_fix_0.34.1
...
Fixes #4371
2019-01-10 14:12:50 +00:00
Richard van der Hoff
ba41aeed6a
Revert "Fix macaroon_secret_key fallback logic"
...
This is already fixed in 0.34.1, by 59f93bb
This reverts commit efc522c55e .
2019-01-10 14:09:26 +00:00
Richard van der Hoff
4f24452ead
changelog
2019-01-10 14:00:23 +00:00
Richard van der Hoff
aa70d24125
Merge branch 'rav/macaroon_key_fix' into rav/macaroon_key_fix_0.34
2019-01-10 12:58:33 +00:00
Richard van der Hoff
efc522c55e
Fix macaroon_secret_key fallback logic
2019-01-10 12:57:27 +00:00
Richard van der Hoff
566947ff34
Skip macaroon check for access tokens in the db
2019-01-10 12:57:21 +00:00
Richard van der Hoff
353f2407b7
Fix fallback to signing key for macaroon-secret-key
2019-01-10 12:42:56 +00:00
Richard van der Hoff
8d4b4e781f
Merge branch 'master' into develop
2019-01-09 16:52:08 +00:00
Richard van der Hoff
95fca1c7e9
fix docker build to install optional deps
2019-01-09 16:37:51 +00:00
Richard van der Hoff
58fe88c47e
Merge branch 'master' into develop
2019-01-09 16:02:05 +00:00
Richard van der Hoff
2394e832a8
debian: Remove Breaks: matrix-synapse-ldap3
2019-01-09 15:35:11 +00:00
Richard van der Hoff
d566e6b17a
Merge branch 'master' into develop
2019-01-09 15:00:46 +00:00
Richard van der Hoff
998f5225c1
0.34.1
2019-01-09 14:53:54 +00:00
Erik Johnston
55c3e853c5
Merge pull request #4368 from matrix-org/erikj/better_errors
...
Fixup docstrings for matrixfederationclient
2019-01-09 11:39:28 +00:00
Erik Johnston
484867d35d
Merge branch 'develop' into release-v0.34.1
2019-01-09 11:38:13 +00:00
Amber Brown
7960c26fda
Fix adding new rows instead of updating them if one of the key values is a NULL in upserts. ( #4369 )
2019-01-09 22:26:25 +11:00
Erik Johnston
0dce21ba77
Newsfile
2019-01-09 09:27:03 +00:00
Erik Johnston
34ea14139d
Fixup docstrings for matrixfederationclient
2019-01-09 09:25:59 +00:00
Erik Johnston
d1d81d0651
Merge pull request #4362 from matrix-org/erikj/better_errors
...
Use RequestSendFailed when fail to parse content type headers
2019-01-09 09:08:35 +00:00
Erik Johnston
d91b99abe0
Newsfile
2019-01-08 14:24:05 +00:00
Erik Johnston
d422570e9b
Use RequestSendFailed when fail to parse content type headers
2019-01-08 14:22:18 +00:00
Erik Johnston
c4530b97b2
Merge pull request #4361 from matrix-org/erikj/better_errors
...
Don't log stack traces for HTTP error responses
2019-01-08 14:19:00 +00:00
Erik Johnston
83c50bf752
Newsfile
2019-01-08 12:28:35 +00:00
Erik Johnston
1371d5b798
Don't log stack traces for HTTP error responses
2019-01-08 12:28:30 +00:00
Richard van der Hoff
32172f2297
clean up changelog
2019-01-08 11:26:11 +00:00
Richard van der Hoff
ba85786d71
0.34.1rc1
2019-01-08 11:15:34 +00:00
Richard van der Hoff
bc1a4b5576
changelog
2019-01-08 11:14:59 +00:00
Erik Johnston
b970cb0e96
Refactor request sending to have better excpetions ( #4358 )
...
* Correctly retry and back off if we get a HTTPerror response
* Refactor request sending to have better excpetions
MatrixFederationHttpClient blindly reraised exceptions to the caller
without differentiating "expected" failures (e.g. connection timeouts
etc) versus more severe problems (e.g. programming errors).
This commit adds a RequestSendFailed exception that is raised when
"expected" failures happen, allowing the TransactionQueue to log them as
warnings while allowing us to log other exceptions as actual exceptions.
2019-01-08 11:04:28 +00:00
Amber Brown
1dcb086f33
Fix synapse.config.__main__ on python 3 ( #4356 )
2019-01-08 10:03:09 +11:00
Jason Robinson
26e5abf20d
Fix command hint to generate a config file ( #4353 )
...
* Fix command hint to generate a config file
When trying to start Synapse without a config file, it will complain
and give a hint towards what command to run. This hinted command
is missing the "report_stats" parameter, which is required with either
yes or no value. Add this to the command.
Not an ideal situation but makes the given command work without the
user getting another error, even though it might be unclear what
"report_stats" represents.
Signed-off-by: Jason Robinson <jasonr@matrix.org >
2019-01-07 16:28:40 +00:00
Travis Ralston
bc1fa8cd01
Add GET account data routes ( #4303 )
...
As per https://github.com/matrix-org/matrix-doc/issues/1339
2019-01-07 10:27:54 +00:00
Richard van der Hoff
b7c0218812
Check jinja version for consent resource ( #4327 )
...
* Raise a ConfigError if an invalid resource is specified
* Require Jinja 2.9 for the consent resource
* changelog
2019-01-07 10:14:31 +00:00
Michael Telatynski
a27e501b09
fix the check for whether is_url to match all the other ones in codebase ( #3405 )
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
2019-01-06 21:43:25 +00:00
Richard van der Hoff
29f20a8a1a
Update debian Conflicts specifications ( #4349 )
...
... to allow installation alongside our matrix-synapse transitional package.
2019-01-04 17:24:13 +00:00
Matthew Hodgson
27128145e6
fix NPE in /messages by checking if all events were filtered out ( #4330 )
2019-01-02 23:37:39 +00:00
Richard van der Hoff
dd3bf40152
README.rst: fix hash_password path
2019-01-02 16:36:29 +00:00
Aaron Raimist
37f8bdc1d5
Update README to not lie about required restart ( #4343 )
...
* Update README to not lie about required restart
Signed-off-by: Aaron Raimist <aaron@raim.ist >
* Add changelog
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-01-02 16:32:37 +00:00
Neil Johnson
f95581332f
Merge pull request #4344 from matrix-org/neilj/fix_synchrotron_fix_4312
...
Ensure synchrotrons can access is_support_user in the storage layer
2019-01-02 10:42:01 +00:00
Neil Johnson
84b6fae1f5
Ensure synchrotrons can access is_support_user in the storage layer
2019-01-02 10:19:59 +00:00
jribal
265513e499
Update docker-compose.yml ( #4282 )
...
Hi, the original docker-compose file did not work by default.
You get federation port working but no client port.
My proposal is to let federation port work as it is by default (8448) and let traefik handle client http/https traffic.
2019-01-02 07:38:18 +00:00
Aaron Raimist
252c0c81fa
Update PR template to use absolute links ( #4341 )
...
* Update PR template to use absolute links
Signed-off-by: Aaron Raimist <aaron@raim.ist >
* Add changelog
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-01-02 07:33:13 +00:00
Richard van der Hoff
e9cdfedff3
Avoid packaging _trial_temp directory ( #4326 )
...
Make sure we don't put the _trial_temp directory in the package target
directory.
Fixes https://github.com/matrix-org/synapse/issues/4322
2019-01-02 07:30:31 +00:00
Richard van der Hoff
7134832c01
Install the optional dependencies into the debian package ( #4325 )
...
since #4298 , the optional dependencies are no longer installed with a simple
`pip install .`, which meant that they were not being included in the debian
package.
The easy fix to that is dh_virtualenv --extras, but that needs dh_virtualenv
1.1...
2019-01-02 07:17:39 +00:00
Aaron Raimist
7975d39cbd
Add changelog
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-01-01 15:40:55 -06:00
Aaron Raimist
0e62fcd0eb
Update README to use new virtualenv ( #4328 )
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2019-01-01 15:27:28 -06:00
Amber Brown
d7843f47b6
Remove v1 only REST APIs now we don't ship matrix console ( #4334 )
2018-12-29 23:12:30 +11:00
Krithin Sitaram
98df67a8de
Remove mention of lt-cred-mech in the sample coturn config. ( #4333 )
...
* Remove mention of lt-cred-mech in the sample coturn config.
See https://github.com/coturn/coturn/pull/262 for more context.
Also clean up some minor formatting issues while I'm here.
* Add changelog.
Signed-off-by: Krithin Sitaram <krithin@gmail.com >
2018-12-28 23:31:49 +00:00
Will Hunt
0708f437cc
Log roomid along with Unknown room ( #4297 )
2018-12-24 10:49:42 +01:00
Richard van der Hoff
cd018e3543
Merge pull request #4307 from matrix-org/erikj/v2_rooms
...
Add v2 room version
2018-12-24 10:48:59 +01:00
Richard van der Hoff
f85676cc93
Return well_known in /login response ( #4319 )
...
... as per MSC1730.
2018-12-24 10:44:33 +01:00
Richard van der Hoff
3355c1a9ec
Merge pull request #4317 from de-vri-es/test-metric-prometheus-0.5
...
Fix test_metrics.py compatibility prometheus_client 0.5
2018-12-23 00:14:47 +01:00
Richard van der Hoff
597dafb5e8
Merge pull request #4316 from matrix-org/rav/fix_docker_upload
...
Fix circleci config for synapse:latest docker upload
2018-12-21 17:33:34 +01:00
Richard van der Hoff
9c2af7b2c5
Add a script to generate a clean config file ( #4315 )
2018-12-22 02:04:57 +11:00
Richard van der Hoff
f3561f8d86
Fix indentation in default config ( #4313 )
...
These settings are not supposed to be under 'listeners'.
2018-12-22 02:01:43 +11:00
Amber Brown
ea6abf6724
Fix IP URL previews on Python 3 ( #4215 )
2018-12-22 01:56:13 +11:00
Amber Brown
c26f49a664
Make the dependencies more like a standard Python project and hook up the optional dependencies to setuptools ( #4298 )
2018-12-22 01:37:26 +11:00
Maarten de Vries
48b7ff7a35
Fix test_metrics.py compatibility prometheus_client 0.5
...
prometheus_client 0.5 has a named-tuple Sample type with more member
than the old plain tuple had. This commit makes sure the unit test
detects this and changes the way it reads the sample.
Signed-off-by: Maarten de Vries <maarten@de-vri.es >
2018-12-21 01:53:57 +01:00
Richard van der Hoff
d9aaf26539
Fix circleci config for synapse:latest docker upload
...
Give the image the right tag, so that we can push it.
2018-12-21 00:22:31 +00:00
Richard van der Hoff
c8d32caba3
Merge branch 'master' into develop
2018-12-20 23:33:25 +00:00
Richard van der Hoff
ad1c68ad94
Mention updating extensions
2018-12-20 23:32:59 +00:00
Richard van der Hoff
fc9cdbabe7
Merge branch 'master' into develop
2018-12-20 22:08:51 +00:00
Richard van der Hoff
a7aca672df
clarify that installing -py3 removes the old pkg
2018-12-20 22:05:27 +00:00
Richard van der Hoff
5dd9a381c5
Merge branch 'master' into develop
2018-12-20 16:56:48 +00:00
Richard van der Hoff
0b26feb422
Merge branch 'master' into develop
2018-12-20 16:48:47 +00:00
Richard van der Hoff
bdc44b99a2
buster is a thing
2018-12-20 16:11:21 +00:00
Richard van der Hoff
d731b75c7b
Clarify that py2 packages will continue to exist
2018-12-20 14:55:41 +00:00
Richard van der Hoff
dfeb274484
document supported python 3 versions
2018-12-20 13:57:48 +00:00
Richard van der Hoff
0e8acf3b02
more changelog fix
2018-12-20 12:18:03 +00:00
Richard van der Hoff
a92d55d8a7
minor changelog tweaks
2018-12-20 12:16:04 +00:00
Richard van der Hoff
8e4d9122b0
fix UPGRADE formatting
2018-12-20 12:09:16 +00:00
Richard van der Hoff
6dd7271243
Prepare 0.34 release
2018-12-20 12:07:15 +00:00
Richard van der Hoff
8957a11979
Update log config for debian packages
...
Better follow our own release notes.
2018-12-20 12:06:31 +00:00
Richard van der Hoff
d3c9c562c6
Debian packaging via dh_virtualenv
2018-12-20 11:35:23 +00:00
Richard van der Hoff
1a6d5bfa08
Debian packaging via dh_virtualenv ( #4285 )
2018-12-20 11:33:29 +00:00
Amber Brown
fd4070a85d
import from package-debian-synapse
2018-12-20 11:15:52 +00:00
David Baker
1c0051114a
Add 'sandbox' to CSP for media repo ( #4284 )
...
* Add 'sandbox' to the CSP for media repo
* Changelog
2018-12-20 11:09:18 +00:00
Richard van der Hoff
3b2ba2fbb8
Merge pull request #4309 from KB1RD/KB1RD-fixes
...
Fix the variable names used for account_data
2018-12-19 22:52:59 +01:00
Nathan Pennie
da8628ba2c
Create 4309.bugfix
2018-12-19 14:42:49 -05:00
Nathan Pennie
81b513416e
Fixed line length
2018-12-19 14:12:33 -05:00
Nathan Pennie
668e6625b0
Fix the variable names used for account_data
2018-12-19 06:53:02 -05:00
Erik Johnston
1dc7492ce5
Newsfile
2018-12-18 18:11:56 +00:00
Erik Johnston
df89f8afb8
Add v2 room version
2018-12-18 18:10:37 +00:00
Neil Johnson
7e22cd90f5
ensure can report mau stats when hs.config.mau_stats_only is set ( #4305 )
...
* ensure can report mau stats when hs.config.mau_stats_only is set
2018-12-18 14:36:11 +00:00
Neil Johnson
d2f7c4e6b1
create support user ( #4141 )
...
Allow for the creation of a support user.
A support user can access the server, join rooms, interact with other users, but does not appear in the user directory nor does it contribute to monthly active user limits.
2018-12-14 18:20:59 +00:00
Nad Chishtie
128294d3e5
Improved welcome page ( #4294 )
...
* Improved static/index.html look, feel and content.
* Added accessibility tags to in-line SVG.
* Grammar.
2018-12-14 05:13:56 +11:00
Amber Brown
c7144b105c
Settings Fix deleting e2e room keys on xenial ( #4295 )
2018-12-14 05:13:33 +11:00
Amber Brown
e93a0ebf50
Settings Fix deleting e2e room keys on xenial ( #4295 )
2018-12-14 05:10:31 +11:00
Nad Chishtie
cef8ae272a
Improved welcome page ( #4294 )
...
* Improved static/index.html look, feel and content.
* Added accessibility tags to in-line SVG.
* Grammar.
2018-12-14 02:42:51 +11:00
Richard van der Hoff
a83826ae99
Merge pull request #4274 from matrix-org/michaelkaye/update_kernel_dco_link
...
Update link to kernel.org DCO usage
2018-12-11 20:55:43 +01:00
Michael Kaye
5986a10f16
Update CONTRIBUTING.rst
...
Reduce size of hyperlink
2018-12-11 18:11:48 +00:00
Richard van der Hoff
f208f608cb
Merge branch 'release-v0.34.0' into develop
2018-12-11 15:43:20 +00:00
Richard van der Hoff
eb835bf65b
0.34.0rc2
2018-12-11 15:35:47 +00:00
Richard van der Hoff
03116da984
remove changelog files
2018-12-11 15:35:10 +00:00
Richard van der Hoff
188945713e
Merge pull request #4290 from matrix-org/rav/remove_webclient
...
Stop installing Matrix Console by default
2018-12-11 16:24:15 +01:00
Richard van der Hoff
95c1f6500b
Merge pull request #4289 from matrix-org/rav/welcome_page
...
Add a welcome page to the static resources
2018-12-11 16:24:06 +01:00
Richard van der Hoff
1e2b065112
Merge pull request #4291 from matrix-org/rav/disable_pager_in_ci
...
Disable pager for ci script
2018-12-11 16:23:49 +01:00
Richard van der Hoff
bd52978fd7
Merge branch 'rav/disable_pager_in_ci' into rav/welcome_page
2018-12-11 14:13:02 +00:00
Richard van der Hoff
2755a0d48a
Disable pager for ci script
...
... otherwise it hangs
2018-12-11 14:12:22 +00:00
Richard van der Hoff
f537432ef9
Add a welcome page to the static resources
...
This is largely a precursor for the removal of the bundled webclient. The idea
is to present a page at / which reassures people that something is working, and
to give them some links for next steps.
The welcome page lives at `/_matrix/static/`, so is enabled alongside the other
`static` resources (which, in practice, means the client API is enabled). We'll
redirect to it from `/` if we have nothing better to display there.
It would be nice to have a way to disable it (in the same way that you might
disable the nginx welcome page), but I can't really think of a good way to do
that without a load of ickiness.
It's based on the work done by @krombel for #2601 .
2018-12-11 13:26:22 +00:00
Richard van der Hoff
df96177ca7
Stop installing Matrix Console by default
...
This is based on the work done by @krombel in #2601 .
2018-12-11 13:20:33 +00:00
David Baker
89ac2a5bdb
Add 'sandbox' to CSP for media repo ( #4284 )
...
* Add 'sandbox' to the CSP for media repo
* Changelog
2018-12-11 04:05:02 +11:00
Will Hunt
989f1167af
Merge pull request #4279 from matrix-org/hs/fix-config-cors
...
Make /config more CORS-y
2018-12-10 15:24:03 +00:00
Erik Johnston
9b1c19e0c5
Merge pull request #4283 from matrix-org/erikj/isort_df
...
Make isort tox check print diff when it fails
2018-12-10 14:28:05 +00:00
Erik Johnston
74c3606c53
Newsfile
2018-12-10 14:15:43 +00:00
Erik Johnston
25219b7b4e
Make isort tox check print diff when it fails
2018-12-10 13:58:26 +00:00
Will Hunt
fee831c040
Move imports to one line
2018-12-10 13:52:33 +00:00
Will Hunt
466c1f3e01
Use send_cors
2018-12-10 13:11:37 +00:00
Will Hunt
91206e09f2
changelog & isort
2018-12-09 17:39:44 +00:00
Will Hunt
dbf736ba66
Make /config more CORS-y
2018-12-09 13:27:22 +00:00
Michael Kaye
912a843294
changelog
2018-12-07 17:50:52 +00:00
Michael Kaye
5a1c6f45be
Update link to kernel.org DCO usage
...
https://www.kernel.org/doc/Documentation/SubmittingPatches returns a simple page indicating that it's moved to: "process/submitting-patches.rst".
I believe the new link contains the same information as what was previously linked to.
2018-12-07 17:48:01 +00:00
Richard van der Hoff
30da50a5b8
Initialise user displayname from SAML2 data ( #4272 )
...
When we register a new user from SAML2 data, initialise their displayname
correctly.
2018-12-07 14:44:46 +01:00
Richard van der Hoff
35e13477cf
Update the example systemd config to use a virtualenv ( #4273 )
...
If you're installing as a system package, the system package should have set up
the systemd config, so it's more useful to give an example of running in a
virtualenv here.
2018-12-07 14:43:41 +01:00
Richard van der Hoff
c7401a697f
Implement SAML2 authentication ( #4267 )
...
This implements both a SAML2 metadata endpoint (at
`/_matrix/saml2/metadata.xml`), and a SAML2 response receiver (at
`/_matrix/saml2/authn_response`). If the SAML2 response matches what's been
configured, we complete the SSO login flow by redirecting to the client url
(aka `RelayState` in SAML2 jargon) with a login token.
What we don't yet have is anything to build a SAML2 request and redirect the
user to the identity provider. That is left as an exercise for the reader.
2018-12-07 13:11:11 +01:00
Richard van der Hoff
c588b9b9e4
Factor SSO success handling out of CAS login ( #4264 )
...
This is mostly factoring out the post-CAS-login code to somewhere we can reuse
it for other SSO flows, but it also fixes the userid mapping while we're at it.
2018-12-07 13:10:07 +01:00
rkfg
ae19a7db8c
Prevent crash on pagination.
2018-12-06 13:32:05 +03:00
Richard van der Hoff
b0c24a66ec
Rip out half-implemented m.login.saml2 support ( #4265 )
...
* Rip out half-implemented m.login.saml2 support
This was implemented in an odd way that left most of the work to the client, in
a way that I really didn't understand. It's going to be a pain to maintain, so
let's start by ripping it out.
* drop undocumented dependency on dateutil
It turns out we were relying on dateutil being pulled in transitively by
pysaml2. There's no need for that bloat.
2018-12-06 19:44:38 +11:00
Richard van der Hoff
9a3e24a13d
drop undocumented dependency on dateutil ( #4266 )
...
It turns out we were relying on dateutil being pulled in transitively by
pysaml2. There's no need for that bloat.
2018-12-06 04:52:42 +11:00
Richard van der Hoff
e8d98466b0
Implement .well-known handling ( #4262 )
...
Sometimes it's useful for synapse to generate its own .well-known file.
2018-12-05 14:38:58 +01:00
Richard van der Hoff
dece89d280
fix upgrade.rst link again
2018-12-04 14:01:27 +00:00
Richard van der Hoff
fe324cb184
Fix link to upgrade notes
2018-12-04 13:59:45 +00:00
Richard van der Hoff
5f00cfa40d
fix typo in changelog
2018-12-04 13:57:28 +00:00
Richard van der Hoff
e55983defe
Prepare 0.34.0rc1
2018-12-04 13:52:16 +00:00
Richard van der Hoff
a2ed0f287e
Merge pull request #4260 from matrix-org/rav/python3
...
Notes on upgrading to python3, and README updates.
2018-12-04 14:46:31 +01:00
Richard van der Hoff
956061732d
Merge pull request #4261 from matrix-org/rav/docker/remove_log_file
...
Remove obsolete settings from docker homeserver.yaml
2018-12-04 14:46:12 +01:00
Richard van der Hoff
75937e9033
Remove obsolete settings from docker homeserver.yaml
...
These aren't used, because we have a `log_config` setting.
2018-12-04 12:31:00 +00:00
Richard van der Hoff
4acd1a3549
Notes on upgrading to python3, and README updates.
2018-12-04 12:28:24 +00:00
Richard van der Hoff
b164241814
Merge pull request #4005 from matrix-org/michaelkaye/move_to_docker_label
...
Use labels to tag builds with their SHA1 version.
2018-12-04 13:14:35 +01:00
Travis Ralston
1737753a62
Add an option to enable recording IPs for appservice users ( #3831 )
2018-12-04 12:44:41 +01:00
Amber Brown
fd96dd75a3
Fix non-ASCII pushrules ( #4248 )
2018-12-04 12:44:02 +01:00
Richard van der Hoff
dd27e47b5c
Merge pull request #4210 from axelsimon/patch-1
...
Replace mentions of Vector with Riot
2018-12-04 12:08:07 +01:00
Travis Ralston
158ffb92f1
Add an option to disable search for homeservers which may not be interested in it ( #4230 )
...
This is useful for homeservers not intended for users, such as bot-only homeservers or ones that only process IoT data.
2018-12-04 12:01:02 +01:00
Aaron Raimist
512e94d230
Add note to UPGRADE.rst about removing riot.im from list of trusted identity servers ( #4224 )
...
* Add note to UPGRADE.rst about removing riot.im from list of trusted identity servers
Signed-off-by: Aaron Raimist <aaron@raim.ist >
* Add changelog
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2018-12-04 11:59:09 +01:00
Ben Parsons
b5ac0ffa0a
add more detail to logging regarding "More than one row matched" error ( #4234 )
2018-12-04 11:57:39 +01:00
Richard van der Hoff
ecc23188f4
Fix UnicodeDecodeError when postgres is not configured in english ( #4253 )
...
This is a bit of a half-assed effort at fixing https://github.com/matrix-org/synapse/issues/4252 . Fundamentally the right answer is to drop support for Python 2.
2018-12-04 11:55:52 +01:00
Richard van der Hoff
f144c0a210
Merge pull request #4244 from aaronraimist/drop-sent-txt
...
Drop sent_transactions
2018-12-04 11:41:28 +01:00
Richard van der Hoff
48972ce9d1
Patch defer.inlineCallbacks to check logcontexts in tests ( #4205 )
2018-12-04 11:30:32 +01:00
Richard van der Hoff
a077e710a3
Merge pull request #4250 from matrix-org/hawkowl/pusher-remove-py3
...
Fix removing pushers on python 3
2018-12-04 11:22:46 +01:00
Richard van der Hoff
a484735bb0
Merge pull request #4257 from aaronraimist/add-editorconfig
...
Add a basic .editorconfig
2018-12-04 11:10:02 +01:00
Richard van der Hoff
52e87fbfbe
Run the AS senders as background processes ( #4189 )
...
This should fix some "Starting db connection from sentinel context" warnings,
and will mean we get metrics for these processes.
2018-12-04 10:53:49 +01:00
Aaron Raimist
3518c28aa8
Add a basic .editorconfig
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2018-12-03 22:38:47 -06:00
Amber Brown
998ba41493
changelog
2018-12-03 22:28:12 +11:00
Amber Brown
d3c61ef906
fix type error
2018-12-03 22:27:41 +11:00
Richard van der Hoff
c03324294d
Workaround for non-ascii event ids ( #4241 )
...
It turns out that we accept events with non-ascii IDs, which would later cause
an explosion during state res.
Fixes #4226
2018-12-03 21:47:48 +11:00
Aaron Raimist
44dc4c365b
Add changelog
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2018-12-01 23:10:21 -06:00
Aaron Raimist
704c5298f0
Drop sent_transactions
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2018-12-01 23:07:35 -06:00
Neil Johnson
7039ece8fb
Neilj/fix autojoin ( #4223 )
...
* Fix auto join failures for servers that require user consent
* Fix auto join failures for servers that require user consent
2018-11-28 22:24:57 +11:00
Amber Brown
8ca53fb53e
Report combined coverage to codecov ( #4225 )
2018-11-28 20:59:31 +11:00
Neil Johnson
f9b136a886
Neilj/fix mau initial reserved users ( #4211 )
...
* fix transaction wrapping bug that caused get_user_id_by_threepid_txn to fail
* towncrier
* white space
2018-11-28 20:33:41 +11:00
Richard van der Hoff
944d524f18
Support m.login.sso ( #4220 )
...
* Clean up the CSS for the fallback login form
I was finding this hard to work with, so simplify a bunch of things. Each
flow is now a form inside a div of class login_flow.
The login_flow class now has a fixed width, as that looks much better than each
flow having a differnt width.
* Support m.login.sso
MSC1721 renames m.login.cas to m.login.sso. This implements the change
(retaining support for m.login.cas for older clients).
* changelog
2018-11-27 18:51:52 +11:00
Richard van der Hoff
a44c0a096f
Check logcontexts before and after each test ( #4190 )
...
* Add better diagnostics to flakey keyring test
* fix interpolation fail
* Check logcontexts before and after each test
* update changelog
* update changelog
2018-11-27 13:47:18 +11:00
Richard van der Hoff
80527b568d
Fix more logcontext leaks in tests ( #4209 )
2018-11-27 13:01:04 +11:00
Richard van der Hoff
de8772a655
Do a GC after each test to fix logcontext leaks ( #4227 )
...
* Some words about garbage collections and logcontexts
* Do a GC after each test to fix logcontext leaks
This feels like an awful hack, but...
* changelog
2018-11-27 13:00:33 +11:00
Amber Brown
e8690dec2e
Merge pull request #4214 from matrix-org/rav/ignore_pycache
...
Ignore __pycache__ directories in schema delta dir
2018-11-20 23:36:30 -06:00
Richard van der Hoff
6c18cc4b50
Ignore __pycache__ directories in schema delta dir
...
Now that we use py3, compiled python ends up in __pycache__ rather than *.pyc.
2018-11-20 22:52:34 +00:00
axel simon
455df4dda0
Replace mentions of Vector with Riot
...
https://github.com/vector-im/vector-web/issues/1977 --> https://github.com/vector-im/riot-web/issues/1977
And mention of Vector as a client replaced with Riot.
2018-11-20 16:57:54 +01:00
Neil Johnson
78ba0e7ab8
Remove riot.im from the list of trusted Identity Servers in the default configuration ( #4207 )
2018-11-20 12:29:25 +01:00
Richard van der Hoff
416c671474
Merge pull request #4204 from matrix-org/rav/logcontext_leak_fixes
...
Fix some logcontext leaks
2018-11-20 12:19:19 +01:00
Amber Brown
31425d82a3
Merge remote-tracking branch 'origin/master' into develop
2018-11-19 12:55:25 -06:00
Amber Brown
678ad155a2
Merge tag 'v0.33.9'
...
Features
--------
- Include flags to optionally add `m.login.terms` to the registration flow when consent tracking is enabled.
([\#4004](https://github.com/matrix-org/synapse/issues/4004 ), [\#4133](https://github.com/matrix-org/synapse/issues/4133 ),
[\#4142](https://github.com/matrix-org/synapse/issues/4142 ), [\#4184](https://github.com/matrix-org/synapse/issues/4184 ))
- Support for replacing rooms with new ones ([\#4091](https://github.com/matrix-org/synapse/issues/4091 ), [\#4099](https://github.com/matrix-org/synapse/issues/4099 ),
[\#4100](https://github.com/matrix-org/synapse/issues/4100 ), [\#4101](https://github.com/matrix-org/synapse/issues/4101 ))
Bugfixes
--------
- Fix exceptions when using the email mailer on Python 3. ([\#4095](https://github.com/matrix-org/synapse/issues/4095 ))
- Fix e2e key backup with more than 9 backup versions ([\#4113](https://github.com/matrix-org/synapse/issues/4113 ))
- Searches that request profile info now no longer fail with a 500. ([\#4122](https://github.com/matrix-org/synapse/issues/4122 ))
- fix return code of empty key backups ([\#4123](https://github.com/matrix-org/synapse/issues/4123 ))
- If the typing stream ID goes backwards (as on a worker when the master restarts), the worker's typing handler will no longer erroneously report rooms containing new
typing events. ([\#4127](https://github.com/matrix-org/synapse/issues/4127 ))
- Fix table lock of device_lists_remote_cache which could freeze the application ([\#4132](https://github.com/matrix-org/synapse/issues/4132 ))
- Fix exception when using state res v2 algorithm ([\#4135](https://github.com/matrix-org/synapse/issues/4135 ))
- Generating the user consent URI no longer fails on Python 3. ([\#4140](https://github.com/matrix-org/synapse/issues/4140 ),
[\#4163](https://github.com/matrix-org/synapse/issues/4163 ))
- Loading URL previews from the DB cache on Postgres will no longer cause Unicode type errors when responding to the request, and URL previews will no longer fail if
the remote server returns a Content-Type header with the chartype in quotes. ([\#4157](https://github.com/matrix-org/synapse/issues/4157 ))
- The hash_password script now works on Python 3. ([\#4161](https://github.com/matrix-org/synapse/issues/4161 ))
- Fix noop checks when updating device keys, reducing spurious device list update notifications. ([\#4164](https://github.com/matrix-org/synapse/issues/4164 ))
Deprecations and Removals
-------------------------
- The disused and un-specced identicon generator has been removed. ([\#4106](https://github.com/matrix-org/synapse/issues/4106 ))
- The obsolete and non-functional /pull federation endpoint has been removed. ([\#4118](https://github.com/matrix-org/synapse/issues/4118 ))
- The deprecated v1 key exchange endpoints have been removed. ([\#4119](https://github.com/matrix-org/synapse/issues/4119 ))
- Synapse will no longer fetch keys using the fallback deprecated v1 key exchange method and will now always use v2.
([\#4120](https://github.com/matrix-org/synapse/issues/4120 ))
Internal Changes
----------------
- Fix build of Docker image with docker-compose ([\#3778](https://github.com/matrix-org/synapse/issues/3778 ))
- Delete unreferenced state groups during history purge ([\#4006](https://github.com/matrix-org/synapse/issues/4006 ))
- The "Received rdata" log messages on workers is now logged at DEBUG, not INFO. ([\#4108](https://github.com/matrix-org/synapse/issues/4108 ))
- Reduce replication traffic for device lists ([\#4109](https://github.com/matrix-org/synapse/issues/4109 ))
- Fix `synapse_replication_tcp_protocol_*_commands` metric label to be full command name, rather than just the first character
([\#4110](https://github.com/matrix-org/synapse/issues/4110 ))
- Log some bits about room creation ([\#4121](https://github.com/matrix-org/synapse/issues/4121 ))
- Fix `tox` failure on old systems ([\#4124](https://github.com/matrix-org/synapse/issues/4124 ))
- Add STATE_V2_TEST room version ([\#4128](https://github.com/matrix-org/synapse/issues/4128 ))
- Clean up event accesses and tests ([\#4137](https://github.com/matrix-org/synapse/issues/4137 ))
- The default logging config will now set an explicit log file encoding of UTF-8. ([\#4138](https://github.com/matrix-org/synapse/issues/4138 ))
- Add helpers functions for getting prev and auth events of an event ([\#4139](https://github.com/matrix-org/synapse/issues/4139 ))
- Add some tests for the HTTP pusher. ([\#4149](https://github.com/matrix-org/synapse/issues/4149 ))
- add purge_history.sh and purge_remote_media.sh scripts to contrib/ ([\#4155](https://github.com/matrix-org/synapse/issues/4155 ))
- HTTP tests have been refactored to contain less boilerplate. ([\#4156](https://github.com/matrix-org/synapse/issues/4156 ))
- Drop incoming events from federation for unknown rooms ([\#4165](https://github.com/matrix-org/synapse/issues/4165 ))
2018-11-19 12:54:29 -06:00
Amber Brown
47e26f5a4d
towncrier
2018-11-19 12:43:14 -06:00
Amber Brown
d102e19e47
version
2018-11-19 12:42:49 -06:00
Amber Brown
80cac86b2c
Fix fallback auth on Python 3 ( #4197 )
2018-11-19 12:27:33 -06:00
Richard van der Hoff
0c05da2e2e
changelog
2018-11-19 17:07:42 +00:00
Richard van der Hoff
828f18bd8b
Fix logcontext leak in test_url_preview
2018-11-19 17:07:01 +00:00
Richard van der Hoff
a267c2e3ed
Fix logcontext leak in http pusher test
2018-11-19 17:07:01 +00:00
Richard van der Hoff
884a561447
Fix some tests which leaked logcontexts
2018-11-19 17:07:01 +00:00
Richard van der Hoff
f5faf6bc14
Fix logcontext leak in EmailPusher
2018-11-19 17:07:01 +00:00
Richard van der Hoff
10cdf519aa
Merge pull request #4182 from aaronraimist/update-issue-template
...
Add a pull request template and add multiple issue templates
2018-11-19 14:24:30 +01:00
Richard van der Hoff
65b793c5a1
Merge pull request #4200 from aaronraimist/vacuum-full-note
...
Add a note saying you need to manually reclaim disk space
2018-11-19 14:19:51 +01:00
Aaron Raimist
cc2cf2da97
Add changelog
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2018-11-18 12:42:08 -06:00
Aaron Raimist
f6cbef6332
Add a note saying you need to manually reclaim disk space
...
People keep asking why their database hasn't gotten smaller after using this API.
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2018-11-18 12:38:04 -06:00
Amber Brown
4285c818ec
Merge pull request #4193 from kivikakk/add-openbsd-prereq
...
add jpeg to OpenBSD prereq list
2018-11-17 14:27:53 -06:00
Ashe Connor
ceca3b2f30
add changelog.d entry
2018-11-17 15:01:02 +11:00
Ashe Connor
9548dd9586
add jpeg to OpenBSD prereq list
...
Signed-off-by: Ashe Connor <ashe@kivikakk.ee >
2018-11-17 14:57:20 +11:00
Travis Ralston
0bb273db07
Merge pull request #4192 from matrix-org/travis/fix-consent-urls
...
Remove duplicate slashes in generated consent URLs
2018-11-16 09:40:50 -07:00
Travis Ralston
3da9781c98
Fix the terms UI auth tests
...
By setting the config value directly, we skip the block that adds the slash automatically for us.
2018-11-15 23:00:28 -07:00
Travis Ralston
d75db3df59
Changelog
2018-11-15 20:44:57 -07:00
Travis Ralston
ab4526a153
Remove duplicate slashes in generated consent URLs
2018-11-15 20:41:53 -07:00
Amber Brown
8b1affe7d5
Fix Content-Disposition in media repository ( #4176 )
2018-11-15 15:55:58 -06:00
Travis Ralston
835779f7fb
Add option to track MAU stats (but not limit people) ( #3830 )
2018-11-15 18:08:27 +00:00
Amber Brown
df758e155d
Use <meta> tags to discover the per-page encoding of html previews ( #4183 )
2018-11-15 11:05:08 -06:00
Amber Brown
a51288e5d6
Add a coveragerc ( #4180 )
2018-11-15 10:50:08 -06:00
Neil Johnson
b5d92d4d46
Merge pull request #4188 from matrix-org/rav/readme-update-1
...
Update README for #1491 fix
2018-11-15 13:06:41 +00:00
Richard van der Hoff
4f8bb633c7
Update README for #1491 fix
2018-11-15 10:03:36 +00:00
Neil Johnson
bf648c37e7
release 0.33.9rc1
2018-11-14 11:45:52 +00:00
Richard van der Hoff
4b60c969d8
Merge pull request #4184 from matrix-org/rav/fix_public_consent
...
Fix an internal server error when viewing the public privacy policy
2018-11-14 11:32:43 +00:00
Richard van der Hoff
0c4dc6fd76
changelog
2018-11-14 10:48:08 +00:00
Richard van der Hoff
c1efcd7c6a
Add a test for the public T&Cs form
2018-11-14 10:46:27 +00:00
Richard van der Hoff
83a5f459aa
Fix an internal server error when viewing the public privacy policy
2018-11-14 10:21:07 +00:00
David Baker
0869566ad3
Merge pull request #4113 from matrix-org/dbkr/e2e_backup_versions_are_numbers
...
Make e2e backup versions numeric in the DB
2018-11-14 07:55:48 +00:00
Aaron Raimist
924c82ca16
Fix case
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2018-11-13 22:12:07 -06:00
Aaron Raimist
5d02704822
Add SUPPORT.md
...
https://help.github.com/articles/adding-support-resources-to-your-project/
2018-11-13 21:57:10 -06:00
Aaron Raimist
9ca1215582
Add changelog
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2018-11-13 21:46:48 -06:00
Aaron Raimist
d86826277d
Add a pull request template and add multiple issue templates
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2018-11-13 21:43:40 -06:00
David Baker
bca3b91c2d
Merge remote-tracking branch 'origin/develop' into dbkr/e2e_backup_versions_are_numbers
2018-11-09 18:35:02 +00:00
Erik Johnston
db5a1c059a
Merge pull request #4166 from matrix-org/erikj/drop_unknown_events
...
Drop incoming events from federation for unknown rooms
2018-11-09 17:59:34 +00:00
Erik Johnston
dc59ad5334
Remove hack to support rejoining rooms
2018-11-09 14:58:09 +00:00
David Baker
d44dea0223
pep8
2018-11-09 14:38:31 +00:00
David Baker
4f93abd62d
add docs
2018-11-09 13:25:38 +00:00
Erik Johnston
30dd27afff
Simplify to always drop events if server isn't in the room
2018-11-09 11:36:45 +00:00
Richard van der Hoff
3cecf5340d
Update synapse/federation/federation_server.py
...
Co-Authored-By: erikjohnston <erikj@jki.re >
2018-11-09 11:28:25 +00:00
Richard van der Hoff
9bce065a53
Update synapse/federation/federation_server.py
...
Co-Authored-By: erikjohnston <erikj@jki.re >
2018-11-09 11:28:22 +00:00
David Baker
d3fa6194f7
Remove unnecessary str()
2018-11-09 11:11:31 +00:00
Brendan Abolivier
0f3f0a64bf
Merge pull request #4168 from matrix-org/babolivier/federation-client-content-type
...
Add a Content-Type header on POST requests to the federation client script
2018-11-09 11:00:55 +00:00
Brendan Abolivier
91d96759c9
Add a Content-Type header on POST requests to the federation client
2018-11-09 10:41:34 +00:00
Erik Johnston
7b22421a7b
Merge pull request #4164 from matrix-org/erikj/fix_device_comparison
...
Fix noop checks when updating device keys
2018-11-08 14:37:20 +00:00
Erik Johnston
abaa93c158
Add test to assert set_e2e_device_keys correctly returns False on no-op
2018-11-08 14:06:44 +00:00
Richard van der Hoff
c70809a275
Merge pull request #4163 from matrix-org/rav/fix_consent_on_py3
...
Fix encoding error for consent form on python3
2018-11-08 12:48:51 +00:00
Erik Johnston
5ebed18692
Lets convert bytes to unicode instead
2018-11-08 12:33:13 +00:00
Erik Johnston
94896d7ffe
Newsfile
2018-11-08 12:30:25 +00:00
Erik Johnston
06c3d8050f
Newsfile
2018-11-08 12:18:41 +00:00
Erik Johnston
b1a22b24ab
Fix noop checks when updating device keys
...
Clients often reupload their device keys (for some reason) so its
important for the server to check for no-ops before sending out device
list update notifications.
The check is broken in python 3 due to the fact comparing bytes and
unicode always fails, and that we write bytes to the DB but get unicode
when we read.
2018-11-08 12:18:38 +00:00
Erik Johnston
9417986f77
Drop PDUs of unknown rooms
...
When we receive events over federation we will need to know the room
version to be able to correctly handle them, e.g. once we start changing
event formats. Currently, we attempt to handle events in unknown rooms.
2018-11-08 12:11:20 +00:00
Richard van der Hoff
0a1fc52971
fix parse_string docstring
2018-11-08 11:12:29 +00:00
Richard van der Hoff
de6223836e
changelog
2018-11-08 11:06:28 +00:00
hera
2b075fb03a
Fix encoding error for consent form on python3
...
The form was rendering this as "b'01234....'".
-- richvdh
2018-11-08 11:05:39 +00:00
Amber Brown
264cb14402
Port hash_password to Python 3 ( #4161 )
...
* port hash_password
* changelog
2018-11-08 04:57:28 +11:00
Amber Brown
b3708830b8
Fix URL preview bugs (type error when loading cache from db, content-type including quotes) ( #4157 )
2018-11-08 01:37:43 +11:00
Richard van der Hoff
c8ba79327b
Merge pull request #4155 from rubo77/purge-api
...
add purge_history.sh and purge_remote_media.sh scripts
2018-11-07 14:06:41 +00:00
rubo77
2904d133f3
add purge_history.sh and purge_remote_media.sh scripts to contrib/purge_api/
...
Signed-off-by: Ruben Barkow <github@r.z11.de >
2018-11-07 14:02:41 +01:00
Amber Brown
e62f7f17b3
Remove some boilerplate in tests ( #4156 )
2018-11-07 03:00:00 +11:00
Travis Ralston
0f5e51f726
Add config variables for enabling terms auth and the policy name ( #4142 )
...
So people can still collect consent the old way if they want to.
2018-11-06 10:32:34 +00:00
Hubert Chathi
f1087106cf
handle empty backups according to latest spec proposal ( #4123 )
...
fixes #4056
2018-11-05 17:59:29 -05:00
Amber Brown
efdcbbe46b
Tests for user consent resource ( #4140 )
2018-11-06 05:53:44 +11:00
Amber Brown
5a63589e80
Add some tests for the HTTP pusher ( #4149 )
2018-11-06 05:53:24 +11:00
Erik Johnston
bc80b3f454
Add helpers for getting prev and auth events ( #4139 )
...
* Add helpers for getting prev and auth events
This is in preparation for allowing the event format to change between
room versions.
2018-11-06 00:35:15 +11:00
Amber Brown
0467384d2f
Set the encoding to UTF8 in the default logconfig ( #4138 )
2018-11-03 02:28:07 +11:00
Erik Johnston
90d713b8c6
Merge pull request #4137 from matrix-org/erikj/clean_up_events
...
Clean up event accesses and tests
2018-11-02 14:12:49 +00:00
Erik Johnston
76cd7de108
Newsfile
2018-11-02 13:45:56 +00:00
Erik Johnston
b86d05a279
Clean up event accesses and tests
...
This is in preparation to refactor FrozenEvent to support different
event formats for different room versions
2018-11-02 13:44:14 +00:00
Amber Brown
cb7a6b2379
Fix typing being reset causing infinite syncs ( #4127 )
2018-11-03 00:19:23 +11:00
Richard van der Hoff
efb9343c8c
Merge pull request #4132 from matrix-org/rav/fix_device_list_locking
...
Fix locked upsert on device_lists_remote_cache
2018-11-02 10:50:53 +00:00
Richard van der Hoff
00f12e00f8
Merge pull request #4133 from matrix-org/travis/fix-terms-auth
...
Fix logic error that prevented guests from seeing the privacy policy
2018-11-02 10:50:43 +00:00
Erik Johnston
b199534518
Merge pull request #4135 from matrix-org/erikj/fix_state_res_none
...
Fix None exception in state res v2
2018-11-02 10:45:57 +00:00
Richard van der Hoff
1cc6671ec4
changelog
2018-11-02 10:36:13 +00:00
Richard van der Hoff
350f654e7b
Add unique indexes to a couple of tables
...
The indexes on device_lists_remote_extremeties can be unique, and they
therefore should, to ensure that the db remains consistent.
2018-11-02 10:36:13 +00:00
Richard van der Hoff
50e328d1e7
Remove redundant database locks for device list updates
...
We can rely on the application-level per-user linearizer.
2018-11-02 10:36:13 +00:00
Erik Johnston
f05d97e283
Newsfile
2018-11-02 10:32:06 +00:00
Erik Johnston
54aec35867
Fix None exception in state res v2
2018-11-02 10:29:19 +00:00
Travis Ralston
552f090f62
Changelog
2018-11-01 16:51:11 -06:00
Travis Ralston
642505abc3
Fix logic error that prevented guests from seeing the privacy policy
2018-11-01 16:48:32 -06:00
Richard van der Hoff
3149d55b7d
Merge pull request #3778 from z3ntu/patch-1
...
Fix build of Docker image with docker-compose
2018-11-01 17:34:56 +00:00
Travis Ralston
c68aab1536
Merge pull request #4004 from matrix-org/travis/login-terms
...
Add m.login.terms to the registration flow
2018-11-01 11:03:38 -06:00
Erik Johnston
1b21e771d0
Merge pull request #4128 from matrix-org/erikj/state_res_v2_version
...
Add STATE_V2_TEST room version
2018-11-01 13:17:57 +00:00
Erik Johnston
62d683161e
Newsfile
2018-11-01 11:44:44 +00:00
Erik Johnston
b3dd6fa981
Add STATE_V2_TEST room version
2018-11-01 11:43:46 +00:00
Amber Brown
073d400b84
Merge branch 'master' into develop
2018-11-01 21:32:12 +11:00
Amber Brown
907e6da5be
Merge branch 'release-v0.33.8'
2018-11-01 21:31:46 +11:00
Amber Brown
d0ebe82871
changelog
2018-11-01 21:29:11 +11:00
Amber Brown
aa98e38896
version
2018-11-01 21:28:35 +11:00
Travis Ralston
a8c9faa9a2
The tests also need a version parameter
2018-10-31 13:28:08 -06:00
Travis Ralston
a8d41c6aff
Include a version query string arg for the consent route
2018-10-31 13:19:28 -06:00
Travis Ralston
d1e7b9c44c
Merge branch 'develop' into travis/login-terms
2018-10-31 13:15:14 -06:00
Richard van der Hoff
1729ba1650
Merge pull request #4101 from matrix-org/rav/aliases_for_upgrades
...
Attempt to move room aliases on room upgrades
2018-10-31 17:52:18 +00:00
Richard van der Hoff
4ecb8b7de8
Merge pull request #4125 from MazeChaZer/fix-typo-in-docker-compose
...
Fix typo in docker-compose.yml
2018-10-31 15:55:01 +00:00
Richard van der Hoff
0f8591a5a8
Avoid else clause on exception for clarity
2018-10-31 15:43:57 +00:00
Richard van der Hoff
94c7fadc98
Attempt to move room aliases on room upgrades
2018-10-31 15:43:57 +00:00
Richard van der Hoff
9b827c40ca
Log some bits about event creation ( #4121 )
...
I found these helpful in debugging my room upgrade tests.
2018-10-31 15:42:23 +00:00
Richard van der Hoff
60f128a401
Merge pull request #4124 from matrix-org/rav/fix_tox
...
Attempt to fix tox installs
2018-10-31 15:41:55 +00:00
Jonas Schürmann
e3758c8c92
Fix typo in docker-compose.yml
...
Signed-off-by: Jonas Schürmann <jonasschuermann@aol.de >
2018-10-31 15:46:47 +01:00
Amber Brown
916efc8249
Remove fetching keys via the deprecated v1 kex method ( #4120 )
2018-10-31 23:14:39 +11:00
Amber Brown
f79f454485
Remove deprecated v1 key exchange endpoint ( #4119 )
2018-10-31 22:29:02 +11:00
Richard van der Hoff
a2d8bff0dc
changelog
2018-10-30 21:21:05 +00:00
Richard van der Hoff
0f6ec6d1ae
Attempt to fix tox installs
...
It seems that, at some point, the ability to run tox on old servers (with old
setuptools) got broken - and it was only working on our Jenkins instance by
dint of reusing the tox environments.
Let's try to get tox to do the right thing, and remove the guff from
jenkins/prepare_synapse.sh.
(There is a separate question about whether the jenkins builds should be using
tox to prepare the virtualenv at all here, but that is somewhat orthogonal).
2018-10-30 21:00:31 +00:00
Amber Brown
e615e95590
changelog
2018-10-31 06:28:11 +11:00
Amber Brown
67c1924899
version bump
2018-10-31 06:27:05 +11:00
Amber Brown
086e1a8f3e
Fix search 500ing ( #4122 )
2018-10-31 06:26:46 +11:00
Amber Brown
3bade14ec0
Fix search 500ing ( #4122 )
2018-10-31 04:33:41 +11:00
Amber Brown
2e223a8c22
Remove the unused /pull federation API ( #4118 )
2018-10-31 04:24:59 +11:00
Erik Johnston
0794504bce
Merge pull request #4006 from matrix-org/erikj/purge_state_groups
...
Delete unreferenced state groups during purge
2018-10-30 16:58:22 +00:00
Amber Brown
0dce9e1379
Write some tests for the email pusher ( #4095 )
2018-10-30 23:55:43 +11:00
David Baker
e0934acdbb
Cast to int here too
2018-10-30 11:12:23 +00:00
David Baker
12941f5f8b
Cast bacjup version to int when querying
2018-10-30 11:01:07 +00:00
David Baker
2f0f911c52
Convert version back to a string
2018-10-30 10:35:18 +00:00
David Baker
4eacf0f200
news fragment
2018-10-30 10:05:51 +00:00
David Baker
64fa557f80
Try & make it work on postgres
2018-10-30 09:51:04 +00:00
David Baker
563f9b61b1
Make e2e backup versions numeric in the DB
...
We were doing max(version) which does not do what we wanted
on a column of type TEXT.
2018-10-29 21:01:22 +00:00
Erik Johnston
169851b412
Merge pull request #4109 from matrix-org/erikj/repl_devices
...
A couple of replication fixes for device lists
2018-10-29 18:16:48 +00:00
Erik Johnston
00fdfbc213
Merge pull request #4111 from matrix-org/erikj/repl_names
...
Erikj/repl names
2018-10-29 18:16:03 +00:00
Erik Johnston
4f0fa7a120
Newsfile
2018-10-29 18:15:42 +00:00
Erik Johnston
39f419868f
Newsfile
2018-10-29 17:38:09 +00:00
Erik Johnston
88e5ffe6fe
Deduplicate device updates sent over replication
...
We currently send several kHz of device list updates over replication
occisonally, which often causes the replications streams to lag and then
get dropped.
A lot of those updates will actually be duplicates, since we don't send
e.g. device_ids across replication, so let's deduplicate it when we pull
them out of the database.
2018-10-29 17:34:34 +00:00
Erik Johnston
a163b748a5
Don't truncate command name in metrics
2018-10-29 17:34:21 +00:00
Erik Johnston
ad88460e0d
Move _find_unreferenced_groups
2018-10-29 14:24:19 +00:00
Erik Johnston
664b192a3b
Fix set operations thinko
2018-10-29 14:21:43 +00:00
Erik Johnston
f4f223aa44
Don't make temporary list
2018-10-29 14:01:49 +00:00
Erik Johnston
b2399f6281
Make SQL a bit cleaner
2018-10-29 14:01:11 +00:00
Amber Brown
4cd1c9f2ff
Delete the disused & unspecced identicon functionality ( #4106 )
2018-10-29 23:57:24 +11:00
Richard van der Hoff
7fbfea062e
Merge pull request #4100 from matrix-org/rav/room_upgrade_avatar
...
Remember to copy the avatar on room upgrades
2018-10-29 12:49:21 +00:00
Richard van der Hoff
56ca578f77
Merge pull request #4099 from matrix-org/rav/upgrade_odd_pls
...
Better handling of odd PLs during room upgrades
2018-10-29 12:48:51 +00:00
Richard van der Hoff
bf33eed609
Merge pull request #4091 from matrix-org/rav/room_version_upgrades
...
Room version upgrade support
2018-10-29 12:47:20 +00:00
Amber Brown
c4b3698a80
Make the replication logger quieter ( #4108 )
2018-10-29 22:59:44 +11:00
Amber Brown
3b0a85fc8e
changelog
2018-10-29 21:54:01 +11:00
Amber Brown
2b791865c4
version bump
2018-10-29 21:52:52 +11:00
Richard van der Hoff
db24d7f15e
Better handling of odd PLs during room upgrades
...
Fixes handling of rooms where we have permission to send the tombstone, but not
other state. We need to (a) fail more gracefully when we can't send the PLs in
the old room, and (b) not set the PLs in the new room until we are done with
the other stuff.
2018-10-27 00:54:26 +01:00
Richard van der Hoff
5caf79b312
Remember to copy the avatar on room upgrades
2018-10-26 23:56:40 +01:00
Richard van der Hoff
54bbe71867
optimise state copying
2018-10-26 22:51:34 +01:00
Richard van der Hoff
193cadc988
Address review comments
...
Improve comments, get old room state from the context we already have
2018-10-26 17:10:30 +01:00
Erik Johnston
03e634dad4
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/purge_state_groups
2018-10-26 16:22:45 +01:00
Amber Brown
77d70a7646
Port register_new_matrix_user to Python 3 and add tests ( #4085 )
2018-10-26 22:05:22 +11:00
Richard van der Hoff
474810d9d5
fix broken test
...
This test stubbed out some stuff in a very weird way. I have no idea why. It broke.
2018-10-25 23:15:03 +01:00
Richard van der Hoff
6cb2e2448a
Merge pull request #4089 from dekonnection/master
...
Make Docker image listen on ipv6 as well as ipv4
2018-10-25 19:23:37 +01:00
Richard van der Hoff
68c0ce62d8
changelog
2018-10-25 19:18:25 +01:00
Richard van der Hoff
e6babc27d5
restrict PLs in old room
2018-10-25 19:18:25 +01:00
Richard van der Hoff
3a263bf3ae
copy state
2018-10-25 19:18:25 +01:00
Richard van der Hoff
1b9f253e20
preserve PLs
2018-10-25 19:10:24 +01:00
Richard van der Hoff
4cda300058
preserve room visibility
2018-10-25 19:10:24 +01:00
Richard van der Hoff
0f7d1c9906
Basic initial support for room upgrades
...
Currently just creates a new, empty, room, and sends a tombstone in the old
room.
2018-10-25 19:10:24 +01:00
Richard van der Hoff
e1948175ee
Allow power_level_content_override=None for _send_events_for_new_room
2018-10-25 19:10:24 +01:00
Richard van der Hoff
7f7b2cd3de
Make room_member_handler a member of RoomCreationHandler
...
... to save passing it into `_send_events_for_new_room`
2018-10-25 19:10:18 +01:00
Cédric Laudrel
379376e5e6
Make Docker image listening on ipv6 as well as ipv4
...
Signed-off-by: Cédric Laudrel <dek@iono.me >
2018-10-25 20:03:47 +02:00
Richard van der Hoff
871c4abfec
Factor _generate_room_id out of create_room
...
we're going to need this for room upgrades.
2018-10-25 18:23:09 +01:00
Erik Johnston
cb53ce9d64
Refactor state group lookup to reduce DB hits ( #4011 )
...
Currently when fetching state groups from the data store we make two
hits two the database: once for members and once for non-members (unless
request is filtered to one or the other). This adds needless load to the
datbase, so this PR refactors the lookup to make only a single database
hit.
2018-10-25 17:49:55 +01:00
Richard van der Hoff
e5da60d75d
Merge remote-tracking branch 'origin/master' into develop
2018-10-25 17:08:09 +01:00
Erik Johnston
c85e063302
Merge pull request #4051 from matrix-org/erikj/alias_disallow_list
...
Add config option to control alias creation
2018-10-25 17:04:59 +01:00
Neil Johnson
95ad128851
Merge pull request #4081 from matrix-org/neilj/fix_mau_init
...
fix race condiftion in calling initialise_reserved_users
2018-10-25 16:33:40 +01:00
Neil Johnson
fcbd488e9a
add new line
2018-10-25 16:13:43 +01:00
Erik Johnston
b94a43d5b5
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/alias_disallow_list
2018-10-25 15:25:31 +01:00
Erik Johnston
e5481b22aa
Use allow/deny
2018-10-25 15:25:21 +01:00
Neil Johnson
c99b6c66bf
Merge pull request #3975 from matrix-org/matthew/autocreate_autojoin
...
Autocreate autojoin rooms
2018-10-25 15:00:40 +01:00
Neil Johnson
f8fe98812b
improve comments
2018-10-25 14:58:59 +01:00
Neil Johnson
f7f487e14c
Merge branch 'develop' of github.com:matrix-org/synapse into matthew/autocreate_autojoin
2018-10-25 14:40:06 +01:00
Richard van der Hoff
edd2d82809
oops, run the check_isort build
2018-10-25 01:06:39 +01:00
Richard van der Hoff
46f98a6a29
Only cache the wheels
2018-10-25 01:00:58 +01:00
Richard van der Hoff
fc33e81323
Combine the pep8 and check_isort builds into one
...
there's really no point spinning up two separate jobs for these.
2018-10-25 00:59:49 +01:00
Richard van der Hoff
77d3b5772f
disable coverage checking
...
I don't think we ever use this, and it slows things down. If we want to use it,
we should just do so on a couple of builds rather than all of them.
2018-10-25 00:36:00 +01:00
Travis Ralston
a5468eaadf
pep8
2018-10-24 13:54:38 -06:00
Travis Ralston
81880beff4
It helps to import things
2018-10-24 13:32:13 -06:00
Travis Ralston
4acb6fe8a3
Move test to where the other integration tests are
2018-10-24 13:24:24 -06:00
Travis Ralston
9283987f7e
Fix test
...
Debug tests
Try printing the channel
fix
Import and use six
Remove debugging
Disable captcha
Add some mocks
Define the URL
Fix the clock?
Less rendering?
use the other render
Complete the dummy auth stage
Fix last stage of the test
Remove mocks we don't need
2018-10-24 13:23:08 -06:00
Travis Ralston
54def42c19
Merge branch 'develop' into travis/login-terms
2018-10-24 13:22:59 -06:00
Neil Johnson
ea69a84bbb
fix style inconsistencies
2018-10-24 17:18:08 +01:00
Neil Johnson
663d9db8e7
commit transaction before closing
2018-10-24 17:17:30 +01:00
Neil Johnson
07126e43a4
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/fix_mau_init
2018-10-24 16:25:39 +01:00
Neil Johnson
9ec2186586
isort
2018-10-24 16:09:21 +01:00
Neil Johnson
9532caf6ef
remove trailing whiter space
2018-10-24 16:08:25 +01:00
Richard van der Hoff
83d9ca7122
only fetch develop for check-newsfragments
2018-10-24 15:32:18 +01:00
Richard van der Hoff
480d98c91f
Disable newsfragment checks on branch builds
2018-10-24 15:31:00 +01:00
Richard van der Hoff
ab96ee29c9
reduce git clone depth
2018-10-24 15:30:54 +01:00
Richard van der Hoff
0f4fb537ce
fix branch regexp
2018-10-24 15:09:05 +01:00
Richard van der Hoff
3e438bfec8
also build on release branches
2018-10-24 15:04:55 +01:00
Richard van der Hoff
56a05583ae
Disable travis-ci branch builds for most branches
...
(We really don't need to kick off 10 builds for the branch as well as 10 for
the PR)
2018-10-24 14:43:55 +01:00
Richard van der Hoff
94a49e0636
fix tuple
...
Co-Authored-By: neilisfragile <neil@matrix.org >
2018-10-24 14:39:23 +01:00
Richard van der Hoff
9f72c209ee
Update changelog.d/3975.feature
...
Co-Authored-By: neilisfragile <neil@matrix.org >
2018-10-24 14:37:36 +01:00
Richard van der Hoff
78e8d4c3a5
Merge pull request #4083 from matrix-org/rav/fix_event_filter_validation
...
Allow backslashes in event field filters
2018-10-24 12:05:19 +01:00
Richard van der Hoff
3ad359e5be
Merge remote-tracking branch 'origin/develop' into rav/fix_event_filter_validation
2018-10-24 11:23:49 +01:00
Richard van der Hoff
7328039117
Merge pull request #4082 from matrix-org/rav/fix_pep8
...
Fix a number of flake8 errors
2018-10-24 11:23:35 +01:00
Erik Johnston
3904cbf307
Merge pull request #4040 from matrix-org/erikj/states_res_v2_rebase
...
Add v2 state resolution algorithm
2018-10-24 11:12:12 +01:00
Richard van der Hoff
7e07d25ed6
Allow backslashes in event field filters
...
Fixes a bug introduced in https://github.com/matrix-org/synapse/pull/1783 which
meant that single backslashes were not allowed in event field filters.
The intention here is to allow single-backslashes, but disallow
double-backslashes.
2018-10-24 11:11:24 +01:00
Richard van der Hoff
ef771cc4c2
Fix a number of flake8 errors
...
Broadly three things here:
* disable W504 which seems a bit whacko
* remove a bunch of `as e` expressions from exception handlers that don't use
them
* use `r""` for strings which include backslashes
Also, we don't use pep8 any more, so we can get rid of the duplicate config
there.
2018-10-24 10:39:03 +01:00
Erik Johnston
b313b9b009
isort
2018-10-24 10:02:41 +01:00
Erik Johnston
47a9ba435d
Use match rather than search
2018-10-24 09:54:57 +01:00
Richard van der Hoff
e0b9d5f0af
Merge pull request #4075 from matrix-org/rav/fix_pusher_logcontexts
...
Clean up the way logcontexts and threads work in the pushers
2018-10-24 09:53:57 +01:00
Erik Johnston
dacbeb2e03
Comment
2018-10-24 09:47:49 +01:00
Erik Johnston
810715f79a
Rename resolve_events_with_factory
2018-10-24 09:44:22 +01:00
Erik Johnston
cb23aa4c42
Merge pull request #4063 from matrix-org/erikj/cleaup_alias_creation
...
Clean up room alias creation
2018-10-24 09:40:27 +01:00
Richard van der Hoff
c573794b22
Fix start_pushers vs _start_pushers confusion
2018-10-24 09:24:55 +01:00
Richard van der Hoff
e564306e31
sanity-check the is_processing flag
...
... and rename it, for even more sanity
2018-10-24 09:23:33 +01:00
Neil Johnson
a67d8ace9b
remove errant exception and style
2018-10-23 17:44:39 +01:00
Travis Ralston
43c3f0b02f
Merge pull request #3969 from turt2live/travis/fix-federated-group-requests
...
Handle HttpResponseException more safely for federated groups
2018-10-23 10:41:04 -06:00
Travis Ralston
3e704822be
Comments help
2018-10-23 10:25:31 -06:00
Neil Johnson
329d18b39c
remove white space
2018-10-23 15:27:20 +01:00
Neil Johnson
6105c6101f
fix race condiftion in calling initialise_reserved_users
2018-10-23 15:24:58 +01:00
Richard van der Hoff
b3f6dddad2
Give some more things logcontexts ( #4077 )
2018-10-23 14:29:17 +01:00
Richard van der Hoff
5c445114d3
Correctly account for cpu usage by background threads ( #4074 )
...
Wrap calls to deferToThread() in a thing which uses a child logcontext to
attribute CPU usage to the right request.
While we're in the area, remove the logcontext_tracer stuff, which is never
used, and afaik doesn't work.
Fixes #4064
2018-10-23 13:12:32 +01:00
Richard van der Hoff
1fe6bbb555
Merge pull request #3698 from spantaleev/add-matrix-docker-ansible-deploy
...
Add information about the matrix-docker-ansible-deploy playbook
2018-10-23 10:11:58 +01:00
Richard van der Hoff
047ac0cbba
Merge pull request #4072 from steamp0rt/patch-1
...
Add Caddy example to README
2018-10-23 09:39:55 +01:00
Richard van der Hoff
6340141300
README.rst: fix minor grammar
2018-10-22 16:17:27 +01:00
Richard van der Hoff
abd9914683
Changelog
2018-10-22 16:12:11 +01:00
Richard van der Hoff
026cd91ac8
Run PusherPool.start as a background process
...
We don't do anything with the result, so this is needed to give this code a
logcontext.
2018-10-22 16:12:11 +01:00
Richard van der Hoff
f749607c91
Make on_started synchronous too
...
This brings it into line with on_new_notifications and on_new_receipts. It
requires a little bit of hoop-jumping in EmailPusher to load the throttle
params before the first loop.
2018-10-22 16:12:11 +01:00
Richard van der Hoff
e7a16c6210
Remove redundant run_as_background_process() from pusherpool
...
`on_new_notifications` and `on_new_receipts` in `HttpPusher` and `EmailPusher`
now always return synchronously, so we can remove the `defer.gatherResults` on
their results, and the `run_as_background_process` wrappers can be removed too
because the PusherPool methods will now complete quickly enough.
2018-10-22 16:12:11 +01:00
Richard van der Hoff
c7273c11bc
Give pushers their own background logcontext
...
Each pusher has its own loop which runs for as long as it has work to do. This
should run in its own background thread with its own logcontext, as other
similar loops elsewhere in the system do - which means that CPU usage is
consistently attributed to that loop, rather than to whatever request happened
to start the loop.
2018-10-22 16:12:11 +01:00
Richard van der Hoff
5110f4e425
move get_all_pushers call down
...
simplifies the interface to _start_pushers
2018-10-22 16:12:11 +01:00
Richard van der Hoff
04277d0ed8
Factor PusherPool._start_pusher out of _start_pushers
...
... and use it from start_pusher_by_id. This mostly simplifies
start_pusher_by_id.
2018-10-22 16:12:11 +01:00
Richard van der Hoff
3e8b02c939
Rename _refresh_pusher
...
This is public (or at least, called from outside the class), so ought to have a
better name.
2018-10-22 16:12:11 +01:00
Richard van der Hoff
7aea00069c
Merge pull request #4076 from matrix-org/rav/fix_init_logcontexts
...
Run MAU queries as background processes
2018-10-22 14:46:59 +01:00
Richard van der Hoff
911db96658
Merge pull request #4073 from matrix-org/rav/require_psutil
...
Make psutil an explicit dependency
2018-10-22 12:33:21 +01:00
Matthew Hodgson
058934b1cf
uh, Matrix is called Matrix these days...
2018-10-21 12:18:30 +01:00
Richard van der Hoff
a6f421e812
Run MAU queries as background processes
...
Fixes #3820
2018-10-20 02:14:35 +01:00
Amber Brown
e1728dfcbe
Make scripts/ and scripts-dev/ pass pyflakes (and the rest of the codebase on py3) ( #4068 )
2018-10-20 11:16:55 +11:00
steamport
5c3d6ea9c7
Whoops!
2018-10-19 22:00:27 +00:00
steamport
3f357583ce
I HATE RST
2018-10-19 21:59:39 +00:00
steamport
9c2f99a3b7
Fix
2018-10-19 21:59:14 +00:00
steamport
08760b0d9a
Fix formatting.
2018-10-19 21:57:28 +00:00
steamport
b85fe45f46
Add CL
2018-10-19 21:55:38 +00:00
Richard van der Hoff
e5b52d0f94
Make psutil an explicit dependency
...
As of #4027 , we require psutil to be installed, so it should be in our
dependency list. We can also remove some of the conditional import code
introduced by #992 .
Fixes #4062 .
2018-10-19 21:51:15 +01:00
Richard van der Hoff
81d4f51524
Merge branch 'rav/fix_email_templates_4065' into develop
2018-10-19 21:37:32 +01:00
Richard van der Hoff
593389a077
Remove notes on fallback for email_templates
...
This fallback didn't work, and was removed in #4069 .
2018-10-19 21:35:57 +01:00
steamport
eba48c0f16
Add Caddy example to README
2018-10-19 19:58:28 +00:00
Richard van der Hoff
f62c597d14
Merge pull request #4069 from matrix-org/rav/fix_email_templates_4065
...
Calculate absolute path for email templates
2018-10-19 16:33:54 +01:00
Erik Johnston
67f7b9cb50
pep8
2018-10-19 16:06:59 +01:00
Erik Johnston
056f099126
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/purge_state_groups
2018-10-19 15:48:59 +01:00
Erik Johnston
47a9da28ca
Batch process handling state groups
2018-10-19 15:48:15 +01:00
Richard van der Hoff
cc325c7069
Calculate absolute path for email templates
2018-10-19 14:01:59 +01:00
Amber Brown
e404ba9aac
Fix manhole on py3 (pt 2) ( #4067 )
2018-10-19 22:26:00 +11:00
Amber Brown
b69216f768
Make the metrics less racy ( #4061 )
2018-10-19 21:45:45 +11:00
Richard van der Hoff
6a4d01ee94
Merge pull request #4060 from matrix-org/hawkowl/ssh-key-py3
...
Make manhole work on Python 3 again
2018-10-19 10:23:44 +01:00
Erik Johnston
3c580c2b47
Add tests for alias creation rules
2018-10-19 10:22:45 +01:00
Erik Johnston
1b4bf232b9
Add tests for config generation
2018-10-19 10:22:45 +01:00
Erik Johnston
9fafdfa97d
Anchor returned regex to start and end of string
2018-10-19 10:22:45 +01:00
Erik Johnston
f9d6c677ea
Newsfile
2018-10-19 10:22:45 +01:00
Erik Johnston
084046456e
Add config option to control alias creation
2018-10-19 10:22:45 +01:00
Erik Johnston
0d31109ed5
Newsfile
2018-10-19 10:14:29 +01:00
Erik Johnston
74e7617083
Clean up room alias creation
2018-10-19 10:11:56 +01:00
Amber Brown
1d17fc52ae
changelog
2018-10-19 09:27:10 +11:00
Amber Brown
a36b0ec195
make a bytestring
2018-10-19 09:24:00 +11:00
Amber Brown
6190abe8da
Merge pull request #4057 from matrix-org/rav/use_correct_python
...
Use the right python when starting workers
2018-10-19 09:09:08 +11:00
Richard van der Hoff
c69026a758
Use the right python when starting workers
...
We should use the same python to start the workers as we do for the main
synapse (ie, the same one used to run synctl.)
2018-10-18 21:06:30 +01:00
Travis Ralston
dba84fa69c
Fix terms UI auth test
2018-10-18 12:45:21 -06:00
Travis Ralston
88c5ffec33
Test for terms UI auth
2018-10-18 12:35:30 -06:00
Richard van der Hoff
2baebace6a
Merge branch 'master' into develop
2018-10-18 17:29:57 +01:00
Richard van der Hoff
c00f4d237b
Add warnings about the upgrade to 0.33.7
2018-10-18 17:17:39 +01:00
Travis Ralston
49a044aa5f
Merge branch 'develop' into travis/login-terms
2018-10-18 09:57:58 -06:00
Richard van der Hoff
03287c350e
remove redundant changelog file
...
this change has been released
2018-10-18 15:09:34 +01:00
Richard van der Hoff
c632bc8654
Merge branch 'master' into develop
2018-10-18 15:07:03 +01:00
Richard van der Hoff
926da4dda8
0.33.7
2018-10-18 14:57:32 +01:00
Erik Johnston
e77f24d80a
Merge pull request #4049 from matrix-org/erikj/synctl_colour
...
Only colourise synctl output when attached to tty
2018-10-18 10:51:14 +01:00
Richard van der Hoff
8c2b8d7f0b
fix changelog formatting
2018-10-17 17:42:12 +01:00
Richard van der Hoff
c7d0f34a3c
v0.33.7rc2
2018-10-17 17:40:19 +01:00
Richard van der Hoff
52e3d3813b
prep changelog
2018-10-17 17:40:01 +01:00
Richard van der Hoff
0fd2321629
Fix incorrect truncation in get_missing_events
...
It's quite important that get_missing_events returns the *latest* events in the
room; however we were pulling event ids out of the database until we got *at
least* 10, and then taking the *earliest* of the results.
We also shouldn't really be relying on depth, and should be checking the
room_id.
2018-10-17 17:35:26 +01:00
Richard van der Hoff
f1bfe6167a
Merge pull request #4052 from matrix-org/rav/ship_resources_as_package_data
...
Ship the email templates as package_data
2018-10-17 17:34:22 +01:00
Erik Johnston
4e726783ea
Merge pull request #4050 from matrix-org/erikj/fix_py37_iteration
...
Fix bug where we raised StopIteration in a generator
2018-10-17 17:07:19 +01:00
Erik Johnston
a5aea15a6b
Assume isatty is always defined, and catch AttributeError. Also don't bother checking colour==Normal
2018-10-17 17:06:49 +01:00
Richard van der Hoff
c8f2c19991
Put the warning blob at the top of the file
2018-10-17 16:56:22 +01:00
Richard van der Hoff
1519572961
Ship the email templates as package_data
...
move the example email templates into the synapse package so that they can be
used as package data, which should mean that all of the packaging mechanisms
(pip, docker, debian, arch, etc) should now come with the example templates.
In order to grandfather in people who relied on the templates being in the old
place, check for that situation and fall back to using the defaults if the
templates directory does not exist.
2018-10-17 16:46:02 +01:00
Erik Johnston
3a5d8d5891
Newsfile
2018-10-17 16:12:45 +01:00
Erik Johnston
f6a0a02a62
Fix bug where we raised StopIteration in a generator
...
This made python 3.7 unhappy
2018-10-17 16:10:52 +01:00
Erik Johnston
1af16acd4c
Newsfile
2018-10-17 13:48:09 +01:00
Erik Johnston
df33c164de
Only colourise synctl output when attached to tty
2018-10-17 13:47:53 +01:00
Will Hunt
d6a7797dd1
Fix roomlist since tokens on Python 3 ( #4046 )
...
Thanks @Half-Shot !!!
2018-10-17 23:04:55 +11:00
Richard van der Hoff
6ec9d8ba0a
Merge pull request #4045 from matrix-org/rav/fix_get_missing_events
...
Fix incorrect truncation in get_missing_events
2018-10-17 11:40:03 +01:00
Neil Johnson
c6584f4b5f
clean up config error logic and imports
2018-10-17 11:36:41 +01:00
Amber Brown
80736fd8ed
Merge pull request #4041 from matrix-org/rav/run_tests_in_docker
...
run the circle builds in docker containers
2018-10-17 20:10:44 +11:00
Richard van der Hoff
fc0f13dd03
Fix incorrect truncation in get_missing_events
...
It's quite important that get_missing_events returns the *latest* events in the
room; however we were pulling event ids out of the database until we got *at
least* 10, and then taking the *earliest* of the results.
We also shouldn't really be relying on depth, and should be checking the
room_id.
2018-10-16 21:10:04 +01:00
Richard van der Hoff
10405153c2
Use wget rather than curl
...
the docker image doesn't have wget
2018-10-16 16:47:26 +01:00
Richard van der Hoff
017eb9d17a
changelog
2018-10-16 16:31:47 +01:00
Erik Johnston
4a28d3d36f
Update event_auth table for rejected events
2018-10-16 16:28:42 +01:00
Erik Johnston
15133477ee
Fix up use of resolve_events_with_factory
2018-10-16 16:28:42 +01:00
Erik Johnston
fc954960e9
Newsfile
2018-10-16 16:28:42 +01:00
Erik Johnston
947c7443eb
Add some state res v2 tests
2018-10-16 16:28:39 +01:00
Erik Johnston
6bd856caa2
User event.sender rather than alias event.user_id
2018-10-16 16:16:13 +01:00
Erik Johnston
e238013c44
Add v2 state res algorithm.
...
We hook this up to the vdh test room version.
2018-10-16 16:16:13 +01:00
Richard van der Hoff
a94967bc5f
run the circle builds in docker containers
...
Docker containers spin up faster than entire VMs.
2018-10-16 15:29:08 +01:00
Richard van der Hoff
b8a5b0097c
Various cleanups in the federation client code ( #4031 )
...
- Improve logging: log things in the right order, include destination and txids
in all log lines, don't log successful responses twice
- Fix the docstring on TransportLayerClient.send_transaction
- Don't use treq.request, which is overcomplicated for our purposes: just use a
twisted.web.client.Agent.
- simplify the logic for setting up the bodyProducer
- fix bytes/str confusions
2018-10-16 10:44:49 +01:00
Travis Ralston
a8ed93a4b5
pep8
2018-10-15 16:10:29 -06:00
Travis Ralston
442734ff9e
Ensure the terms params are actually provided
2018-10-15 14:56:13 -06:00
Travis Ralston
762a0982aa
Python is hard
2018-10-15 14:46:09 -06:00
Travis Ralston
f293d124b6
Merge branch 'develop' into travis/login-terms
2018-10-15 14:44:32 -06:00
Amber Brown
24bc15eab4
update changelog
2018-10-15 22:23:13 +11:00
Amber Brown
4e50fe3edb
update changelog
2018-10-15 22:22:49 +11:00
Amber Brown
f726f2dc6c
version bump
2018-10-15 22:21:45 +11:00
David Baker
03c11032c3
Merge pull request #4019 from matrix-org/dbkr/e2e_backups
...
E2E backups
2018-10-15 10:19:43 +01:00
Amber Brown
f9ce1b4eb0
Merge pull request #4033 from intelfx/py37-hotfixes
...
py3: python3.7 hotfixes
2018-10-15 20:13:19 +11:00
Slavi Pantaleev
c187638ee9
Add information about the matrix-docker-ansible-deploy playbook
...
Signed-off-by: Slavi Pantaleev <slavi@devture.com >
2018-10-14 21:50:18 +03:00
Ivan Shapovalov
06bc8d2fe5
synapse/app: frontend_proxy.py: actually make workers work on py3
2018-10-14 20:08:39 +03:00
Ivan Shapovalov
fb216a22db
synapse/visibility.py: fix SyntaxError on py3.7
2018-10-14 20:08:17 +03:00
Neil Johnson
1ccafb0c5e
no need to join room if creator
2018-10-13 21:14:21 +01:00
Travis Ralston
dd99db846d
Update login terms structure for the proposed language support
2018-10-12 18:03:27 -06:00
Travis Ralston
5119818e9d
Rely on the lack of ?u to represent public access
...
also general cleanup
2018-10-12 18:03:17 -06:00
Travis Ralston
22a2004428
Update documentation and templates for new consent
2018-10-12 17:53:14 -06:00
Travis Ralston
7ede650956
Merge branch 'develop' into travis/login-terms
2018-10-12 16:24:07 -06:00
Travis Ralston
164f8e4843
isort
2018-10-12 15:11:59 -06:00
Travis Ralston
7bb651de6a
More sane handling of group errors and pep8
2018-10-12 14:53:30 -06:00
Travis Ralston
e3586f7c06
Merge branch 'develop' into travis/fix-federated-group-requests
2018-10-12 14:49:58 -06:00
Neil Johnson
a2bfb778c8
improve auto room join logic, comments and tests
2018-10-12 18:17:36 +01:00
David Baker
a45f2c3a00
missed one
2018-10-12 14:33:55 +01:00
Amber Brown
381d2cfdf0
Make workers work on Py3 ( #4027 )
2018-10-13 00:14:08 +11:00
Erik Johnston
67a1e315cc
Fix up comments
2018-10-12 13:49:48 +01:00
David Baker
8c0ff0287a
Linting soothes the savage PEP8 monster
2018-10-12 13:47:43 +01:00
David Baker
306361b31b
Misc PR feedback bits
2018-10-12 11:48:56 +01:00
David Baker
bddfad253a
Don't mangle exceptions
2018-10-12 11:48:02 +01:00
David Baker
86ef9760a7
Split /room_keys/version into 2 servlets
2018-10-12 11:35:08 +01:00
David Baker
83e72bb2f0
PR feedback pt. 1
2018-10-12 11:26:18 +01:00
Richard van der Hoff
8ddd0f273c
Comments on get_all_new_events_stream
...
just some docstrings to clarify the behaviour here
2018-10-12 09:55:41 +01:00
Erik Johnston
e97d93948d
Merge pull request #4022 from matrix-org/erikj/metrics_lazy_loaded_count
...
Add metric to count lazy member sync requests
2018-10-10 14:39:18 +01:00
Erik Johnston
7e561b5c1a
Add description to counter metric
2018-10-10 11:41:15 +01:00
Erik Johnston
49840f5ab2
Update newsfile
2018-10-10 11:31:02 +01:00
Erik Johnston
3cbe8331e6
Track number of non-empty sync responses instead
2018-10-10 11:23:17 +01:00
Erik Johnston
395276b405
Append _total to metric and fix up spelling
2018-10-10 09:24:39 +01:00
David Baker
b8d9e108be
Fix mergefail
2018-10-09 18:04:21 +01:00
Erik Johnston
20733857ab
Newsfile
2018-10-09 14:18:16 +01:00
Erik Johnston
bdc27d6716
Add metric to count lazy member sync requests
2018-10-09 14:17:52 +01:00
David Baker
d34657e1f2
Add changelog
2018-10-09 11:15:54 +01:00
David Baker
d3464ce708
isort
2018-10-09 10:33:59 +01:00
Erik Johnston
9eb1a79100
Merge pull request #4008 from matrix-org/erikj/log_looping_exceptions
...
Log looping call exceptions
2018-10-09 10:12:10 +01:00
David Baker
dc045ef202
Merge remote-tracking branch 'origin/develop' into dbkr/e2e_backups
2018-10-09 10:05:02 +01:00
Richard van der Hoff
2418e7811a
Merge pull request #4017 from matrix-org/rav/optimise_filter_events_for_server
...
Optimisation for filter_events_for_server
2018-10-09 09:48:56 +01:00
David Baker
f4a4dbcad1
Apparently this blank line is Very Important
2018-10-09 09:47:04 +01:00
David Baker
0c905ee015
be python3 compatible
2018-10-09 09:39:13 +01:00
Erik Johnston
6982320572
Remove unnecessary extra function call layer
2018-10-08 14:06:19 +01:00
Richard van der Hoff
495975e231
Optimisation for filter_events_for_server
...
We're better off hashing just the event_id than the whole ((type, state_key),
event_id) tuple - so use a dict instead of a set.
Also, iteritems > items.
2018-10-08 13:46:52 +01:00
Erik Johnston
8a1817f0d2
Use errback pattern and catch async failures
2018-10-08 13:29:47 +01:00
David Baker
497444f1fd
Don't reuse backup versions
...
Since we don't actually delete the keys, just mark the versions
as deleted in the db rather than actually deleting them, then we
won't reuse versions.
Fixes https://github.com/vector-im/riot-web/issues/7448
2018-10-05 15:08:36 +01:00
Erik Johnston
8164f6daf3
Newsfile
2018-10-05 11:25:09 +01:00
Erik Johnston
f7199e8734
Log looping call exceptions
...
If a looping call function errors, then it kills the loop entirely.
Currently it throws away the exception logs, so we should make it
actually log them.
Fixes #3929
2018-10-05 11:24:12 +01:00
Neil Johnson
ed82043efb
Merge branch 'develop' into matthew/autocreate_autojoin
2018-10-04 17:26:59 +01:00
Neil Johnson
2dadc092b8
move logic into register, fix room alias localpart bug, tests
2018-10-04 17:00:27 +01:00
Richard van der Hoff
c6dbd216e6
Merge pull request #3995 from matrix-org/rav/no_deextrem_outliers
...
Fix bug in forward_extremity update logic
2018-10-04 16:27:05 +01:00
Erik Johnston
d9f3db5081
Newsfile
2018-10-04 16:03:08 +01:00
Erik Johnston
4917ff5523
Add state_group index to event_to_state_groups
...
This is needed to efficiently check for unreferenced state groups during
purge.
2018-10-04 16:03:08 +01:00
Erik Johnston
17d585753f
Delete unreferened state groups during purge
2018-10-04 16:03:06 +01:00
Michael Kaye
e6018bcc1a
Use labels to tag builds with their SHA1 version.
...
The additional sha1 tagged builds in docker hub are messy,
so instead tag the build with the SHA1 version.
2018-10-04 15:15:26 +01:00
Amber Brown
d86794325f
Merge branch 'master' into develop
2018-10-04 22:41:52 +10:00
Amber Brown
92faeb2a3f
changelog
2018-10-04 22:38:10 +10:00
Amber Brown
dd59dfc51f
full version
2018-10-04 22:37:55 +10:00
Travis Ralston
158d6c75b6
Changelog
2018-10-03 17:54:08 -06:00
Travis Ralston
537d0b7b36
Use a flag rather than a new route for the public policy
...
This also means that the template now has optional parameters, which will need to be documented somehow.
2018-10-03 17:50:11 -06:00
Travis Ralston
f9d34a763c
Auto-consent to the privacy policy if the user registered with terms
2018-10-03 17:39:45 -06:00
Travis Ralston
dfcad5fad5
Make the terms flow requried
2018-10-03 17:39:00 -06:00
Travis Ralston
3099d96dba
Flesh out the fallback auth for terms
2018-10-03 17:39:00 -06:00
Travis Ralston
149c4f1765
Supply params for terms auth stage
...
As per https://github.com/matrix-org/matrix-doc/pull/1692
2018-10-03 15:57:42 -06:00
Travis Ralston
fd99787162
Incorporate Dave's work for GDPR login flows
...
As per https://github.com/vector-im/riot-web/issues/7168#issuecomment-419996117
2018-10-03 15:57:42 -06:00
Richard van der Hoff
e5f080d6a7
Merge pull request #4002 from matrix-org/rav/pin_prometheus
...
Pin to prometheus_client<0.4 to avoid renaming all of our metrics
2018-10-03 17:42:08 +01:00
Richard van der Hoff
a59d899668
Pin to prometheus_client<0.4 to avoid renaming all of our metrics
2018-10-03 17:20:15 +01:00
Richard van der Hoff
055fe3589e
Merge pull request #3998 from matrix-org/michaelkaye/build_docker_images_of_rc_tags
...
Docker build all tags starting vX.Y.Z, including release candidates
2018-10-03 17:12:52 +01:00
Erik Johnston
8935ec5a93
Merge pull request #3999 from matrix-org/erikj/fix_3pid_invite_rejetion
...
Fix handling of rejected threepid invites
2018-10-03 14:47:41 +01:00
Erik Johnston
81e2813948
Merge pull request #3996 from matrix-org/erikj/fix_bg_iteration
...
Fix exception in background metrics collection
2018-10-03 14:14:38 +01:00
Erik Johnston
52e6e815be
Sanitise error messages when user doesn't have permission to invite
2018-10-03 14:13:07 +01:00
Erik Johnston
01afcfc4e9
Merge pull request #3997 from matrix-org/erikj/fix_profile_error_handling
...
Fix exception handling in fetching remote profiles
2018-10-03 14:11:09 +01:00
Erik Johnston
93a8603904
Newsfile
2018-10-03 11:59:05 +01:00
Erik Johnston
69e857853f
Fix handling of rejected threepid invites
2018-10-03 11:57:30 +01:00
Michael Kaye
d1b7c0ca05
Docker build all tags starting vX.Y.Z, inc RCs
...
Note the regex must match the complete string anyway,
so the leading ^ was useless.
2018-10-03 11:52:05 +01:00
Erik Johnston
6e0c66f651
Newsfile
2018-10-03 11:40:02 +01:00
Erik Johnston
495a9d06bb
Fix exception handling in fetching remote profiles
2018-10-03 11:34:30 +01:00
Erik Johnston
c69faf8c4a
Newsfile
2018-10-03 11:29:44 +01:00
Erik Johnston
7c570bff74
Fix exception in background metrics collection
...
We attempted to iterate through a list on a separate thread without
doing the necessary copying.
2018-10-03 11:28:01 +01:00
Richard van der Hoff
9693625e55
actually exclude outliers
2018-10-03 10:19:41 +01:00
Richard van der Hoff
2a4ea3baa8
fix newsfile name
2018-10-03 07:09:25 +01:00
Richard van der Hoff
3e39783d5d
remove debugging
2018-10-02 23:44:14 +01:00
Richard van der Hoff
ae61ade891
Fix bug in forward_extremity update logic
...
An event does not stop being a forward_extremity just because an outlier or
rejected event refers to it.
2018-10-02 23:36:08 +01:00
Amber Brown
ed763aeba8
some changelog fixes
2018-10-03 02:27:41 +10:00
Amber Brown
ccce6f26a6
changelog
2018-10-03 02:16:21 +10:00
Amber Brown
da8f82008d
version
2018-10-03 02:15:48 +10:00
Erik Johnston
25baf3b2ac
Merge pull request #3991 from matrix-org/erikj/fix_pop_retry_cache
...
Fix bug when invalidating destination retry timings
2018-10-02 16:42:28 +01:00
Erik Johnston
9c834b8ee9
Add tests
2018-10-02 16:22:39 +01:00
Amber Brown
058a4c665e
Remove Jenkins & other old dev junk ( #3988 )
2018-10-03 00:59:11 +10:00
Erik Johnston
8f614f842d
Newsfile
2018-10-02 15:54:31 +01:00
Erik Johnston
7258d081a5
Fix bug when invalidating destination retry timings
2018-10-02 15:47:57 +01:00
Richard van der Hoff
2b8d28b095
Merge pull request #3960 from matrix-org/rav/fix_missing_create_event_error
...
Fix error handling for missing auth_event
2018-10-02 13:57:54 +01:00
Amber Brown
7232917f12
Disable frozen dicts by default ( #3987 )
2018-10-02 22:53:47 +10:00
Erik Johnston
0f7033fb98
Merge pull request #3990 from matrix-org/erikj/fix_logging_lost_connection
...
Fix error when logging incomplete requests
2018-10-02 14:10:05 +02:00
Erik Johnston
eeb755d17b
Newsfile
2018-10-02 12:06:25 +01:00
Erik Johnston
334e075dd8
Fix error when logging incomplete requests
...
If a connection is lost before a request is read from Request, Twisted
sets `method` (and `uri`) attributes to dummy values. These dummy values
have incorrect types (i.e. they're not bytes), and so things like
`__repr__` would raise an exception.
To fix this we had a helper method to return the method with a
consistent type.
2018-10-02 12:06:22 +01:00
Richard van der Hoff
8c41b0ca66
Merge pull request #3989 from matrix-org/rav/better_stacktraces
...
Avoid reraise, to improve stacktraces
2018-10-02 10:47:38 +01:00
Erik Johnston
bc29946809
Merge pull request #3986 from matrix-org/erikj/fix_sync_with_redacted_state
...
Fix lazy loaded sync with rejected state events
2018-10-02 11:38:35 +02:00
Richard van der Hoff
8174c6725b
Avoid reraise, to improve stacktraces
2018-10-01 18:50:34 +01:00
Richard van der Hoff
5908a8f6f5
Merge branch 'develop' into rav/fix_missing_create_event_error
2018-10-01 17:16:20 +01:00
Amber Brown
abdc141c2b
Update instructions to point to pip install ( #3985 )
2018-10-02 01:08:38 +10:00
Richard van der Hoff
b5b93f45d5
Merge pull request #3968 from matrix-org/rav/fix_federation_errors
...
Fix exceptions when handling incoming transactions
2018-10-01 15:54:24 +01:00
Amber Brown
6e05fd032c
Fix userconsent on Python 3 ( #3938 )
2018-10-02 00:11:58 +10:00
Erik Johnston
5fa27eac78
Newsfile
2018-10-01 14:24:41 +01:00
Erik Johnston
82f922b4af
Fix lazy loaded sync with rejected state events
...
In particular, we assume that the name and canonical alias events in
the state have not been rejected. In practice this may not be the case
(though we should probably think about fixing that) so lets ensure that
we gracefully handle that case, rather than 404'ing the sync request
like we do now.
2018-10-01 14:19:40 +01:00
Erik Johnston
8f5c23d0cd
Merge pull request #3933 from matrix-org/erikj/destination_retry_cache
...
Add a five minute cache to get_destination_retry_timings
2018-10-01 14:20:30 +02:00
Richard van der Hoff
53c5fa4e6c
Further reduce the size of the docker image ( #3972 )
...
Rewrite the dockerfile as a multistage build: this means we can get rid of a whole load of cruft which we don't need.
2018-10-01 12:29:17 +01:00
Erik Johnston
4f3e3ac192
Correctly match 'dict.pop' api
2018-10-01 12:25:27 +01:00
Erik Johnston
8ea887856c
Don't update eviction metrics on explicit removal
2018-10-01 12:00:58 +01:00
Matthew Hodgson
faa462ef79
changelog
2018-09-29 02:21:01 +01:00
Matthew Hodgson
23b6a0537f
emit room aliases event
2018-09-29 02:19:37 +01:00
Matthew Hodgson
5b68f29f48
fix thinkos
2018-09-29 02:14:40 +01:00
Matthew Hodgson
8f646f2d04
fix UTs
2018-09-28 15:37:28 +01:00
Bruno Windels
9a8bbc9a59
add --no-admin flag to registration script ( #3836 )
2018-09-28 13:36:56 +01:00
Richard van der Hoff
3deaad2fb4
Merge pull request #3964 from matrix-org/rav/remove_localhost_checks
...
remove spurious federation checks on localhost
2018-09-28 13:35:47 +01:00
Richard van der Hoff
26557c9db4
Merge pull request #3980 from matrix-org/rav/remove_broken_cache_call
...
Remove redundant call to start_get_pdu_cache
2018-09-28 13:13:19 +01:00
Richard van der Hoff
965154d60a
Fix complete fail to do the right thing
2018-09-28 12:45:54 +01:00
Jan Christian Grünhage
5304449738
build python 3 docker images on circle CI ( #3976 )
2018-09-28 12:36:35 +01:00
Richard van der Hoff
19475cf337
Remove redundant call to start_get_pdu_cache
...
I think this got forgotten in #3932 . We were getting away with it because it
was the last call in this function.
2018-09-28 12:01:23 +01:00
Richard van der Hoff
9c8cec5dab
Merge remote-tracking branch 'origin/develop' into erikj/destination_retry_cache
2018-09-28 10:51:09 +01:00
Matthew Hodgson
07340cdaca
untested stab at autocreating autojoin rooms
2018-09-28 01:42:53 +01:00
Richard van der Hoff
f094f715cf
Merge remote-tracking branch 'origin/develop' into rav/fix_federation_errors
2018-09-27 15:18:21 +01:00
Richard van der Hoff
36c62a67c4
Merge pull request #3794 from matrix-org/erikj/faster_typing
...
Improve performance of getting typing updates for replication
2018-09-27 15:14:26 +01:00
Richard van der Hoff
b5c976347b
Merge pull request #3946 from matrix-org/michaelkaye/automate_docker_hub_upload
...
Build and push docker image to hub automatically
2018-09-27 15:07:41 +01:00
Richard van der Hoff
e1e3e77bfd
Merge pull request #3967 from matrix-org/rav/federation_handler_cleanups
...
Clarifications in FederationHandler
2018-09-27 15:06:59 +01:00
Amber Brown
6de3884e5e
Merge pull request #3965 from matrix-org/rav/notify_app_services_bg_process
...
Run notify_app_services as a bg process
2018-09-27 23:40:30 +10:00
Amber Brown
a512e637ac
Merge pull request #3970 from schnuffle/develop-py3
...
Replaced all occurences of e.message with str(e)
2018-09-27 23:39:45 +10:00
Amber Brown
b3064532d0
Run our oldest supported configuration in CI ( #3952 )
2018-09-27 23:21:54 +10:00
Amber Brown
861c063ebc
Update 3970.bugfix
2018-09-27 22:47:01 +10:00
Richard van der Hoff
484a9b8c81
Remove redundant, failing, test
...
This test didn't do what it claimed to do, and what it claimed to do was the
same as test_cant_hide_direct_ancestors anyway.
This stuff is tested by sytest anyway.
2018-09-27 13:11:23 +01:00
Schnuffle
a873896096
Added changelog fragment
2018-09-27 14:01:44 +02:00
Schnuffle
dc5db01ff2
Replaced all occurences of e.message with str(e)
...
Signed-off-by: Schnuffle <schnuffle@github.com >
2018-09-27 13:38:50 +02:00
Richard van der Hoff
51d33d5178
Merge pull request #3961 from matrix-org/neilj/lock_mau_upserts
...
fix #3854 MAU transaction errors
2018-09-27 12:31:37 +01:00
Michael Kaye
74bbdd0412
Do the changelog.d dance
2018-09-27 12:01:43 +01:00
Michael Kaye
8607397ea7
Make a ":latest" tag, and a SHA1 commit ID one too.
...
Latest is horrible and makes debugging what has happened anywhere a
nightmare. We push a latest because of demand for it, but we'll also
push a SHA1 commit id so those wanting to know what they're running
(and be able to roll back if required) can use those instead.
Note that latest here is defined as "most recent master commit" not
"most recent released version", as the actual semantics of making latest
correct while still being able to build bugfixed releases of previous
versions is just ARGH. So we define it as "master" not "latest release".
2018-09-27 12:01:41 +01:00
Michael Kaye
a3c11f7320
Also, don't run this job on any branches
2018-09-27 12:01:09 +01:00
Michael Kaye
73a089f461
Make username configurable in the UI too
2018-09-27 12:00:40 +01:00
Michael Kaye
3852c2bc39
Fix typo
2018-09-27 12:00:01 +01:00
Michael Kaye
0d36fe3563
Build and push docker image to hub
2018-09-27 11:59:17 +01:00
Richard van der Hoff
948a6d8776
changelog
2018-09-27 11:37:39 +01:00
Richard van der Hoff
333bee27f5
Include event when resolving state for missing prevs
...
If we have a forward extremity for a room as `E`, and you receive `A`, `B`,
s.t. `A -> B -> E`, and `B` also points to an unknown event `X`, then we need
to do state res between `X` and `E`.
When that happens, we need to make sure we include `X` in the state that goes
into the state res alg.
Fixes #3934 .
2018-09-27 11:37:39 +01:00
Richard van der Hoff
bd61c82bdf
Include state from remote servers in pdu handling
...
If we've fetched state events from remote servers in order to resolve the state
for a new event, we need to actually pass those events into
resolve_events_with_factory (so that it can do the state res) and then persist
the ones we need - otherwise other bits of the codebase get confused about why
we have state groups pointing to non-existent events.
2018-09-27 11:37:39 +01:00
Richard van der Hoff
a215b698c4
Fix "unhashable type: 'list'" exception in federation handling
...
get_state_groups returns a map from state_group_id to a list of FrozenEvents,
so was very much the wrong thing to be putting as one of the entries in the
list passed to resolve_events_with_factory (which expects maps from
(event_type, state_key) to event id).
We actually want get_state_groups_ids().values() rather than
get_state_groups().
This fixes the main problem in #3923 , but there are other problems with this
bit of code which get discovered once you do so.
2018-09-27 11:37:39 +01:00
Richard van der Hoff
28223841e0
more comments
2018-09-27 11:31:51 +01:00
Richard van der Hoff
ad8e137062
changelog
2018-09-27 11:31:51 +01:00
Richard van der Hoff
e3c159863d
Clarifications in FederationHandler
...
* add some comments on things that look a bit bogus
* rename this `state` variable to avoid confusion with the `state` used
elsewhere in this function. (There was no actual conflict, but it was
a confusing bit of spaghetti.)
2018-09-27 11:31:51 +01:00
Richard van der Hoff
92abd3d6d6
Merge pull request #3966 from matrix-org/rav/rx_txn_logging_2
...
Logging improvements
2018-09-27 11:27:46 +01:00
Richard van der Hoff
4a15a3e4d5
Include eventid in log lines when processing incoming federation transactions ( #3959 )
...
when processing incoming transactions, it can be hard to see what's going on,
because we process a bunch of stuff in parallel, and because we may end up
recursively working our way through a chain of three or four events.
This commit creates a way to use logcontexts to add the relevant event ids to
the log lines.
2018-09-27 11:25:34 +01:00
Richard van der Hoff
ae6ad4cf41
docstrings and unittests for storage.state ( #3958 )
...
I spent ages trying to figure out how I was going mad...
2018-09-27 11:22:25 +01:00
Amber Brown
2c695fd1aa
Merge pull request #3963 from matrix-org/rav/get_state_for_room_docstring
...
fix docstring for FederationClient.get_state_for_room
2018-09-27 18:06:38 +10:00
Travis Ralston
82fa31799c
Remove debugging statement
2018-09-26 14:01:02 -06:00
Travis Ralston
2a7b3439de
Changelog
2018-09-26 13:51:34 -06:00
Travis Ralston
b4c3bc1734
Handle HttpResponseException more safely for federated groups
2018-09-26 13:48:04 -06:00
Travis Ralston
219606a6ed
Fix exception documentation in matrixfederationclient.py
2018-09-26 13:26:27 -06:00
Richard van der Hoff
e70b4ce069
Logging improvements
...
Some logging tweaks to help with debugging incoming federation transactions
2018-09-26 17:36:14 +01:00
Richard van der Hoff
3c37c7e45b
changelog
2018-09-26 17:01:30 +01:00
Richard van der Hoff
a87d419a85
Run notify_app_services as a bg process
...
This ensures that its resource usage metrics get recorded somewhere rather than
getting lost.
(It also fixes an error when called from a nested logging context which
completes before the bg process)
2018-09-26 17:00:40 +01:00
Richard van der Hoff
0c4a99ea2d
changelog
2018-09-26 16:54:54 +01:00
Richard van der Hoff
9453c65948
remove spurious federation checks on localhost
...
There's really no point in checking for destinations called "localhost" because
there is nothing stopping people creating other DNS entries which point to
127.0.0.1. The right fix for this is
https://github.com/matrix-org/synapse/issues/3953 .
Blocking localhost, on the other hand, means that you get a surprise when
trying to connect a test server on localhost to an existing server (with a
'normal' server_name).
2018-09-26 16:53:52 +01:00
Richard van der Hoff
ab59f3d8da
changelog
2018-09-26 16:52:24 +01:00
Richard van der Hoff
607eec0456
fix docstring for FederationClient.get_state_for_room
...
trivial fixes for docstring
2018-09-26 16:52:24 +01:00
Neil Johnson
d514608b5c
towncrier
2018-09-26 16:19:53 +01:00
Neil Johnson
28781b65e7
fix #3854
2018-09-26 16:16:41 +01:00
Amber Brown
d4e0861ff9
Reduce the load on our CI ( #3957 )
...
* changelog
* reduce circleci config
* plus a handy script
* fix regex
2018-09-27 00:23:21 +10:00
Richard van der Hoff
a5e70b31a1
changelog
2018-09-26 14:41:14 +01:00
Richard van der Hoff
8afddf7afe
Fix error handling for missing auth_event
...
When we were authorizing an event, if there was no `m.room.create` in its
auth_events, we would raise a SynapseError with a cryptic message, which then
meant that we would bail out of processing any incoming events, rather than
storing a rejection for the faulty event and moving on.
We should treat the absent event the same as any other auth failure, by
raising an AuthError, so that the event is marked as rejected.
2018-09-26 14:40:16 +01:00
Richard van der Hoff
bf01efb864
Merge branch 'develop' into rav/hacky_cache_factor_fix
2018-09-26 13:24:07 +01:00
Erik Johnston
8834396b8a
Actuall set cache factors in workers
2018-09-26 13:23:02 +01:00
Richard van der Hoff
4e8276a34a
Merge pull request #3956 from matrix-org/rav/fix_expiring_cache_len
...
Fix ExpiringCache.__len__ to be accurate
2018-09-26 13:10:13 +01:00
Richard van der Hoff
5b4028fa78
Merge branch 'rav/fix_expiring_cache_len' into erikj/destination_retry_cache
2018-09-26 12:55:53 +01:00
Richard van der Hoff
7ee94fc1ba
Log which cache is throwing exceptions
2018-09-26 12:43:08 +01:00
Amber Brown
66a1d57adb
Merge pull request #3948 from matrix-org/rav/no_symlink_synctl
...
Move synctl into top dir to avoid a symlink
2018-09-26 21:41:58 +10:00
Amber Brown
c2185f14d7
Merge pull request #3924 from matrix-org/rav/clean_up_on_receive_pdu
...
Comments and interface cleanup for on_receive_pdu
2018-09-26 21:41:26 +10:00
Richard van der Hoff
8ac9fa7375
changelog
2018-09-26 12:35:10 +01:00
Erik Johnston
3baf6e1667
Fix ExpiringCache.__len__ to be accurate
...
It used to try and produce an estimate, which was sometimes negative.
This caused metrics to be sad, so lets always just calculate it from
scratch.
(This appears to have been a longstanding bug, but one which has been made more
of a problem by #3932 and #3933 ).
(This was originally done by Erik as part of #3933 . I'm cherry-picking it
because really it's a fix in its own right)
2018-09-26 12:32:29 +01:00
Richard van der Hoff
f65163627f
Merge pull request #3911 from matrix-org/jcgruenhage/docker-support-python3
...
make python 3 work in the docker container
2018-09-25 15:18:09 +01:00
Jan Christian Grünhage
df55a943ca
Update Dockerfile
2018-09-25 14:33:38 +02:00
Jan Christian Grünhage
e7fa032126
Update .dockerignore
2018-09-25 14:33:19 +02:00
Richard van der Hoff
0649306fde
Update grafana dashboard
2018-09-25 13:29:28 +01:00
Richard van der Hoff
a1cd37390f
Merge remote-tracking branch 'origin/develop' into erikj/destination_retry_cache
2018-09-25 12:03:54 +01:00
Richard van der Hoff
4c3e7eeec5
Merge pull request #3932 from matrix-org/erikj/auto_start_expiring_caches
...
Fix some instances of ExpiringCache not expiring cache items
2018-09-25 12:02:57 +01:00
Jérémy Farnaud
6cf261930a
added "media-src: 'self'" to CSP for resources ( #3578 )
...
Synapse doesn’t allow for media resources to be played directly from
Chrome. It is a problem for users on other networks (e.g. IRC)
communicating with Matrix users through a gateway. The gateway sends
them the raw URL for the resource when a Matrix user uploads a video
and the video cannot be played directly in Chrome using that URL.
Chrome argues it is not authorized to play the video because of the
Content Security Policy. Chrome checks for the "media-src" policy which
is missing, and defauts to the "default-src" policy which is "none".
As Synapse already sends "object-src: 'self'" I thought it wouldn’t be
a problem to add "media-src: 'self'" to the CSP to fix this problem.
2018-09-25 11:55:02 +01:00
Richard van der Hoff
94f7befc31
Merge pull request #3925 from matrix-org/erikj/fix_producers_unregistered
...
Fix spurious exceptions when client closes conncetion
2018-09-25 11:52:06 +01:00
Richard van der Hoff
bd469adaa9
changelog
2018-09-25 11:22:17 +01:00
Richard van der Hoff
c53336986d
Move synctl into top dir to avoid a symlink
...
symlinks apparently break setuptools on python3 and alpine
(https://bugs.python.org/issue31940 ), so let's stop using a symlink and just
use the file directly.
2018-09-25 11:19:27 +01:00
Richard van der Hoff
e4e96486a9
Merge pull request #3947 from matrix-org/rav/attr_version
...
We require attrs 16.0.0
2018-09-25 11:16:42 +01:00
Richard van der Hoff
45a1053d44
changelog
2018-09-25 10:45:34 +01:00
Richard van der Hoff
a9d84f4e44
We require attrs 16.0.0
...
Ref: https://github.com/matrix-org/synapse/issues/3945
2018-09-25 10:43:39 +01:00
Matthew Hodgson
787d22ed6c
Only lazy load self-members on initial sync
...
Given we have disabled lazy loading for incr syncs in #3840 , we can make self-LL more efficient by only doing it on initial sync. Also adds a bounds check for if/when we change our mind, so that we don't try to include LL members on sync responses with no timeline.
2018-09-25 00:49:26 +01:00
Amber Brown
fbe5ba25f6
Merge branch 'master' into develop
2018-09-25 03:10:01 +10:00
Amber Brown
5121ae97f5
Merge tag 'v0.33.5.1'
...
Internal Changes
----------------
- Fix incompatibility with older Twisted version in tests. Thanks
@OlegGirko!
([\#3940](https://github.com/matrix-org/synapse/issues/3940 ))
2018-09-25 03:09:30 +10:00
Amber Brown
fc691ca97c
changelog
2018-09-25 02:54:59 +10:00
Amber Brown
6b6cb32297
bump version
2018-09-25 02:54:34 +10:00
Amber Brown
e37c221b97
changelog for 3940
2018-09-25 02:51:55 +10:00
Oleg Girko
7d3f639844
Fix compatibility issue with older Twisted in tests.
...
Older Twisted (18.4.0) returns TimeoutError instead of
ConnectingCancelledError when connection times out.
This change allows tests to be compatible with this behaviour.
Signed-off-by: Oleg Girko <ol@infoserver.lv >
2018-09-25 02:51:18 +10:00
Amber Brown
04eed80a73
Merge branch 'master' into develop
2018-09-24 23:42:25 +10:00
Amber Brown
829213523e
Merge tag 'v0.33.5'
...
Features
--------
- Python 3.5 and 3.6 support is now in beta.
([\#3576](https://github.com/matrix-org/synapse/issues/3576 ))
- Implement `event_format` filter param in `/sync`
([\#3790](https://github.com/matrix-org/synapse/issues/3790 ))
- Add synapse_admin_mau:registered_reserved_users metric to expose
number of real reaserved users
([\#3846](https://github.com/matrix-org/synapse/issues/3846 ))
Bugfixes
--------
- Remove connection ID for replication prometheus metrics, as it creates
a large number of new series.
([\#3788](https://github.com/matrix-org/synapse/issues/3788 ))
- guest users should not be part of mau total
([\#3800](https://github.com/matrix-org/synapse/issues/3800 ))
- Bump dependency on pyopenssl 16.x, to avoid incompatibility with
recent Twisted.
([\#3804](https://github.com/matrix-org/synapse/issues/3804 ))
- Fix existing room tags not coming down sync when joining a room
([\#3810](https://github.com/matrix-org/synapse/issues/3810 ))
- Fix jwt import check
([\#3824](https://github.com/matrix-org/synapse/issues/3824 ))
- fix VOIP crashes under Python 3 (#3821 )
([\#3835](https://github.com/matrix-org/synapse/issues/3835 ))
- Fix manhole so that it works with latest openssh clients
([\#3841](https://github.com/matrix-org/synapse/issues/3841 ))
- Fix outbound requests occasionally wedging, which can result in
federation breaking between servers.
([\#3845](https://github.com/matrix-org/synapse/issues/3845 ))
- Show heroes if room name/canonical alias has been deleted
([\#3851](https://github.com/matrix-org/synapse/issues/3851 ))
- Fix handling of redacted events from federation
([\#3859](https://github.com/matrix-org/synapse/issues/3859 ))
- ([\#3874](https://github.com/matrix-org/synapse/issues/3874 ))
- Mitigate outbound federation randomly becoming wedged
([\#3875](https://github.com/matrix-org/synapse/issues/3875 ))
Internal Changes
----------------
- CircleCI tests now run on the potential merge of a PR.
([\#3704](https://github.com/matrix-org/synapse/issues/3704 ))
- http/ is now ported to Python 3.
([\#3771](https://github.com/matrix-org/synapse/issues/3771 ))
- Improve human readable error messages for threepid
registration/account update
([\#3789](https://github.com/matrix-org/synapse/issues/3789 ))
- Make /sync slightly faster by avoiding needless copies
([\#3795](https://github.com/matrix-org/synapse/issues/3795 ))
- handlers/ is now ported to Python 3.
([\#3803](https://github.com/matrix-org/synapse/issues/3803 ))
- Limit the number of PDUs/EDUs per federation transaction
([\#3805](https://github.com/matrix-org/synapse/issues/3805 ))
- Only start postgres instance for postgres tests on Travis CI
([\#3806](https://github.com/matrix-org/synapse/issues/3806 ))
- tests/ is now ported to Python 3.
([\#3808](https://github.com/matrix-org/synapse/issues/3808 ))
- crypto/ is now ported to Python 3.
([\#3822](https://github.com/matrix-org/synapse/issues/3822 ))
- rest/ is now ported to Python 3.
([\#3823](https://github.com/matrix-org/synapse/issues/3823 ))
- add some logging for the keyring queue
([\#3826](https://github.com/matrix-org/synapse/issues/3826 ))
- speed up lazy loading by 2-3x
([\#3827](https://github.com/matrix-org/synapse/issues/3827 ))
- Improved Dockerfile to remove build requirements after building
reducing the image size.
([\#3834](https://github.com/matrix-org/synapse/issues/3834 ))
- Disable lazy loading for incremental syncs for now
([\#3840](https://github.com/matrix-org/synapse/issues/3840 ))
- federation/ is now ported to Python 3.
([\#3847](https://github.com/matrix-org/synapse/issues/3847 ))
- Log when we retry outbound requests
([\#3853](https://github.com/matrix-org/synapse/issues/3853 ))
- Removed some excess logging messages.
([\#3855](https://github.com/matrix-org/synapse/issues/3855 ))
- Speed up purge history for rooms that have been previously purged
([\#3856](https://github.com/matrix-org/synapse/issues/3856 ))
- Refactor some HTTP timeout code.
([\#3857](https://github.com/matrix-org/synapse/issues/3857 ))
- Fix running merged builds on CircleCI
([\#3858](https://github.com/matrix-org/synapse/issues/3858 ))
- Fix typo in replication stream exception.
([\#3860](https://github.com/matrix-org/synapse/issues/3860 ))
- Add in flight real time metrics for Measure blocks
([\#3871](https://github.com/matrix-org/synapse/issues/3871 ))
- Disable buffering and automatic retrying in treq requests to prevent
timeouts. ([\#3872](https://github.com/matrix-org/synapse/issues/3872 ))
- mention jemalloc in the README
([\#3877](https://github.com/matrix-org/synapse/issues/3877 ))
- Remove unmaintained "nuke-room-from-db.sh" script
([\#3888](https://github.com/matrix-org/synapse/issues/3888 ))
2018-09-24 23:41:35 +10:00
Amber Brown
e3aa2c0b75
towncrier
2018-09-24 23:40:27 +10:00
Amber Brown
e302f40e20
update version
2018-09-24 23:40:05 +10:00
Erik Johnston
19dc676d1a
Fix ExpiringCache.__len__ to be accurate
...
It used to try and produce an estimate, which was sometimes negative.
This caused metrics to be sad, so lets always just calculate it from
scratch.
2018-09-21 16:25:42 +01:00
Erik Johnston
5230bc1471
Newsfile
2018-09-21 15:05:37 +01:00
Erik Johnston
fdd1a62e8d
Add a five minute cache to get_destination_retry_timings
...
Hopefully helps with #3931
2018-09-21 14:56:12 +01:00
Erik Johnston
79eded1ae4
Make ExpiringCache slightly more performant
2018-09-21 14:52:21 +01:00
Erik Johnston
d3f80cbc9c
Newsfile
2018-09-21 14:24:39 +01:00
Erik Johnston
8601c24287
Fix some instances of ExpiringCache not expiring cache items
...
ExpiringCache required that `start()` be called before it would actually
start expiring entries. A number of places didn't do that.
This PR removes `start` from ExpiringCache, and automatically starts
backround reaping process on creation instead.
2018-09-21 14:19:46 +01:00
Erik Johnston
ad53a5497d
Merge pull request #3927 from matrix-org/erikj/handle_background_errors
...
Handle exceptions thrown by background tasks
2018-09-21 09:26:30 +01:00
Matthew Hodgson
a2ddaa90f2
Always LL ourselves if we're in a room to simplify clients ( #3916 )
...
Should fix https://github.com/vector-im/riot-web/issues/7209
2018-09-20 21:21:54 +01:00
Erik Johnston
94ae1dea3c
Add missing logger
2018-09-20 17:05:34 +01:00
Erik Johnston
168491c412
Newsfile
2018-09-20 16:16:52 +01:00
Erik Johnston
9ea408441f
Handle exceptions thrown by background tasks
...
Fixes #3921
2018-09-20 16:15:21 +01:00
Jan Christian Grünhage
3af7a95a9d
add changelog
2018-09-20 14:55:11 +02:00
Jan Christian Grünhage
8dfb33d325
make python 3 work in the docker container
2018-09-20 14:55:11 +02:00
Erik Johnston
13f6f1624b
Newsfile
2018-09-20 13:52:09 +01:00
Erik Johnston
b28a7ed503
Fix spurious exceptions when client closes conncetion
...
If a HTTP handler throws an exception while processing a request we
automatically write a JSON error response. If the handler had already
started writing a response twisted throws an exception.
We should check for this case and simple abort the connection if there
was an error after the response had started being written.
2018-09-20 13:44:20 +01:00
Neil Johnson
23b53b4ef8
Merge pull request #3868 from matrix-org/neilj/fix_room_invite_mail_links
...
Neilj/fix room invite mail links
2018-09-20 13:32:38 +01:00
Richard van der Hoff
6bb9a4b1d6
changelog
2018-09-20 13:15:20 +01:00
Richard van der Hoff
703de4ec13
Comments and interface cleanup for on_receive_pdu
...
Add some informative comments about what's going on here.
Also, `sent_to_us_directly` and `get_missing` were doing the same thing (apart
from in `_handle_queued_pdus`, which looks like a bug), so let's get rid of
`get_missing` and use `sent_to_us_directly` consistently.
2018-09-20 13:06:55 +01:00
Amber Brown
1f3f5fcf52
Fix client IPs being broken on Python 3 ( #3908 )
2018-09-20 20:14:34 +10:00
Erik Johnston
3fd68d533b
Merge pull request #3914 from matrix-org/erikj/remove_retry_cache
...
Remove get_destination_retry_timings cache
2018-09-20 10:54:49 +01:00
Amber Brown
741571cf22
Add a way to run tests in PostgreSQL in Docker ( #3699 )
2018-09-20 18:12:45 +10:00
Amber Brown
aeca5a5ed5
Add a regression test for logging on failed connections ( #3912 )
2018-09-20 16:28:18 +10:00
Richard van der Hoff
642199570c
Improve the logging when handling a federation transaction ( #3904 )
...
Let's try to rationalise the logging that happens when we are processing an
incoming transaction, to make it easier to figure out what is going wrong when
they take ages. In particular:
- make everything start with a [room_id event_id] prefix
- make sure we log a warning when catching exceptions rather than just turning
them into other, more cryptic, exceptions.
2018-09-19 17:28:18 +01:00
Erik Johnston
ce846bb620
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/faster_typing
2018-09-19 15:08:36 +01:00
Erik Johnston
1a24d4effa
Newsfile
2018-09-19 15:03:05 +01:00
Erik Johnston
bbab6ebfd9
Fix up changelog and remove spurious comment
2018-09-19 14:45:14 +01:00
Erik Johnston
392a54128c
pep8
2018-09-19 14:37:49 +01:00
Erik Johnston
83ee5592a5
Newsfile
2018-09-19 14:22:59 +01:00
Erik Johnston
b9158ac2bf
Remove get_destination_retry_timings cache
...
Currently we rely on the master to invalidate this cache promptly.
However, after having moved most federation endpoints off of master this
no longer happens, causing outbound fedeariont to get blackholed.
Fixes #3798
2018-09-19 14:22:57 +01:00
Erik Johnston
cb016baa37
Merge pull request #3910 from matrix-org/erikj/update_timeout
...
Update to use new timeout function everywhere.
2018-09-19 11:45:11 +01:00
Erik Johnston
80d2d50f47
Fixup
2018-09-19 11:19:47 +01:00
Erik Johnston
9407bcf37a
Replace custom DeferredTimeoutError with defer.TimeoutError
2018-09-19 11:07:29 +01:00
Erik Johnston
6c48aa0256
Run canceller first to allow it to generate correct error
2018-09-19 11:07:27 +01:00
Erik Johnston
6bbe3d5732
Newsfile
2018-09-19 10:43:13 +01:00
Erik Johnston
a334e1cace
Update to use new timeout function everywhere.
...
The existing deferred timeout helper function (and the one into twisted)
suffer from a bug when a deferred's canceller throws an exception, #3842 .
The new helper function doesn't suffer from this problem.
2018-09-19 10:39:40 +01:00
Richard van der Hoff
05b9937cd7
update changelog for #3909
2018-09-19 09:17:54 +01:00
Amber Brown
47c02e6332
Merge pull request #3909 from turt2live/travis/fix-logging-1
...
Fix matrixfederationclient.py logging: Destination is a string
2018-09-19 18:14:47 +10:00
Amber Brown
3f0d8e6b09
Remove documentation referencing Cygwin ( #3873 )
2018-09-19 18:14:30 +10:00
Amber Brown
3d6b24fb1b
Merge pull request #3907 from matrix-org/rav/set_sni_to_server_name
...
Set SNI to the server_name, not whatever was in the SRV record
2018-09-19 17:59:33 +10:00
Amber Brown
f773ecbd61
Merge pull request #3903 from matrix-org/rav/increase_get_missing_events_timeout
...
Bump timeout on get_missing_events request
2018-09-19 17:57:48 +10:00
Travis Ralston
13b31a9baf
Changelog
2018-09-18 15:30:25 -06:00
Travis Ralston
35aec19f0a
Destination is a string
2018-09-18 15:29:30 -06:00
Richard van der Hoff
38ead946a9
Merge remote-tracking branch 'origin/develop' into neilj/fix_room_invite_mail_links
2018-09-18 19:02:45 +01:00
Richard van der Hoff
a219ce8726
Use directory server for room joins ( #3899 )
...
When we do a join, always try the server we used for the alias lookup first.
Fixes #2418
2018-09-18 18:27:37 +01:00
Richard van der Hoff
31c15dcb80
Refactor matrixfederationclient to fix logging ( #3906 )
...
We want to wait until we have read the response body before we log the request
as complete, otherwise a confusing thing happens where the request appears to
have completed, but we later fail it.
To do this, we factor the salient details of a request out to a separate
object, which can then keep track of the txn_id, so that it can be logged.
2018-09-18 18:17:15 +01:00
Amber Brown
c600886d47
Merge pull request #3894 from matrix-org/hs/phone_home_py_version
...
Add python_version phone home stat
2018-09-19 02:40:04 +10:00
Richard van der Hoff
edabc18938
changelog
2018-09-18 17:04:20 +01:00
Richard van der Hoff
b3097396e7
Set SNI to the server_name, not whatever was in the SRV record
...
Fixes #3843
2018-09-18 17:01:12 +01:00
Richard van der Hoff
8565d9a9fe
changelog
2018-09-18 15:05:26 +01:00
Richard van der Hoff
550007cb0e
Bump timeout on get_missing_events request
2018-09-18 15:02:51 +01:00
Richard van der Hoff
286d6930b7
Merge pull request #3879 from matrix-org/matthew/fix-autojoin
...
don't ratelimit autojoins
2018-09-18 13:07:01 +01:00
Richard van der Hoff
892432c818
Merge pull request #3882 from SimmyD/max_upload_docker_var
...
Add variable for changing the max upload size in Docker container
2018-09-18 13:05:09 +01:00
Richard van der Hoff
1e09a1d48a
Merge pull request #3889 from matrix-org/rav/404_on_remove_unknown_alias
...
Return a 404 when deleting unknown room alias
2018-09-18 12:59:30 +01:00
Richard van der Hoff
ad95ec12ca
Merge pull request #3895 from matrix-org/rav/decode_bytes_in_metrics
...
Fix more b'abcd' noise in metrics
2018-09-18 12:58:49 +01:00
Richard van der Hoff
1f4296efcf
Merge pull request #3897 from aaronraimist/synaspse-typo
...
Fix typo in README, synaspse -> synapse
2018-09-18 11:37:09 +01:00
Aaron Raimist
505abb38f0
Add changelog
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2018-09-17 22:07:19 -05:00
Aaron Raimist
4ecdf73fc7
Fix typo in README, synaspse -> synapse
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2018-09-17 22:05:23 -05:00
Will Hunt
2b41f2ed76
Create 3894.feature
2018-09-17 17:48:48 +01:00
Will Hunt
5baa087312
typo
2018-09-17 17:37:56 +01:00
Will Hunt
b58714789f
make pip happy?
2018-09-17 17:35:54 +01:00
Richard van der Hoff
06f2dbbb5d
changelog
2018-09-17 17:18:26 +01:00
Richard van der Hoff
ac80cb08fe
Fix more b'abcd' noise in metrics
2018-09-17 17:16:50 +01:00
Will Hunt
9a1cceeca9
Use a string for versions
2018-09-17 17:09:06 +01:00
Richard van der Hoff
c7131baefc
Merge pull request #3892 from matrix-org/rav/decode_bytes_in_request_logs
...
Fix some b'abcd' noise in logs and metrics
2018-09-17 17:07:10 +01:00
Richard van der Hoff
f75b9961c6
Reinstate missing null check
2018-09-17 16:52:02 +01:00
Will Hunt
2b39494cd5
Add python_version phone home stat
2018-09-17 16:35:18 +01:00
Richard van der Hoff
0cb7afff35
changelog
2018-09-17 16:17:25 +01:00
Richard van der Hoff
f00a9d2636
Fix some b'abcd' noise in logs and metrics
...
Python 3 compatibility: make sure that we decode some byte sequences before we
use them to create log lines and metrics labels.
2018-09-17 16:15:42 +01:00
Richard van der Hoff
c9c50284d7
README: run python_dependencies with -m
...
... to stop things which try to import `types` getting `synapse.types` instead
2018-09-17 15:58:47 +01:00
Amber Brown
1e70f1dbab
changelog
2018-09-17 22:36:56 +10:00
Amber Brown
b56ef14629
update python 3 changelog
2018-09-17 22:36:41 +10:00
Amber Brown
fe88907d04
version
2018-09-17 22:33:22 +10:00
Richard van der Hoff
c1ae6b1bce
changelog
2018-09-17 13:21:08 +01:00
Richard van der Hoff
85a43f4167
Return a 404 when deleting unknown room alias
...
As per https://github.com/matrix-org/matrix-doc/issues/1675
Fixes https://github.com/matrix-org/synapse/issues/2782
2018-09-17 13:19:00 +01:00
Amber Brown
c6363f7269
Merge pull request #3888 from matrix-org/rav/nuke_nuke_rooms
...
Remove nuke-room-from-db.sh script
2018-09-17 21:30:25 +10:00
Richard van der Hoff
2a8996b67d
changelog
2018-09-17 11:51:38 +01:00
Richard van der Hoff
e7b3b4d8c2
Remove nuke-room-from-db.sh script
...
The problem with this script is that it is largely untested, entirely
unmaintained, and running it is likely to make your synapse blow up in
exciting ways.
For example, it leaves a bunch of tables with dead values in it, like
event_to_state_groups.
Having it here sends a message that it is a supported part of
synapse, which is absolutely not the case.
2018-09-17 11:42:42 +01:00
Simon Dwyer
0e46ff6904
Adding the ability to change MAX_UPLOAD_SIZE for the docker container variables.
...
Signed-off-by: Simon Dwyer <simon@thedwyers.co >
2018-09-16 13:33:33 +10:00
Simon Dwyer
da864a92c9
Added description for "SYNAPSE_MAX_UPLOAD_SIZE" variable.
2018-09-16 13:12:57 +10:00
Simon Dwyer
f472abd792
Added description for "SYNAPSE_MAX_UPLOAD_SIZE" variable.
2018-09-16 13:12:57 +10:00
Simon Dwyer
9c749a6b61
Added 'MAX_UPLOAD_SIZE' variable and set default to "10M"
2018-09-16 13:12:57 +10:00
Matthew Hodgson
c71b93f2a4
changelog
2018-09-15 22:28:28 +01:00
Matthew Hodgson
d42d79e3c3
don't ratelimit autojoins
2018-09-15 22:27:41 +01:00
Matthew Hodgson
9d13ff4da8
missing changelog
2018-09-15 21:04:10 +01:00
Vincent Breitmoser
c8642720c9
mention libjemalloc in readme ( #3877 )
2018-09-15 21:03:27 +01:00
Erik Johnston
24efb2a70d
Fix timeout function
...
Turns out deferred.cancel sometimes throws, so we do that last to ensure
that we always do resolve the new deferred.
2018-09-15 11:38:39 +01:00
Erik Johnston
c30cfff572
Merge pull request #3875 from matrix-org/erikj/extra_timeouts
...
Add an awful secondary timeout to fix wedged requests
2018-09-14 19:56:11 +01:00
Erik Johnston
335b23a078
Newsfile
2018-09-14 19:25:58 +01:00
Erik Johnston
fcfe7a850d
Add an awful secondary timeout to fix wedged requests
...
This is an attempt to mitigate #3842 by adding yet-another-timeout
2018-09-14 19:23:07 +01:00
Matthew Hodgson
024be6cf18
don't filter membership events based on history visibility ( #3874 )
...
don't filter membership events based on history visibility
as we will already have filtered the messages in the timeline, and state events
are always visible.
and because @erikjohnston said so.
2018-09-14 18:12:52 +01:00
Erik Johnston
3e6e94fe9f
Merge pull request #3872 from matrix-org/hawkowl/timeouts-2
...
timeouts 2: electric boogaloo
2018-09-14 16:58:44 +01:00
Erik Johnston
8b3652831c
Merge pull request #3871 from matrix-org/erikj/in_flight_block_metrics
...
Add in flight real time metrics for Measure blocks
2018-09-14 16:40:31 +01:00
Amber Brown
bc9af88a2d
fix
2018-09-15 00:26:00 +10:00
Amber Brown
90f8e606e2
changelog
2018-09-15 00:23:55 +10:00
Erik Johnston
d0f6c1ce21
Remove spurious comment
2018-09-14 15:12:36 +01:00
Erik Johnston
9e2f9a7b57
Measure outbound requests
2018-09-14 15:11:26 +01:00
Erik Johnston
941ac0f085
Newsfile
2018-09-14 15:08:37 +01:00
Erik Johnston
f6e82dcddb
Tests
2018-09-14 15:08:37 +01:00
Erik Johnston
0a81038ea0
Add in flight real time metrics for Measure blocks
2018-09-14 15:08:37 +01:00
Travis Ralston
ad9198cc34
Merge pull request #3860 from matrix-org/travis/typo-1
...
Fix minor typo in exception
2018-09-13 16:32:48 -06:00
Neil Johnson
bef1d6f3bf
towncrier
2018-09-13 22:53:35 +01:00
Neil Johnson
7de1989ea2
fix link for case that config.email_riot_base_url is set
2018-09-13 22:43:50 +01:00
Travis Ralston
984db8bb08
Create 3860.misc
2018-09-13 12:06:04 -06:00
Amber Brown
c971aa7b9d
fix
2018-09-14 03:57:02 +10:00
Amber Brown
8f08d848f5
fix
2018-09-14 03:53:56 +10:00
Travis Ralston
f1a7264663
Fix minor typo in exception
2018-09-13 11:51:12 -06:00
Amber Brown
7c33ab76da
redact better
2018-09-14 03:45:34 +10:00
Amber Brown
63755fa4c2
we do that higher up
2018-09-14 03:21:47 +10:00
Amber Brown
73884ebac5
Merge remote-tracking branch 'origin/develop' into hawkowl/timeouts-2
2018-09-14 03:11:25 +10:00
Amber Brown
7c27c4d51c
merge ( #3576 )
2018-09-14 03:11:11 +10:00
Amber Brown
1c3f4d9ca5
buffer?
2018-09-14 03:09:13 +10:00
David Baker
bc74925c5b
WIP e2e key backups
...
Continues from uhoreg's branch
This just fixed the errcode on /room_keys/version if no backup and
updates the schema delta to be on the latest so it gets run
2018-09-13 17:02:59 +01:00
Erik Johnston
6c0f8d9d50
Merge pull request #3856 from matrix-org/erikj/speed_up_purge
...
Make purge history slightly faster
2018-09-13 16:14:46 +01:00
Erik Johnston
ed5331a627
comment
2018-09-13 16:10:56 +01:00
Amber Brown
cb64fe2cb7
Merge pull request #3859 from matrix-org/erikj/add_iterkeys
...
Fix handling of redacted events from federation
2018-09-14 01:06:44 +10:00
Erik Johnston
13193a6e2b
Newsfile
2018-09-13 15:46:45 +01:00
Amber Brown
3126b88d35
fix circleci merged builds ( #3858 )
...
* fix
* changelog
2018-09-14 00:44:31 +10:00
Erik Johnston
89a76d1889
Fix handling of redacted events from federation
...
If we receive an event that doesn't pass their content hash check (e.g.
due to already being redacted) then we hit a bug which causes an
exception to be raised, which then promplty stops the event (and
request) from being processed.
This effects all sorts of federation APIs, including joining rooms with
a redacted state event.
2018-09-13 15:44:12 +01:00
Amber Brown
bfa0b759e0
Attempt to figure out what's going on with timeouts ( #3857 )
2018-09-14 00:15:51 +10:00
Erik Johnston
9cbd0094f0
pep8
2018-09-13 15:15:35 +01:00
Erik Johnston
9dbe38ea7d
Create indices after insertion
2018-09-13 15:05:52 +01:00
Erik Johnston
93139a1fb8
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/speed_up_purge
2018-09-13 12:57:09 +01:00
Erik Johnston
e7cd7cb0f0
Newsfile
2018-09-13 12:55:40 +01:00
Erik Johnston
c857f5ef9b
Make purge history slightly faster
...
Don't pull out events that are outliers and won't be deleted, as nothing
should happen to them.
2018-09-13 12:48:10 +01:00
Amber Brown
b7d2fb5eb9
Remove some superfluous logging ( #3855 )
2018-09-13 19:59:32 +10:00
Neil Johnson
f30a303590
Merge pull request #3846 from matrix-org/neilj/expose-registered-users
...
expose number of real reserved users
2018-09-12 17:14:04 +01:00
Matthew Hodgson
2ac1abbc7e
show heroes if a room has a 'deleted' name/canonical_alias ( #3851 )
2018-09-12 17:11:05 +01:00
Erik Johnston
fa0d464fa4
Merge pull request #3853 from matrix-org/erikj/log_outbound_each_time
...
Log outbound requests when we retry
2018-09-12 16:55:40 +01:00
Matthew Hodgson
0403cf0783
argh pep8
2018-09-12 16:54:28 +01:00
Matthew Hodgson
0e200e366d
correctly log gappy sync metrics
2018-09-12 16:47:20 +01:00
Matthew Hodgson
11bfc2af1c
fix logline
2018-09-12 16:45:42 +01:00
Erik Johnston
3db016b641
Newsfile
2018-09-12 16:25:18 +01:00
Neil Johnson
8decd6233d
improve naming
2018-09-12 16:22:15 +01:00
Erik Johnston
8c5b84441b
Log outbound requests when we retry
2018-09-12 16:22:14 +01:00
Erik Johnston
54f8616d2c
Merge pull request #3841 from matrix-org/erikj/manhole_key_length
...
Change the manhole SSH key to have more bits
2018-09-12 14:33:39 +01:00
Amber Brown
65cd8ccc79
Add JUnit summaries to CircleCI as well as merged runs ( #3704 )
2018-09-12 23:29:21 +10:00
Amber Brown
7ca097f77e
Port federation/ to py3 ( #3847 )
2018-09-12 23:23:32 +10:00
Neil Johnson
5cea4e16c7
towncrier
2018-09-12 12:03:31 +01:00
Neil Johnson
0ddf486724
expose number of real reserved users
2018-09-12 11:58:52 +01:00
Amber Brown
546aee7e52
Merge pull request #3835 from krombel/fix_3821
...
fix VOIP crashes under Python 3
2018-09-12 20:44:18 +10:00
Amber Brown
33716c4aea
Merge pull request #3826 from matrix-org/rav/logging_for_keyring
...
add some logging for the keyring queue
2018-09-12 20:43:47 +10:00
Amber Brown
bc635026c5
Merge pull request #3824 from matrix-org/rav/fix_jwt_import
...
Fix jwt import check
2018-09-12 20:41:57 +10:00
Amber Brown
02aa41809b
Port rest/ to Python 3 ( #3823 )
2018-09-12 20:41:31 +10:00
Amber Brown
8fd93b5eea
Port crypto/ to Python 3 ( #3822 )
2018-09-12 20:16:31 +10:00
Amber Brown
4073f73edc
Merge pull request #3845 from matrix-org/erikj/timeout_reads
...
Timeout reading body for outbound HTTP requests
2018-09-12 20:16:08 +10:00
Erik Johnston
649c647955
Newsfile
2018-09-12 11:03:42 +01:00
Erik Johnston
4084a774a8
Timeout reading body for outbound HTTP requests
2018-09-12 10:10:20 +01:00
Matthew Hodgson
b041115415
Speed up lazy loading ( #3827 )
...
* speed up room summaries by pulling their data from room_memberships rather than room state
* disable LL for incr syncs, and log incr sync stats (#3840 )
2018-09-12 00:50:39 +01:00
Luca Weiss
f8825748dd
changelog.d entry somehow got lost
2018-09-11 12:56:31 +02:00
Luca Weiss
a40802bcbc
Fix build of Docker image with docker-compose
...
... and fix a typo
2018-09-11 12:11:22 +02:00
Erik Johnston
9a68778ac2
Newsfile
2018-09-11 10:44:40 +01:00
Erik Johnston
9e05c8d309
Change the manhole SSH key to have more bits
...
Newer versions of openssh client refuse to connect to the old key due to
its length.
2018-09-11 10:42:10 +01:00
Erik Johnston
037a06e8f0
Merge pull request #3834 from mvgorcum/develop
...
Remove build requirements after building docker image
2018-09-10 16:53:25 +01:00
Jan Christian Grünhage
af10fa6536
add runtime dependencies
2018-09-10 17:39:49 +02:00
Mathijs van Gorcum
e957428a15
Newsfile
2018-09-10 14:53:05 +00:00
Mathijs van Gorcum
e586916cda
Move COPY before RUN and merge RUNs
2018-09-10 14:02:42 +00:00
Krombel
3572a206d3
add changelog
2018-09-10 14:33:08 +02:00
Krombel
7bc22539ff
fix VOIP crashes under Python 3 ( #3821 )
2018-09-10 14:30:08 +02:00
Mathijs van Gorcum
b7e7712f07
Remove build requirements after building
2018-09-10 12:21:42 +00:00
Richard van der Hoff
1e4c7fff5f
changelog
2018-09-07 16:37:30 +01:00
Amber Brown
9a5ea511b5
Merge pull request #3810 from matrix-org/erikj/send_tags_down_sync_on_join
...
Send existing room tags down sync on join
2018-09-07 23:28:42 +10:00
Richard van der Hoff
e33a538af3
Merge pull request #3783 from cwmke/develop
...
Add apache vhost config to Readme
2018-09-07 14:25:23 +01:00
Richard van der Hoff
edda9f5cac
changelog
2018-09-07 14:23:35 +01:00
Richard van der Hoff
b8ad756bd0
Fix jwt import check
...
This handy code attempted to check that we could import jwt, but utterly failed
to check it was the right jwt.
Fixes https://github.com/matrix-org/synapse/issues/3793
2018-09-07 14:20:54 +01:00
Amber Brown
771d213ac5
Merge branch 'master' into develop
2018-09-07 21:45:38 +10:00
Amber Brown
b60749a1ec
changelog
2018-09-07 21:41:57 +10:00
Amber Brown
6febd8e8f7
version
2018-09-07 21:40:57 +10:00
Richard van der Hoff
cd7ef43872
clearer logging when things fail, too
2018-09-06 23:56:47 +01:00
Richard van der Hoff
806964b5de
add some logging for the keyring queue
...
why is it so damn slow?
2018-09-06 18:51:06 +01:00
Amber Brown
52ec6e9dfa
Port tests/ to Python 3 ( #3808 )
2018-09-07 02:58:18 +10:00
Neil Johnson
c5440b2ca0
Merge pull request #3800 from matrix-org/neilj/remove-guests-from-mau-count
...
guest users should not be part of mau total
2018-09-06 17:45:55 +01:00
Neil Johnson
84a750e0c3
ensure guests never enter mau list
2018-09-06 17:22:53 +01:00
Erik Johnston
7298efd361
Newsfile
2018-09-06 17:13:33 +01:00
Erik Johnston
f60c9e2a01
Don't send empty tags list down sync
2018-09-06 17:01:41 +01:00
Erik Johnston
7baf66ef5d
Send existing room tags down sync on join
...
When a user joined a room any existing tags were not sent down the sync
stream. Ordinarily this isn't a problem because the user needs to be in
the room to have set tags in it, however synapse will sometimes add tags
for a user to a room, e.g. for server notices, which need to come down
sync.
2018-09-06 16:46:51 +01:00
Hubert Chathi
3801b8aa03
try to make flake8 and isort happy
2018-09-06 11:35:19 -04:00
Amber Brown
654324eded
Merge pull request #3805 from matrix-org/erikj/limit_transaction_pdus_edus
...
Limit the number of PDUs/EDUs per fedreation transaction
2018-09-07 01:33:31 +10:00
Amber Brown
1d371fc5b3
Merge pull request #3806 from matrix-org/erikj/limit_postgres_travis
...
Only start postgres instance for postgres tests on Travis CI
2018-09-07 01:06:21 +10:00
Erik Johnston
b07a2cbee9
Spelling
2018-09-06 15:53:02 +01:00
Amber Brown
70fd75cd1d
Merge pull request #3788 from matrix-org/erikj/remove_conn_id
...
Remove conn_id from repl prometheus metrics
2018-09-07 00:48:19 +10:00
Erik Johnston
5d848992bf
Newsfile
2018-09-06 15:28:46 +01:00
Erik Johnston
3b4223aa23
Only start postgres instance for postgres tests on Travis CI
2018-09-06 15:27:54 +01:00
Erik Johnston
28f5bfdcf7
Newsfile
2018-09-06 15:25:58 +01:00
Amber Brown
ee7c8bd2b5
Merge pull request #3795 from matrix-org/erikj/faster_sync_state
...
User iter* during sync state calculations
2018-09-07 00:24:43 +10:00
Erik Johnston
6707a3212c
Limit the number of PDUs/EDUs per fedreation transaction
2018-09-06 15:23:55 +01:00
Amber Brown
135f3b4390
Merge pull request #3804 from matrix-org/rav/fix_openssl_dep
...
bump dep on pyopenssl to 16.x
2018-09-07 00:23:39 +10:00
Amber Brown
2608ebc04c
Port handlers/ to Python 3 ( #3803 )
2018-09-07 00:22:23 +10:00
Erik Johnston
599f65bb89
Merge branch 'master' of github.com:matrix-org/synapse into release-v0.33.4
2018-09-06 14:13:58 +01:00
Erik Johnston
417e7077aa
Bump version and changelog
2018-09-06 14:08:55 +01:00
Erik Johnston
d64b24dfe6
Merge tag 'v0.33.3.1' into release-v0.33.4
...
Synapse 0.33.3.1 (2018-09-06)
=============================
SECURITY FIXES
--------------
- Fix an issue where event signatures were not always correctly validated ([\#3796](https://github.com/matrix-org/synapse/issues/3796 ))
- Fix an issue where server_acls could be circumvented for incoming events ([\#3796](https://github.com/matrix-org/synapse/issues/3796 ))
Internal Changes
----------------
- Unignore synctl in .dockerignore to fix docker builds ([\#3802](https://github.com/matrix-org/synapse/issues/3802 ))
2018-09-06 14:08:33 +01:00
Richard van der Hoff
4f8baab0c4
Merge branch 'master' into develop
2018-09-06 13:05:22 +01:00
Richard van der Hoff
b3c2ebba32
changelog
2018-09-06 12:55:17 +01:00
Richard van der Hoff
625542878d
bump dep on pyopenssl to 16.x
2018-09-06 12:53:15 +01:00
Richard van der Hoff
2fd17b5ad1
Merge tag 'v0.33.3.1'
...
Synapse 0.33.3.1 (2018-09-06)
=============================
SECURITY FIXES
--------------
- Fix an issue where event signatures were not always correctly validated ([\#3796](https://github.com/matrix-org/synapse/issues/3796 ))
- Fix an issue where server_acls could be circumvented for incoming events ([\#3796](https://github.com/matrix-org/synapse/issues/3796 ))
Internal Changes
----------------
- Unignore synctl in .dockerignore to fix docker builds ([\#3802](https://github.com/matrix-org/synapse/issues/3802 ))
2018-09-06 12:31:35 +01:00
Amber Brown
10587f7f32
Merge pull request #3802 from matrix-org/jcgruenhage/docker-unignore-synctl
...
remove synctl from .dockerignore
2018-09-06 19:47:33 +10:00
Richard van der Hoff
80189ed27c
prepare v0.33.3.1
2018-09-06 10:26:23 +01:00
Jan Christian Grünhage
0cd7b209e2
Create 3802.misc
2018-09-06 10:24:59 +01:00
Jan Christian Grünhage
78d1042c10
remove synctl from .dockerignore
2018-09-06 10:24:59 +01:00
Jan Christian Grünhage
af3125226d
Create 3802.misc
2018-09-06 10:46:00 +02:00
Jan Christian Grünhage
9c8cd855da
remove synctl from .dockerignore
2018-09-06 10:39:55 +02:00
Neil Johnson
92657be7d0
towncrier
2018-09-05 22:33:45 +01:00
Neil Johnson
61b05727fa
guest users should not be part of mau total
2018-09-05 22:30:36 +01:00
Richard van der Hoff
dfba1d843d
Merge pull request #3790 from matrix-org/rav/respect_event_format_in_filter
...
Implement 'event_format' filter param in /sync
2018-09-05 16:24:14 +01:00
Erik Johnston
2254790ae4
Newsfile
2018-09-05 16:21:18 +01:00
Erik Johnston
7419764351
User iter* during sync state calculations
2018-09-05 16:19:50 +01:00
Amber Brown
2d2828dcbc
Port http/ to Python 3 ( #3771 )
2018-09-06 00:10:47 +10:00
Richard van der Hoff
c127c8d042
Fix origin handling for pushed transactions
...
Use the actual origin for push transactions, rather than whatever the remote
server claimed.
2018-09-05 13:08:07 +01:00
Richard van der Hoff
804dd41e18
Check that signatures on events are valid
...
We should check that both the sender's server, and the server which created the
event_id (which may be different from whatever the remote server has told us
the origin is), have signed the event.
2018-09-05 13:08:07 +01:00
Erik Johnston
5f02017aea
Improve performance of getting typing updates for replication
...
Fetching the list of all new typing notifications involved iterating
over all rooms and comparing their serial. Lets move to using a stream
change cache, like we do for other streams.
2018-09-05 10:20:40 +01:00
Richard van der Hoff
c91bd295f5
changelog
2018-09-04 15:23:19 +01:00
Richard van der Hoff
87c18d12ee
Implement 'event_format' filter param in /sync
...
This has been specced and part-implemented; let's implement it for /sync (but
no other endpoints yet :/).
2018-09-04 15:20:09 +01:00
Neil Johnson
a6cf7d9d9a
Merge pull request #3789 from matrix-org/neilj/improve_threepid_error_strings
...
improve human readable error messages
2018-09-04 13:16:00 +00:00
Amber Brown
7e9ced4178
version and towncrier
2018-09-04 21:12:04 +10:00
Neil Johnson
70fc599ede
towncrier
2018-09-04 12:08:27 +01:00
Neil Johnson
bae37cd811
improve human readable error message
2018-09-04 12:07:00 +01:00
Neil Johnson
c42f7fd7b9
improve human readable error messages
2018-09-04 12:03:17 +01:00
Erik Johnston
3e242dc149
Remove conn_id
2018-09-04 11:45:52 +01:00
Erik Johnston
87b111f96a
Newsfile
2018-09-03 17:26:15 +01:00
Erik Johnston
b13836da7f
Remove conn_id from repl prometheus metrics
...
`conn_id` gets set to a random string, and so we end up filling up
prometheus with tonnes of data series, which is bad.
2018-09-03 17:22:49 +01:00
Amber Brown
77055dba92
Fix tests on postgresql ( #3740 )
2018-09-04 02:21:48 +10:00
Erik Johnston
567363e497
Merge pull request #3737 from matrix-org/erikj/remove_redundant_state_func
...
Remove unnecessary resolve_events_with_state_map
2018-09-03 16:19:41 +01:00
Erik Johnston
06ee2b7cc5
Newsfile
2018-09-03 15:43:01 +01:00
Amber Brown
30cf40ff30
Merge pull request #3378 from NickEckardt/develop
...
matrix-synapse-auto-deploy is no longer maintained.
2018-09-03 22:47:23 +10:00
Amber Brown
905f8de673
Create 3378.misc
2018-09-03 22:17:06 +10:00
Amber Brown
4fc4b881c5
Merge branch 'develop' into develop
2018-09-03 21:08:35 +10:00
Colin W
81942c109d
Remove end '/'s
2018-09-02 23:28:03 -05:00
Colin W
a395f1ddb3
Update readme on develop branch
2018-09-02 17:30:07 -05:00
Neil Johnson
99178f8602
Merge pull request #3777 from matrix-org/neilj/fix_register_user_registration
...
fix bug where preserved threepid user comes to sign up and server is …
2018-08-31 16:31:48 +00:00
Neil Johnson
301cb60d0b
assert rather than warn
2018-08-31 17:29:35 +01:00
Neil Johnson
0b01281e77
move threepid checker to config, add missing yields
2018-08-31 17:11:11 +01:00
Neil Johnson
e8e540630e
fix reference to is_threepid_reserved
2018-08-31 16:09:15 +01:00
Neil Johnson
a796bdd35e
typo
2018-08-31 15:57:33 +01:00
Neil Johnson
09f3cf1a7e
ensure post registration auth checks do not fail erroneously
2018-08-31 15:42:51 +01:00
Neil Johnson
3d6aa06577
news fragemnt
2018-08-31 10:56:37 +01:00
Neil Johnson
ea068d6f3c
fix bug where preserved threepid user comes to sign up and server is mau blocked
2018-08-31 10:49:14 +01:00
Amber Brown
14e4d4f4bf
Port storage/ to Python 3 ( #3725 )
2018-08-31 00:19:58 +10:00
Richard van der Hoff
475253a88e
Merge pull request #3764 from matrix-org/rav/close_db_conn_after_init
...
Make sure that we close db connections opened during init
2018-08-30 10:47:27 +01:00
Erik Johnston
7f0399586d
Merge pull request #3768 from krombel/fix_3445
...
fix #3445 - do not use itervalues() on SortedDict()
2018-08-29 16:29:57 +01:00
Krombel
8c0c51ecb3
changelog
2018-08-29 16:49:26 +02:00
Krombel
79a8a347a6
fix #3445
...
itervalues(d) calls d.itervalues() [PY2] and d.values() [PY3]
but SortedDict only implements d.values()
2018-08-29 16:28:25 +02:00
Amber Brown
82276a18d1
Update CONTRIBUTING to clarify miscs & Markdown ( #3730 )
2018-08-29 19:06:59 +10:00
Matthew Hodgson
b1580f50fe
don't return non-LL-member state in incremental sync state blocks ( #3760 )
...
don't return non-LL-member state in incremental sync state blocks
2018-08-28 23:25:58 +01:00
Richard van der Hoff
414fa36f3e
Fix up tests
2018-08-28 17:21:05 +01:00
Richard van der Hoff
32eb1dedd2
use abc.abstractproperty
...
This gives clearer messages when someone gets it wrong
2018-08-28 17:10:43 +01:00
Richard van der Hoff
71990b3cae
changelog
2018-08-28 13:42:20 +01:00
Richard van der Hoff
0b07f02e19
Make sure that we close db connections opened during init
...
We should explicitly close any db connections we open, because failing to do so
can block other transactions as per
https://github.com/matrix-org/synapse/issues/3682 .
Let's also try to factor out some of the boilerplate by having server classes
define their datastore class rather than duplicating the whole of `setup`.
2018-08-28 13:39:49 +01:00
Hubert Chathi
16a31c6fce
update to newer Synapse APIs
2018-08-24 22:51:25 -04:00
Erik Johnston
9fbaed325f
Merge pull request #3758 from matrix-org/erikj/admin_contact
...
Change admin_uri to admin_contact in config and errors
2018-08-24 17:15:32 +01:00
Erik Johnston
9db2476991
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/admin_contact
2018-08-24 17:00:37 +01:00
Erik Johnston
69f7f1418f
Newsfile
2018-08-24 16:54:06 +01:00
Erik Johnston
48b04c4a4c
Merge pull request #3756 from matrix-org/erikj/fix_tags_server_notices
...
Fix checking if service notice room is already tagged
2018-08-24 16:53:11 +01:00
Erik Johnston
08abe8e13c
Newsfile
2018-08-24 16:52:52 +01:00
Erik Johnston
05077e06fa
Change admin_uri to admin_contact in config and errors
2018-08-24 16:51:27 +01:00
Hubert Chathi
83caead95a
Merge branch 'develop' into e2e_backups
2018-08-24 11:44:26 -04:00
Erik Johnston
01a5a8b9e3
Fix checking if service notice room is already tagged
...
This manifested in synapse repeatedly setting the tag for the room
2018-08-24 16:22:37 +01:00
Erik Johnston
897d976c1e
Merge pull request #3755 from matrix-org/erikj/fix_server_notice_tags
...
Fix up tagging server notice rooms.
2018-08-24 15:04:41 +01:00
Erik Johnston
45fc0ead10
Newsfile
2018-08-24 15:04:29 +01:00
Erik Johnston
cdd24449ee
Ensure we wake up /sync when we add tag to notice room
2018-08-24 14:50:03 +01:00
Erik Johnston
14d49c51db
Make content of tag an empty object rather than null
2018-08-24 14:44:16 +01:00
Erik Johnston
84b4e76fed
Merge pull request #3754 from matrix-org/erikj/fix_whitelist
...
Allow federation_domain_whitelist to be emtpy list
2018-08-24 12:23:39 +01:00
Erik Johnston
c780d84d66
Newsfile
2018-08-24 12:13:50 +01:00
Erik Johnston
1d67b13674
Fix bug when federation_domain_whitelist is an emtpy list
...
Outbound federation were incorrectly allowed when the config option was
set to an empty list
2018-08-24 12:13:12 +01:00
Erik Johnston
92d50e3c2a
Merge pull request #3753 from matrix-org/erikj/fix_no_server_noticse
...
Fix bug where we broke sync when using limit_usage_by_mau
2018-08-24 11:56:08 +01:00
Richard van der Hoff
e94cdbaecf
Merge pull request #3751 from matrix-org/rav/twisted_17
...
Pin to twisted 17.1 or later
2018-08-24 11:55:52 +01:00
Erik Johnston
9b1bc593c5
Newsfile
2018-08-24 11:36:39 +01:00
Erik Johnston
7f147d623b
Fix bug where we broke sync when using limit_usage_by_mau
...
We assumed that we always had service notices configured, but that is
not always true
2018-08-24 11:33:50 +01:00
Erik Johnston
15e8dd2ccc
Merge pull request #3749 from matrix-org/erikj/add_trial_users
...
Implement trial users
2018-08-24 10:10:58 +01:00
Richard van der Hoff
05fe8a6c1c
changelog
2018-08-24 10:04:52 +01:00
Richard van der Hoff
f584d6108f
Pin to twisted 17.1 or later
...
Fixes https://github.com/matrix-org/synapse/issues/3741 .
2018-08-24 10:02:31 +01:00
Erik Johnston
28d7b546cb
Newsfile
2018-08-23 19:18:52 +01:00
Erik Johnston
f2cbbda956
Unit tests
2018-08-23 19:17:19 +01:00
Erik Johnston
cd77270a66
Implement trail users
2018-08-23 19:17:19 +01:00
Erik Johnston
242a0483eb
Merge pull request #3747 from matrix-org/erikj/fix_multiple_sends_notice
...
Fix bug where we resent "limit exceeded" server notices
2018-08-23 18:10:08 +01:00
Erik Johnston
60cf1c6e16
Newsfile
2018-08-23 16:34:32 +01:00
Erik Johnston
7e6e588e60
Fix bug where we resent "limit exceeded" server notices
...
This was due to a bug where we mutated a cached event's contents
2018-08-23 16:21:20 +01:00
Travis Ralston
1ca2744621
Merge pull request #3734 from matrix-org/travis/worker-docs
...
Reference that the federation_reader needs the HTTP replication port set
2018-08-23 07:51:46 -06:00
Erik Johnston
dddb5aa7bb
Merge pull request #3746 from matrix-org/erikj/mau_fixups
...
Fix MAU invalidation due to missing yield
2018-08-23 10:55:14 +01:00
Erik Johnston
4eb8408ed2
Newsfile
2018-08-23 10:46:13 +01:00
Erik Johnston
c5842dff1a
Actually run the tests
2018-08-23 10:35:54 +01:00
Erik Johnston
7a0da69eee
Add missing yield
2018-08-23 10:28:12 +01:00
Erik Johnston
a5806aba27
Merge pull request #3680 from matrix-org/neilj/server_notices_on_blocking
...
server notices on resource limit blocking
2018-08-22 17:18:28 +01:00
Erik Johnston
fd2dbf1836
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/server_notices_on_blocking
2018-08-22 17:06:10 +01:00
Erik Johnston
9643a6f7f2
Update notice format
2018-08-22 17:00:29 +01:00
Erik Johnston
5c261107c9
Remove unnecessary resolve_events_with_state_map
...
We only ever used the synchronous resolve_events_with_state_map in one
place, which is trivial to replace with the async version.
2018-08-22 15:41:15 +01:00
Richard van der Hoff
c7181dcc6c
Merge branch 'master' into develop
2018-08-22 14:37:11 +01:00
Richard van der Hoff
74854a9719
Use recaptcha_ajax.js directly from Google
...
This was originally done in commit c75b71a397 ,
but got reverted on this branch due to the PR (#3677 ) being based on the wrong
branch.
We're ready to merge this to master now, so let's make it match
release-v0.33.3.
2018-08-22 14:30:49 +01:00
Richard van der Hoff
48fec67536
Merge tag 'v0.33.3'
...
Features
--------
- Add support for the SNI extension to federation TLS connections. Thanks to @vojeroen! ([\#3439](https://github.com/matrix-org/synapse/issues/3439 ))
- Add /_media/r0/config ([\#3184](https://github.com/matrix-org/synapse/issues/3184 ))
- speed up /members API and add `at` and `membership` params as per MSC1227 ([\#3568](https://github.com/matrix-org/synapse/issues/3568 ))
- implement `summary` block in /sync response as per MSC688 ([\#3574](https://github.com/matrix-org/synapse/issues/3574 ))
- Add lazy-loading support to /messages as per MSC1227 ([\#3589](https://github.com/matrix-org/synapse/issues/3589 ))
- Add ability to limit number of monthly active users on the server ([\#3633](https://github.com/matrix-org/synapse/issues/3633 ))
- Support more federation endpoints on workers ([\#3653](https://github.com/matrix-org/synapse/issues/3653 ))
- Basic support for room versioning ([\#3654](https://github.com/matrix-org/synapse/issues/3654 ))
- Ability to disable client/server Synapse via conf toggle ([\#3655](https://github.com/matrix-org/synapse/issues/3655 ))
- Ability to whitelist specific threepids against monthly active user limiting ([\#3662](https://github.com/matrix-org/synapse/issues/3662 ))
- Add some metrics for the appservice and federation event sending loops ([\#3664](https://github.com/matrix-org/synapse/issues/3664 ))
- Where server is disabled, block ability for locked out users to read new messages ([\#3670](https://github.com/matrix-org/synapse/issues/3670 ))
- set admin uri via config, to be used in error messages where the user should contact the administrator ([\#3687](https://github.com/matrix-org/synapse/issues/3687 ))
- Synapse's presence functionality can now be disabled with the "use_presence" configuration option. ([\#3694](https://github.com/matrix-org/synapse/issues/3694 ))
- For resource limit blocked users, prevent writing into rooms ([\#3708](https://github.com/matrix-org/synapse/issues/3708 ))
Bugfixes
--------
- Fix occasional glitches in the synapse_event_persisted_position metric ([\#3658](https://github.com/matrix-org/synapse/issues/3658 ))
- Fix bug on deleting 3pid when using identity servers that don't support unbind API ([\#3661](https://github.com/matrix-org/synapse/issues/3661 ))
- Make the tests pass on Twisted < 18.7.0 ([\#3676](https://github.com/matrix-org/synapse/issues/3676 ))
- Don’t ship recaptcha_ajax.js, use it directly from Google ([\#3677](https://github.com/matrix-org/synapse/issues/3677 ))
- Fixes test_reap_monthly_active_users so it passes under postgres ([\#3681](https://github.com/matrix-org/synapse/issues/3681 ))
- Fix mau blocking calulation bug on login ([\#3689](https://github.com/matrix-org/synapse/issues/3689 ))
- Fix missing yield in synapse.storage.monthly_active_users.initialise_reserved_users ([\#3692](https://github.com/matrix-org/synapse/issues/3692 ))
- Improve HTTP request logging to include all requests ([\#3700](https://github.com/matrix-org/synapse/issues/3700 ))
- Avoid timing out requests while we are streaming back the response ([\#3701](https://github.com/matrix-org/synapse/issues/3701 ))
- Support more federation endpoints on workers ([\#3705](https://github.com/matrix-org/synapse/issues/3705 ), [\#3713](https://github.com/matrix-org/synapse/issues/3713 ))
- Fix "Starting db txn 'get_all_updated_receipts' from sentinel context" warning ([\#3710](https://github.com/matrix-org/synapse/issues/3710 ))
- Fix bug where `state_cache` cache factor ignored environment variables ([\#3719](https://github.com/matrix-org/synapse/issues/3719 ))
- Fix bug in v0.33.3rc1 which caused infinite loops and OOMs ([\#3723](https://github.com/matrix-org/synapse/issues/3723 ))
- Fix bug introduced in v0.33.3rc1 which made the ToS give a 500 error ([\#3732](https://github.com/matrix-org/synapse/issues/3732 ))
Deprecations and Removals
-------------------------
- The Shared-Secret registration method of the legacy v1/register REST endpoint has been removed. For a replacement, please see [the admin/register API documentation](https://github.com/matrix-org/synapse/blob/master/docs/admin_api/register_api.rst ). ([\#3703](https://github.com/matrix-org/synapse/issues/3703 ))
Internal Changes
----------------
- The test suite now can run under PostgreSQL. ([\#3423](https://github.com/matrix-org/synapse/issues/3423 ))
- Refactor HTTP replication endpoints to reduce code duplication ([\#3632](https://github.com/matrix-org/synapse/issues/3632 ))
- Tests now correctly execute on Python 3. ([\#3647](https://github.com/matrix-org/synapse/issues/3647 ))
- Sytests can now be run inside a Docker container. ([\#3660](https://github.com/matrix-org/synapse/issues/3660 ))
- Port over enough to Python 3 to allow the sytests to start. ([\#3668](https://github.com/matrix-org/synapse/issues/3668 ))
- Update docker base image from alpine 3.7 to 3.8. ([\#3669](https://github.com/matrix-org/synapse/issues/3669 ))
- Rename synapse.util.async to synapse.util.async_helpers to mitigate async becoming a keyword on Python 3.7. ([\#3678](https://github.com/matrix-org/synapse/issues/3678 ))
- Synapse's tests are now formatted with the black autoformatter. ([\#3679](https://github.com/matrix-org/synapse/issues/3679 ))
- Implemented a new testing base class to reduce test boilerplate. ([\#3684](https://github.com/matrix-org/synapse/issues/3684 ))
- Rename MAU prometheus metrics ([\#3690](https://github.com/matrix-org/synapse/issues/3690 ))
- add new error type ResourceLimit ([\#3707](https://github.com/matrix-org/synapse/issues/3707 ))
- Logcontexts for replication command handlers ([\#3709](https://github.com/matrix-org/synapse/issues/3709 ))
- Update admin register API documentation to reference a real user ID. ([\#3712](https://github.com/matrix-org/synapse/issues/3712 ))
2018-08-22 14:28:55 +01:00
Richard van der Hoff
3504982cb7
changelog for 0.33.3
2018-08-22 14:07:44 +01:00
Richard van der Hoff
4e5a4549b6
bump version to 0.33.3
2018-08-22 14:07:10 +01:00
Richard van der Hoff
9b7d9d8ba0
Update attributions and PR links in changelog
2018-08-22 14:06:20 +01:00
Erik Johnston
db10f553ba
Merge pull request #3724 from Half-Shot/hs/guest-fetch-event
...
Allow guests to use /rooms/:roomId/event/:eventId
2018-08-22 13:41:08 +01:00
Erik Johnston
764030cf63
Merge pull request #3659 from matrix-org/erikj/split_profiles
...
Allow profile updates to happen on workers
2018-08-22 11:35:55 +01:00
Erik Johnston
8432e2ebd7
Rename WorkerProfileHandler to BaseProfileHandler
2018-08-22 10:13:40 +01:00
Erik Johnston
a81f140880
Add assert to ensure handler is only run on master
2018-08-22 10:11:21 +01:00
Erik Johnston
47b25ba5f3
Remove redundant vars
2018-08-22 10:09:05 +01:00
Erik Johnston
3bf8bab8f9
Merge pull request #3673 from matrix-org/erikj/refactor_state_handler
...
Refactor state module to support multiple room versions
2018-08-22 10:04:55 +01:00
Richard van der Hoff
a4cf660a32
Merge pull request #3735 from matrix-org/travis/federation-spelling
...
limt -> limit
2018-08-22 09:34:21 +01:00
Richard van der Hoff
0d568ff403
Merge remote-tracking branch 'origin/release-v0.33.3' into develop
2018-08-22 09:15:44 +01:00
Richard van der Hoff
d7585a4c83
Merge pull request #3732 from matrix-org/rav/fix_gdpr_consent
...
Fix 500 error from /consent form
2018-08-22 09:15:06 +01:00
Travis Ralston
365f588d98
Create 3734.misc
2018-08-21 23:38:38 -06:00
Travis Ralston
eb7be75a10
Create 3735.misc
2018-08-21 23:38:06 -06:00
Travis Ralston
dd0ac1614c
Reference that the federation_reader needs the HTTP replication port set
2018-08-21 23:35:50 -06:00
Matthew Hodgson
bb81e78ec6
Split the state_group_cache in two ( #3726 )
...
Splits the state_group_cache in two.
One half contains normal state events; the other contains member events.
The idea is that the lazyloading common case of: "I want a subset of member events plus all of the other state" can be accomplished efficiently by splitting the cache into two, and asking for "all events" from the non-members cache, and "just these keys" from the members cache. This means we can avoid having to make DictionaryCache aware of these sort of complicated queries, whilst letting LL requests benefit from the caching.
Previously we were unable to sensibly use the caching and had to pull all state from the DB irrespective of the filtering, which made things slow. Hopefully fixes https://github.com/matrix-org/synapse/issues/3720 .
2018-08-22 00:56:37 +02:00
Richard van der Hoff
afb4b490a4
changelog
2018-08-21 23:19:14 +01:00
Richard van der Hoff
f7bf181a90
fix another consent encoding fail
2018-08-21 23:14:25 +01:00
Richard van der Hoff
f7baff6f7b
Fix 500 error from /consent form
...
Fixes #3731
2018-08-21 22:47:07 +01:00
Richard van der Hoff
a52f276990
Merge tag 'v0.33.3rc2' into develop
...
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 20:30:09 +01:00
Hubert Chathi
42a394caa2
allow session_data to be any JSON instead of just a string
2018-08-21 14:51:34 -04:00
Erik Johnston
46c832eaac
Merge pull request #3727 from matrix-org/erikj/dont_error_on_missing_keys
...
Don't log exceptions when failing to fetch server keys
2018-08-21 17:07:20 +01:00
Erik Johnston
2b1a4b2596
Merge pull request #3722 from matrix-org/erikj/bg_process_iteration
...
LaterGauge needs to call thread safe functions
2018-08-21 16:47:34 +01:00
Erik Johnston
cd6937fb26
Fix typo
2018-08-21 16:28:10 +01:00
Hubert Chathi
8550a7e9c2
allow auth_data to be any JSON instead of a string
2018-08-21 10:38:00 -04:00
Erik Johnston
c2c153dd3b
Log more detail when we fail to authenticate request
2018-08-21 11:42:49 +01:00
Erik Johnston
79d3b4689e
Newsfile
2018-08-21 11:21:48 +01:00
Erik Johnston
808d8e06aa
Don't log exceptions when failing to fetch server keys
...
Not being able to resolve or connect to remote servers is an expected
error, so we shouldn't log at ERROR with stacktraces.
2018-08-21 11:19:26 +01:00
Erik Johnston
3f6762f0bb
isort
2018-08-21 09:38:38 +01:00
Amber Brown
3b5b64ac99
changelog
2018-08-21 03:48:55 +10:00
Amber Brown
23d7e63a4a
Merge pull request #3723 from matrix-org/rav/fix_logcontext_disaster
...
Fix exceptions when a connection is closed before we read the headers
2018-08-21 03:47:52 +10:00
Will Hunt
8bd585b09b
3724.feature
2018-08-20 18:27:42 +01:00
Richard van der Hoff
012d612f9d
changelog
2018-08-20 18:26:27 +01:00
Will Hunt
f89f6b7c09
Allow guests to access /rooms/:roomId/event/:eventId
2018-08-20 18:25:54 +01:00
Richard van der Hoff
be6527325a
Fix exceptions when a connection is closed before we read the headers
...
This fixes bugs introduced in #3700 , by making sure that we behave sanely
when an incoming connection is closed before the headers are read.
2018-08-20 18:21:10 +01:00
Richard van der Hoff
55e6bdf287
Robustness fix for logcontext filter
...
Make the logcontext filter not explode if it somehow ends up with a logcontext
of None, since that infinite-loops the whole logging system.
2018-08-20 18:20:07 +01:00
Erik Johnston
e2c0aa2c26
Newsfile
2018-08-20 17:40:59 +01:00
Erik Johnston
b01a755498
Make the in flight requests metrics thread safe
2018-08-20 17:27:52 +01:00
Erik Johnston
1058d14127
Make the in flight background process metrics thread safe
2018-08-20 17:27:24 +01:00
Amber Brown
80bf7d3580
changelog
2018-08-21 00:01:14 +10:00
Amber Brown
9a2f960736
version
2018-08-21 00:00:19 +10:00
Amber Brown
324525f40c
Port over enough to get some sytests running on Python 3 ( #3668 )
2018-08-20 23:54:49 +10:00
Erik Johnston
4d664278af
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/refactor_state_handler
2018-08-20 14:49:43 +01:00
Erik Johnston
8dee601054
Remove redundant room_version checks
2018-08-20 14:48:53 +01:00
Erik Johnston
e21c368b8b
Revert spurious change
2018-08-20 13:54:51 +01:00
Erik Johnston
cf6f9a8b53
Merge pull request #3719 from matrix-org/erikj/use_cache_fact
...
Use get_cache_factor_for function for `state_cache`
2018-08-20 13:33:35 +01:00
Erik Johnston
48a910e128
Newsfile
2018-08-20 13:33:20 +01:00
Erik Johnston
f2a48d87df
Use get_cache_factor_for function for state_cache
...
This allows the cache factor for `state_cache` to be individually
specified in the enviroment
2018-08-20 13:01:46 +01:00
Erik Johnston
2aa7cc6a46
Merge pull request #3713 from matrix-org/erikj/fixup_fed_logging
...
Fix logging bug in EDU handling over replication
2018-08-20 10:51:45 +01:00
Neil Johnson
e07970165f
rename error code
2018-08-18 14:39:45 +01:00
Neil Johnson
c5171bf171
special case server_notices_mxid
2018-08-18 12:33:07 +01:00
Neil Johnson
ba1fbf7d5b
special case server_notices_mxid
2018-08-18 12:31:08 +01:00
Richard van der Hoff
3cef867cc1
Merge pull request #3709 from matrix-org/rav/logcontext_for_replication_commands
...
Logcontexts for replication command handlers
2018-08-17 16:22:07 +01:00
Richard van der Hoff
c144252a8c
Merge pull request #3710 from matrix-org/rav/logcontext_for_pusher_updates
...
Fix logcontexts for running pushers
2018-08-17 16:21:49 +01:00
Amber Brown
c334ca67bb
Integrate presence from hotfixes ( #3694 )
2018-08-18 01:08:45 +10:00
Amber Brown
04f5d2db62
Remove v1/register's broken shared secret functionality ( #3703 )
2018-08-18 00:55:01 +10:00
Erik Johnston
ab822a2d1f
Add some fixmes
2018-08-17 15:31:50 +01:00
Erik Johnston
91cdb6de08
Call UserDirectoryHandler methods directly
...
Turns out that the user directory handling is fairly racey as a bunch
of stuff assumes that the processing happens on master, which it doesn't
when there is a synapse.app.user_dir worker. So lets just call the
function directly until we actually get round to fixing it, since it
doesn't make the situation any worse.
2018-08-17 15:26:13 +01:00
Neil Johnson
d49b77404b
clean up, no functional changes
2018-08-17 15:21:34 +01:00
Richard van der Hoff
63260397c6
Merge pull request #3701 from matrix-org/rav/use_producer_for_responses
...
Use a producer to stream back responses
2018-08-17 14:58:45 +01:00
Richard van der Hoff
3f8709ffe4
Merge pull request #3700 from matrix-org/rav/wait_for_producers
...
Refactor request logging code
2018-08-17 14:57:45 +01:00
Neil Johnson
3ee57bdcbb
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/server_notices_on_blocking
2018-08-17 14:34:10 +01:00
Neil Johnson
4c22b4047b
Merge pull request #3707 from matrix-org/neilj/limit_exceeded_error
...
add new error type ResourceLimit
2018-08-17 13:33:54 +00:00
Erik Johnston
782689bd40
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/split_profiles
2018-08-17 14:15:48 +01:00
Erik Johnston
ca87ad1def
Split ProfileHandler into master and worker
2018-08-17 14:15:14 +01:00
Neil Johnson
b5f638f1f4
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/server_notices_on_blocking
2018-08-17 14:04:15 +01:00
Neil Johnson
9fd161c6fb
Merge branch 'neilj/limit_exceeded_error' of github.com:matrix-org/synapse into neilj/limit_exceeded_error
2018-08-17 13:58:40 +01:00
Neil Johnson
0195dfbf52
server limits config docs
2018-08-17 13:58:25 +01:00
Neil Johnson
69c49d3fa3
Merge branch 'develop' into neilj/limit_exceeded_error
2018-08-17 12:44:26 +00:00
Neil Johnson
a2d872e7b3
Merge pull request #3708 from matrix-org/neilj/resource_Limit_block_event_creation
...
Neilj/resource limit block event creation
2018-08-17 12:42:59 +00:00
Amber Brown
fa27073b14
Merge pull request #3712 from matrix-org/travis/register-admin-docs
...
Update the admin register documentation to return a real user ID
2018-08-17 22:31:02 +10:00
Erik Johnston
38f708a2bb
Remote profile cache should remain in master worker
2018-08-17 11:37:42 +01:00
Erik Johnston
73737bd0f9
Newsfile
2018-08-17 11:14:05 +01:00
Erik Johnston
3b2dcfff78
Fix logging bug in EDU handling over replication
2018-08-17 11:11:06 +01:00
Neil Johnson
521d369e7a
remove errant yield
2018-08-17 10:12:11 +01:00
Travis Ralston
b99a0f3941
Create 3712.misc
2018-08-17 02:47:31 -06:00
Travis Ralston
a8ffc27db7
Update the admin register documentation to return a real user ID
...
Presumably this is the intention anyways. I've also updated the domain part to be something more along the lines of what people might expect.
2018-08-17 02:46:25 -06:00
Richard van der Hoff
4c9da1440f
changelog
2018-08-17 00:50:36 +01:00
Richard van der Hoff
d9efd87d55
changelog
2018-08-17 00:49:22 +01:00
Richard van der Hoff
0e8d78f6aa
Logcontexts for replication command handlers
...
Run the handlers for replication commands as background processes. This should
improve the visibility in our metrics, and reduce the number of "running db
transaction from sentinel context" warnings.
Ideally it means converting the things that fire off deferreds into the night
into things that actually return a Deferred when they are done. I've made a bit
of a stab at this, but it will probably be leaky.
2018-08-17 00:43:43 +01:00
Richard van der Hoff
66f7dc8c87
Fix logcontexts for running pushers
...
First of all, avoid resetting the logcontext before running the pushers, to fix
the "Starting db txn 'get_all_updated_receipts' from sentinel context" warning.
Instead, give them their own "background process" logcontexts.
2018-08-17 00:32:39 +01:00
Neil Johnson
7e51342196
For resource limit blocked users, prevent writing into rooms
2018-08-16 23:05:20 +01:00
Neil Johnson
bcfeb44afe
call reap on start up and fix under reaping bug
2018-08-16 22:55:32 +01:00
Neil Johnson
372bf073c1
block event creation and room creation on hitting resource limits
2018-08-16 21:25:16 +01:00
Neil Johnson
7edd11623d
add new error type ResourceLimit
2018-08-16 21:04:30 +01:00
Neil Johnson
13ad9930c8
add new error type ResourceLimit
2018-08-16 18:02:02 +01:00
Neil Johnson
51b17ec566
flake8
2018-08-16 17:32:22 +01:00
Neil Johnson
3c1080b6e4
refactor for readability, and reuse caching for setting tags
2018-08-16 17:02:04 +01:00
Neil Johnson
eff3ae3b9a
add room tagging
2018-08-16 15:48:34 +01:00
Erik Johnston
b4d6db5c4a
Merge pull request #3705 from matrix-org/erikj/fix_inbound_fed_worker
...
Fix inbound federation on reader worker
2018-08-16 15:42:50 +01:00
Erik Johnston
aae86a81ef
Newsfile
2018-08-16 15:41:48 +01:00
Erik Johnston
7d5b1a60a3
Fix inbound federation on reader worker
...
Inbound federation requires calculating push, which in turn relies on
having access to account data.
2018-08-16 15:32:20 +01:00
Neil Johnson
bfb6c58624
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/server_notices_on_blocking
2018-08-16 15:10:16 +01:00
Neil Johnson
a675f9c556
check for room state before deciding on action
2018-08-16 14:53:35 +01:00
Will Hunt
c151b32b1d
Add GET media/v1/config ( #3184 )
2018-08-16 14:23:38 +01:00
Matthew Hodgson
762a758fea
lazyload aware /messages ( #3589 )
2018-08-16 14:22:47 +01:00
Neil Johnson
25d2b5d55f
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/server_notices_on_blocking
2018-08-16 11:37:17 +01:00
Neil Johnson
df1e4f259f
WIP impl commiting to get feedback
2018-08-16 11:10:53 +01:00
Neil Johnson
c055c91655
fix case where empty string state check is evaulated as False
2018-08-16 11:10:19 +01:00
Matthew Hodgson
3f543dc021
initial cut at a room summary API ( #3574 )
2018-08-16 09:46:50 +01:00
Richard van der Hoff
859989f958
Merge pull request #3686 from matrix-org/rav/changelog_links_to_prs
...
Changelog should link to PRs
2018-08-15 22:22:38 +01:00
Neil Johnson
8cfad2e686
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/server_notices_on_blocking
2018-08-15 17:20:38 +01:00
Neil Johnson
81d727efa9
Merge pull request #3689 from matrix-org/neilj/fix_off_by_1+maus
...
Fix Mau off by one errors
2018-08-15 16:19:41 +00:00
Neil Johnson
da7fe43899
Fix mau blocking calulation bug on login
2018-08-15 17:03:30 +01:00
Richard van der Hoff
e2e846628d
Remove incorrectly re-added changelog files
...
These were removed for the 0.33.2 release, but were incorrectly re-added in
2018-08-15 16:38:46 +01:00
Matthew Hodgson
2f78f432c4
speed up /members and add at= and membership params ( #3568 )
2018-08-15 16:35:22 +01:00
Neil Johnson
fc5d937550
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/server_notices_on_blocking
2018-08-15 16:31:40 +01:00
Neil Johnson
86a00e05e1
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/fix_off_by_1+maus
2018-08-15 16:27:08 +01:00
Richard van der Hoff
d82fa0e9a6
changelog
2018-08-15 15:12:35 +01:00
Amber Brown
a87af25fbb
Fix the tests
2018-08-15 15:12:23 +01:00
Neil Johnson
eabc5f8271
wip cut at sending resource server notices
2018-08-15 15:04:52 +01:00
Neil Johnson
c24fc9797b
add new event types
2018-08-15 15:04:30 +01:00
Richard van der Hoff
afcd655ab6
Use a producer to stream back responses
...
The problem with dumping all of the json response into the Request object at
once is that doing so starts the timeout for the next request to be received:
so if it takes longer than 60s to stream back the response to the client, the
client never gets it.
The correct solution is to use a Producer; then the timeout is only started
once all of the content is sent over the TCP connection.
2018-08-15 15:04:16 +01:00
Erik Johnston
dc56c47dc0
Merge pull request #3653 from matrix-org/erikj/split_federation
...
Move more federation APIs to workers
2018-08-15 14:59:02 +01:00
Neil Johnson
4601129c44
Merge pull request #3687 from matrix-org/neilj/admin_email
...
support admin_email config and pass through into blocking errors,
2018-08-15 13:52:25 +00:00
Erik Johnston
ef184caf30
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/split_federation
2018-08-15 14:25:46 +01:00
Erik Johnston
488ffe6fdb
Use federation handler function rather than duplicate
...
This involves renaming _persist_events to be a public function.
2018-08-15 14:17:18 +01:00
Erik Johnston
773db62a22
Rename slave TransactionStore to SlaveTransactionStore
2018-08-15 14:17:06 +01:00
Neil Johnson
39176f27f7
remove changelog referencing another PR
2018-08-15 13:53:51 +01:00
Richard van der Hoff
2de813a611
changelog
2018-08-15 13:49:03 +01:00
Richard van der Hoff
eaaa2248ff
Refactor request logging code
...
This commit moves a bunch of the logic for deciding when to log the receipt and
completion of HTTP requests into SynapseRequest, rather than in the request
handling wrappers.
Advantages of this are:
* we get logs for *all* requests (including OPTIONS and HEADs), rather than
just those that end up hitting handlers we've remembered to decorate
correctly.
* when a request handler wires up a Producer (as the media stuff does
currently, and as other things will do soon), we log at the point that all
of the traffic has been sent to the client.
2018-08-15 13:47:52 +01:00
Neil Johnson
87a824bad1
clean up AuthError
2018-08-15 11:58:03 +01:00
Neil Johnson
c4eb97518f
Merge branch 'neilj/update_limits_error_codes' of github.com:matrix-org/synapse into neilj/admin_email
2018-08-15 11:53:01 +01:00
Neil Johnson
55afba0fc5
update admin email to uri
2018-08-15 11:41:18 +01:00
Neil Johnson
75c663c7b9
update error codes
2018-08-15 11:27:48 +01:00
Neil Johnson
1c5e690a6b
Merge pull request #3690 from matrix-org/neilj/change_prometheus_mau_metric_name
...
combine mau metrics into one group
2018-08-15 09:53:59 +00:00
Erik Johnston
fef2e65d12
Merge pull request #3667 from matrix-org/erikj/fixup_unbind
...
Don't fail requests to unbind 3pids for non supporting ID servers
2018-08-15 10:32:12 +01:00
Neil Johnson
596ce63576
update resource limit error codes
2018-08-15 10:23:28 +01:00
Neil Johnson
b8429c7c81
update error codes for resource limiting
2018-08-15 10:19:48 +01:00
Neil Johnson
ab035bdeac
replace admin_email with admin_uri for greater flexibility
2018-08-15 10:16:41 +01:00
Neil Johnson
19b433e3f4
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/admin_email
2018-08-14 17:44:46 +01:00
Neil Johnson
b586b8b986
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/fix_off_by_1+maus
2018-08-14 17:43:22 +01:00
Neil Johnson
70e48cbbb1
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/change_prometheus_mau_metric_name
2018-08-14 17:40:59 +01:00
Neil Johnson
aa3220df6a
Merge pull request #3692 from matrix-org/neil/fix_postgres_test_initialise_reserved_users
...
Neil/fix postgres test initialise reserved users
2018-08-14 16:40:11 +00:00
Neil Johnson
7277216d01
fix setup_test_homeserver to be postgres compatible
2018-08-14 17:14:39 +01:00
Neil Johnson
cd0c749c4f
Fix missing yield in synapse.storage.monthly_active_users.initialise_reserved_users
2018-08-14 17:06:51 +01:00
Neil Johnson
9ecbaf8ba8
adding missing yield
2018-08-14 16:55:28 +01:00
Neil Johnson
1522ed9c07
in case max_mau is less than I think
2018-08-14 16:52:30 +01:00
Neil Johnson
629f390035
Rename MAU prometheus metric
2018-08-14 16:38:05 +01:00
Neil Johnson
e5962f845c
pep8
2018-08-14 16:36:14 +01:00
Neil Johnson
e7d091fb86
combine mau metrics into one group
2018-08-14 16:26:55 +01:00
Neil Johnson
414d54b61a
Merge pull request #3670 from matrix-org/neilj/mau_sync_block
...
Block ability to read via sync if mau limit exceeded
2018-08-14 15:21:31 +00:00
Neil Johnson
2545993ce4
make comments clearer
2018-08-14 15:48:12 +01:00
Neil Johnson
06b331ff40
fix off by 1 errors
2018-08-14 15:28:15 +01:00
Neil Johnson
8f9a7eb58d
support admin_email config and pass through into blocking errors, return AuthError in all cases
2018-08-14 15:11:54 +01:00
Neil Johnson
c74c71128d
remove blank line
2018-08-14 15:06:24 +01:00
Neil Johnson
ed4bc3d2fc
fix off by 1s on mau
2018-08-14 15:04:48 +01:00
Neil Johnson
bd92c8eaa7
Merge branch 'neilj/admin_email' of github.com:matrix-org/synapse into neilj/fix_off_by_1+maus
2018-08-14 14:56:45 +01:00
Neil Johnson
99ebaed8e6
Update register.py
...
remove comments
2018-08-14 14:55:55 +01:00
Neil Johnson
9b5bf3d858
Merge branch 'neilj/admin_email' of github.com:matrix-org/synapse into neilj/fix_off_by_1+maus
2018-08-14 14:51:38 +01:00
Neil Johnson
e25d87d97b
Merge branch 'neilj/mau_sync_block' of github.com:matrix-org/synapse into neilj/fix_off_by_1+maus
2018-08-14 14:32:18 +01:00
Neil Johnson
e2c9fe0a6a
backout ability to pass in event type to server notices
2018-08-14 13:32:56 +01:00
Amber Brown
614e6d517d
Dockerised sytest ( #3660 )
2018-08-14 21:30:34 +10:00
Amber Brown
0bdc362598
Merge pull request #3681 from matrix-org/neilj/fix_reap_users_in_postgres
...
Neilj/fix reap users in postgres
2018-08-14 21:29:35 +10:00
Amber Brown
591bf87c6a
Merge remote-tracking branch 'origin/develop' into neilj/fix_reap_users_in_postgres
2018-08-14 20:56:23 +10:00
Amber Brown
bdfbd934d6
Implement a new test baseclass to cut down on boilerplate ( #3684 )
2018-08-14 20:53:43 +10:00
Neil Johnson
9b75c78b4d
support server notice state events for resource limits
2018-08-14 11:20:41 +01:00
Jan Christian Grünhage
8f0c430ca4
Merge pull request #3669 from matrix-org/jcgruenhage/update-docker-base
...
update docker base-image to alpine 3.8
2018-08-14 11:43:59 +02:00
Neil Johnson
63417c31e9
fix typo
2018-08-13 22:36:52 +01:00
Neil Johnson
1f24d8681b
set admin email via config
2018-08-13 21:26:43 +01:00
Neil Johnson
f4b49152e2
support admin_email config and pass through into blocking errors, return AuthError in all cases
2018-08-13 21:09:47 +01:00
Richard van der Hoff
b6d55588e1
Changelog should link to PRs
...
The changelog makes much more sense if it consistently links to PRs, rather
than mostly PRs with the occasional issue #.
2018-08-13 18:56:55 +01:00
Richard van der Hoff
8ba2dac6ea
Name changelog after PR, not bug
2018-08-13 18:54:01 +01:00
Richard van der Hoff
50bcaf1a27
Merge pull request #3677 from andrewshadura/master
...
Use recaptcha_ajax.js directly from Google
2018-08-13 18:52:56 +01:00
Richard van der Hoff
cd32c19a60
Merge pull request #3685 from matrix-org/revert-3677-master
...
Revert "Use recaptcha_ajax.js directly from Google"
2018-08-13 18:49:50 +01:00
Richard van der Hoff
34f51babc5
Revert "Use recaptcha_ajax.js directly from Google"
2018-08-13 18:48:03 +01:00
Richard van der Hoff
8226e5597a
Merge pull request #3677 from andrewshadura/master
...
Use recaptcha_ajax.js directly from Google
2018-08-13 18:47:51 +01:00
Neil Johnson
ce7de9ae6b
Revert "support admin_email config and pass through into blocking errors, return AuthError in all cases"
...
This reverts commit 0d43f991a1 .
2018-08-13 18:06:18 +01:00
Neil Johnson
0d43f991a1
support admin_email config and pass through into blocking errors, return AuthError in all cases
2018-08-13 18:00:23 +01:00
Amber Brown
99dd975dae
Run tests under PostgreSQL ( #3423 )
2018-08-13 16:47:46 +10:00
Matthew Hodgson
4f7064f6b5
missing import
2018-08-12 19:14:31 -04:00
Matthew Hodgson
f0cede5556
missing import
2018-08-12 19:14:31 -04:00
Matthew Hodgson
54ac18e832
use parse_string
2018-08-12 19:14:31 -04:00
Matthew Hodgson
66a4ca1d28
404 nicely if you try to interact with a missing current version
2018-08-12 19:14:31 -04:00
Matthew Hodgson
72788cf9c1
support DELETE /version with no args
2018-08-12 19:14:31 -04:00
Matthew Hodgson
edc427a351
flake8
2018-08-12 19:14:31 -04:00
Matthew Hodgson
fe87890b18
implement remaining tests and make them work
2018-08-12 19:14:31 -04:00
Matthew Hodgson
f6a3067868
linting
2018-08-12 19:14:31 -04:00
Matthew Hodgson
15d513f16f
fix idiocies and so make tests pass
2018-08-12 19:14:31 -04:00
Matthew Hodgson
174be586e5
first cut at a UT
2018-08-12 19:14:31 -04:00
Matthew Hodgson
b5eee511c7
don't needlessly return user_id
2018-08-12 19:14:31 -04:00
Matthew Hodgson
93d174bcc4
improve docstring
2018-08-12 19:14:31 -04:00
Matthew Hodgson
5e42c45c96
switch get_current_version_info back to being get_version_info
2018-08-12 19:14:31 -04:00
Matthew Hodgson
982edca380
fix flakes
2018-08-12 19:14:31 -04:00
Matthew Hodgson
234611f347
fix typos
2018-08-12 19:14:31 -04:00
Matthew Hodgson
14b3da63a3
add a tonne of docstring; make upload_room_keys properly assert version
2018-08-12 19:14:31 -04:00
Matthew Hodgson
9f0791b7bd
add a tonne of docstring; make upload_room_keys properly assert version
2018-08-12 19:14:31 -04:00
Matthew Hodgson
9f500cb39e
more docstring for the e2e_room_keys rest
2018-08-12 19:14:31 -04:00
Matthew Hodgson
8d14598e90
add storage docstring; remove unused set_e2e_room_keys
2018-08-12 19:14:31 -04:00
Matthew Hodgson
ca0b052307
fix factoring out of _should_replace_room_key
2018-08-12 19:14:31 -04:00
Matthew Hodgson
cac0253799
rename room_key_version table correctly, and fix opt args
2018-08-12 19:14:31 -04:00
Matthew Hodgson
0abb205b47
blindly incorporate PR review - needs testing & fixing
2018-08-12 19:14:31 -04:00
Matthew Hodgson
69e51c7ba4
make /room_keys/version work
2018-08-12 19:14:31 -04:00
Matthew Hodgson
8ae64b270f
implement /room_keys/version too (untested)
2018-08-12 19:14:31 -04:00
Matthew Hodgson
cf1e2000f6
document the API
2018-08-12 19:13:09 -04:00
Matthew Hodgson
6b8c07abc2
make it work and fix pep8
2018-08-12 19:13:09 -04:00
Matthew Hodgson
0bc4627a73
interim WIP checkin; doesn't build yet
2018-08-12 18:23:10 -04:00
Matthew Hodgson
53ace904b2
total WIP skeleton for /room_keys API
2018-08-12 18:23:10 -04:00
Neil Johnson
ac205a54b2
Fixes test_reap_monthly_active_users so it passes under postgres
2018-08-11 22:50:09 +01:00
Neil Johnson
31fa743567
fix sqlite/postgres incompatibility in reap_monthly_active_users
2018-08-11 22:38:34 +01:00
Neil Johnson
c79c4c0a7d
server notices for resource limit blocking
2018-08-10 15:25:47 +01:00
Neil Johnson
6c6aba76e1
implementation of server notices to alert on hitting resource limits
2018-08-10 15:12:59 +01:00
Amber Brown
a001038b92
Merge pull request #3679 from matrix-org/hawkowl/blackify-tests
...
Blackify the tests
2018-08-11 00:12:56 +10:00
Amber Brown
807449d8f2
fix up a forced long line
2018-08-11 00:01:43 +10:00
Richard van der Hoff
c31793a784
Merge branch 'rav/fix_linearizer_cancellation' into develop
2018-08-10 14:57:27 +01:00
Richard van der Hoff
c08f9d95b2
log *after* reloading log config
...
... because logging *before* reloading means the log message gets lost in the old MemoryLogger
2018-08-10 14:56:48 +01:00
Amber Brown
dd16e7dfcc
changelog
2018-08-10 23:54:46 +10:00
black
8b3d9b6b19
Run black.
2018-08-10 23:54:09 +10:00
Amber Brown
b37c472419
Rename async to async_helpers because async is a keyword on Python 3.7 ( #3678 )
2018-08-10 23:50:21 +10:00
Andrej Shadura
c75b71a397
Use recaptcha_ajax.js directly from Google
...
The script recaptcha_ajax.js contains minified non-free code which
we probably cannot redistribute. Since it talks to Google servers
anyway, it is better to just download it from Google directly instead
of shipping it.
This fixes #1932 .
2018-08-10 13:36:14 +02:00
Richard van der Hoff
3c0213a217
Merge pull request #3439 from vojeroen/send_sni_for_federation_requests
...
send SNI for federation requests
2018-08-10 12:23:54 +01:00
Richard van der Hoff
178ab76ac0
changelog
2018-08-10 11:05:23 +01:00
Richard van der Hoff
638d35ef08
Fix linearizer cancellation on twisted < 18.7
...
Turns out that cancellation of inlineDeferreds didn't really work properly
until Twisted 18.7. This commit refactors Linearizer.queue to avoid
inlineCallbacks.
2018-08-10 10:59:09 +01:00
Neil Johnson
01021c812f
wip at implementing MSC 7075
2018-08-09 22:16:00 +01:00
Jeroen
2e9c73e8ca
more generic conversion of str/bytes to unicode
2018-08-09 21:31:26 +02:00
Jeroen
64899341dc
include private functions from twisted
2018-08-09 21:04:22 +02:00
Neil Johnson
885ea9c602
rename _user_last_seen_monthly_active
2018-08-09 18:02:12 +01:00
Neil Johnson
c1f9dec92a
fix errant parenthesis
2018-08-09 17:43:26 +01:00
Neil Johnson
04df714259
fix imports
2018-08-09 17:41:52 +01:00
Neil Johnson
09cf130898
only block on sync where user is not part of the mau cohort
2018-08-09 17:39:12 +01:00
Erik Johnston
5075e444f4
Newsfile
2018-08-09 14:58:49 +01:00
Erik Johnston
3e19beb941
Fix tests
2018-08-09 14:58:49 +01:00
Erik Johnston
bb99b1f550
Add fast path in state res for zero prev events
2018-08-09 14:58:49 +01:00
Erik Johnston
ce6db0e547
Choose state algorithm based on room version
2018-08-09 14:58:47 +01:00
Erik Johnston
152c0aa58e
Add constants for room versions
2018-08-09 14:55:47 +01:00
Erik Johnston
119451dcd1
Refactor state module
...
We split out the actual state resolution algorithm to prepare for having
multiple versions.
2018-08-09 14:55:47 +01:00
Neil Johnson
c6b28fb479
Where server is disabled, block ability for locked out users to read new messages
2018-08-09 12:45:58 +01:00
Jan Christian Grünhage
d967653705
update docker base-image to alpine 3.8
2018-08-09 13:31:10 +02:00
Neil Johnson
69ce057ea6
block sync if auth checks fail
2018-08-09 12:26:27 +01:00
Neil Johnson
3dce9050cf
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/mau_sync_block
2018-08-09 11:42:02 +01:00
Neil Johnson
0ad98e38d0
Merge pull request #3655 from matrix-org/neilj/disable_hs
...
Flag to disable HS without disabling federation
2018-08-09 10:41:43 +00:00
Neil Johnson
a5ef110749
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/mau_sync_block
2018-08-09 11:40:37 +01:00
Erik Johnston
a6c813761a
Docstrings
2018-08-09 10:41:08 +01:00
Erik Johnston
54a9bea88c
Newsfile
2018-08-09 10:39:29 +01:00
Erik Johnston
5c6226707d
Update docs/workers.rst
2018-08-09 10:37:42 +01:00
Erik Johnston
8876ce7f77
Newsfile
2018-08-09 10:37:42 +01:00
Erik Johnston
b179537f2a
Move clean_room_for_join to master
2018-08-09 10:37:38 +01:00
Erik Johnston
72d1902bbe
Fixup doc comments
2018-08-09 10:23:49 +01:00
Amber Brown
984376745b
Merge branch 'master' into develop
2018-08-09 19:23:47 +10:00
Amber Brown
67dbe4c899
0.33.2 changelog
2018-08-09 19:21:07 +10:00
Amber Brown
dafe90a6be
0.33.2
2018-08-09 19:20:41 +10:00
Amber Brown
3d6f9fba19
fix the changelog & template
2018-08-09 19:19:30 +10:00
Erik Johnston
484a0ebdfc
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/split_profiles
2018-08-09 10:16:29 +01:00
Erik Johnston
5785b93711
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/split_federation
2018-08-09 10:16:16 +01:00
Erik Johnston
bf7598f582
Log when we 3pid/unbind request fails
2018-08-09 10:09:56 +01:00
Erik Johnston
2bdafaf3c1
Merge pull request #3632 from matrix-org/erikj/refactor_repl_servlet
...
Add helper base class for generating new replication endpoints
2018-08-09 10:06:23 +01:00
Erik Johnston
62564797f5
Fixup wording and remove dead code
2018-08-09 09:56:10 +01:00
Amber Brown
2511f3f8a0
Test fixes for Python 3 ( #3647 )
2018-08-09 12:22:01 +10:00
Richard van der Hoff
bb89c84614
Merge pull request #3664 from matrix-org/rav/federation_metrics
...
more metrics for the federation and appservice senders
2018-08-08 23:16:58 +01:00
Jeroen
d5c0ce4cad
updated docstring for ServerContextFactory
2018-08-08 19:25:01 +02:00
Neil Johnson
e92fb00f32
sync auth blocking
2018-08-08 17:54:49 +01:00
Neil Johnson
839a317c96
fix pep8 too many lines
2018-08-08 17:39:04 +01:00
Neil Johnson
5298d79fb5
Merge branch 'develop' into neilj/disable_hs
2018-08-08 16:13:03 +00:00
Richard van der Hoff
8521ae13e3
Merge pull request #3654 from matrix-org/rav/room_versions
...
Support for room versioning
2018-08-08 17:10:53 +01:00
Neil Johnson
d2f3ef98ac
Merge branch 'develop' into neilj/disable_hs
2018-08-08 15:55:47 +00:00
Neil Johnson
54685d294d
Ability to disable client/server Synapse via conf toggle
2018-08-08 15:38:54 +01:00
Neil Johnson
cc187debf3
Merge pull request #3662 from matrix-org/neilj/reserved_users
...
Reserved users for MAU limits
2018-08-08 14:33:17 +00:00
Neil Johnson
2b5baebeba
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/disable_hs
2018-08-08 13:47:07 +01:00
Neil Johnson
be59910b93
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/reserved_users
2018-08-08 13:45:21 +01:00
Neil Johnson
990fe9fc23
Merge pull request #3633 from matrix-org/neilj/mau_tracker
...
API for monthly_active_users table
2018-08-08 12:44:15 +00:00
Neil Johnson
312ae74746
typos
2018-08-08 13:33:16 +01:00
Neil Johnson
d92675a486
Ability to whitelist specific threepids against monthly active user limiting
2018-08-08 12:06:42 +01:00
Erik Johnston
360ba89c50
Don't fail requests to unbind 3pids for non supporting ID servers
...
Older identity servers may not support the unbind 3pid request, so we
shouldn't fail the requests if we received one of 400/404/501. The
request still fails if we receive e.g. 500 responses, allowing clients
to retry requests on transient identity server errors that otherwise do
support the API.
Fixes #3661
2018-08-08 12:06:18 +01:00
Neil Johnson
7f3d897e7a
mock config.max_mau_value
2018-08-08 11:46:23 +01:00
Erik Johnston
bebe325e6c
Rename POST param to METHOD
2018-08-08 10:36:18 +01:00
Erik Johnston
5011417632
Fixup logging and docstrings
2018-08-08 10:29:58 +01:00
Richard van der Hoff
e6d73b8582
changelog
2018-08-07 22:14:35 +01:00
Richard van der Hoff
bab94da79c
fix metric name
2018-08-07 22:11:45 +01:00
Richard van der Hoff
53bca4690b
more metrics for the federation and appservice senders
2018-08-07 19:09:48 +01:00
Neil Johnson
ef3589063a
prevent total number of reserved users being too large
2018-08-07 17:59:27 +01:00
Neil Johnson
e8eba2b4e3
implement reserved users for mau limits
2018-08-07 17:49:43 +01:00
Richard van der Hoff
e5d2c67844
Merge pull request #3658 from matrix-org/rav/fix_event_persisted_position_metrics
...
Fix occasional glitches in the synapse_event_persisted_position metric
2018-08-07 14:48:08 +01:00
Richard van der Hoff
3523f5432a
Don't expose default_room_version as config opt
2018-08-07 12:51:57 +01:00
Richard van der Hoff
9b92720d88
fix event lag graph
2018-08-07 12:27:34 +01:00
Amber Brown
23cd86554e
fix changelog
2018-08-07 21:20:42 +10:00
Amber Brown
848431be1d
fix for rc1
2018-08-07 21:13:22 +10:00
Amber Brown
cf8ef11f35
changelog
2018-08-07 21:11:24 +10:00
Amber Brown
3b9662339b
version
2018-08-07 21:10:52 +10:00
Erik Johnston
f81f421086
Update workers.rst with new paths
2018-08-07 10:51:35 +01:00
Erik Johnston
cd9765805e
Allow ratelimiting on workers
2018-08-07 10:50:28 +01:00
Erik Johnston
495cb100d1
Allow profile changes to happen on workers
2018-08-07 10:50:26 +01:00
Richard van der Hoff
865d07cd38
changelog
2018-08-07 10:02:01 +01:00
Richard van der Hoff
ca9bc1f4fe
Fix occasional glitches in the synapse_event_persisted_position metric
...
Every so often this metric glitched to a negative number. I'm assuming it was
due to backfilled events.
2018-08-07 10:00:03 +01:00
Neil Johnson
a74b25faaa
WIP building out mau reserved users
2018-08-06 23:25:25 +01:00
Neil Johnson
fbe255f9a4
add default mau_limits_reserved_threepids
2018-08-06 23:24:54 +01:00
Neil Johnson
7daa8a78c5
load mau limit threepids
2018-08-06 22:55:05 +01:00
Neil Johnson
89834d9a29
Merge branch 'neilj/mau_tracker' of github.com:matrix-org/synapse into neilj/disable_hs
2018-08-06 21:56:56 +01:00
Neil Johnson
e54794f5b6
Fix postgres compatibility bug
2018-08-06 21:55:54 +01:00
Neil Johnson
7bcf126b18
Merge branch 'neilj/mau_tracker' of github.com:matrix-org/synapse into neilj/disable_hs
2018-08-06 21:39:44 +01:00
Neil Johnson
1911c037cb
update comments to reflect new sig
2018-08-06 18:01:46 +01:00
Neil Johnson
33bd07d062
Merge branch 'neilj/mau_tracker' of github.com:matrix-org/synapse into neilj/disable_hs
2018-08-06 17:52:28 +01:00
Neil Johnson
16d78be315
make use of _simple_select_one_onecol, improved comments
2018-08-06 17:51:15 +01:00
Richard van der Hoff
7f3f108561
changelog
2018-08-06 16:30:52 +01:00
Richard van der Hoff
19a17068f1
Check m.room.create for sane room_versions
2018-08-06 16:11:24 +01:00
Erik Johnston
96a9a29645
Pull in necessary stores in federation_reader
2018-08-06 15:23:57 +01:00
Erik Johnston
62ace05c45
Move necessary storage functions to worker classes
2018-08-06 15:23:38 +01:00
Erik Johnston
1e2bed9656
Import all functions from TransactionStore
2018-08-06 15:23:38 +01:00
Erik Johnston
a3f5bf79a0
Add EDU/query handling over replication
2018-08-06 15:23:31 +01:00
Erik Johnston
e26dbd82ef
Add replication APIs for persisting federation events
2018-08-06 15:02:28 +01:00
Erik Johnston
051a99c400
Fix isort
2018-08-06 14:29:31 +01:00
Richard van der Hoff
f900d50824
include known room versions in outgoing make_joins
2018-08-06 13:45:37 +01:00
Neil Johnson
42c6823827
disable HS from config
2018-08-04 22:07:04 +01:00
Neil Johnson
e40a510fbf
py3 fix
2018-08-03 23:19:13 +01:00
Neil Johnson
d08296f9f2
remove unused import
2018-08-03 23:00:16 +01:00
Neil Johnson
886be75ad1
bug fixes
2018-08-03 22:29:03 +01:00
Will Hunt
16d9701892
Return M_NOT_FOUND when a profile could not be found. ( #3596 )
2018-08-03 19:08:05 +01:00
Neil Johnson
e10830e976
wip commit - tests failing
2018-08-03 17:55:50 +01:00
Richard van der Hoff
3777fa26aa
sanity check response from make_join
2018-08-03 16:08:32 +01:00
Richard van der Hoff
0d63d93ca8
Enforce compatibility when processing make_join requests
...
Reject make_join requests from servers which do not support the room version.
Also include the room version in the response.
2018-08-03 16:08:32 +01:00
Richard van der Hoff
0ca459ea33
Basic support for room versioning
...
This is the first tranche of support for room versioning. It includes:
* setting the default room version in the config file
* new room_version param on the createRoom API
* storing the version of newly-created rooms in the m.room.create event
* fishing the version of existing rooms out of the m.room.create event
2018-08-03 16:08:32 +01:00
Richard van der Hoff
15c1ae45e5
Docstrings for BaseFederationServlet
...
... to save me reverse-engineering this stuff again.
2018-08-03 16:08:32 +01:00
Neil Johnson
5593ff6773
fix (lots of) py3 test failures
2018-08-03 14:59:17 +01:00
Neil Johnson
b2aab04d2c
fix py3 test failure
2018-08-03 14:12:56 +01:00
Neil Johnson
da90337d89
Add ability to limit number of monthly active users on the server
2018-08-03 14:05:20 +01:00
Neil Johnson
950807d93a
fix caching and tests
2018-08-03 13:49:53 +01:00
Michael Kaye
df7f9871c1
Merge pull request #3644 from matrix-org/michaelkaye/refactor_docker_locations_v2
...
Refactor Dockerfile location
2018-08-03 13:44:35 +01:00
Neil Johnson
897c51d274
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/mau_tracker
2018-08-03 13:40:47 +01:00
Erik Johnston
cb298ff623
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/refactor_repl_servlet
2018-08-03 09:25:15 +01:00
Michael Kaye
42960aa047
Update README.md
...
Link to contrib/docker
2018-08-03 09:16:01 +01:00
Michael Kaye
c3f596180f
Update README.md
...
Link to docker/README.md
2018-08-03 09:15:19 +01:00
Michael Kaye
637b11b9ed
Update README.rst
...
Link to contrib/docker
2018-08-03 09:13:54 +01:00
Michael Kaye
feacd13932
Update README.rst
...
wrap at 80ish
2018-08-03 09:10:41 +01:00
Neil Johnson
c0affa7b4f
update generate_monthly_active_users, and reap_monthly_active_users
2018-08-02 23:03:01 +01:00
Neil Johnson
5e2f7b8084
typo
2018-08-02 22:47:48 +01:00
Neil Johnson
4ecb4bdac9
wip attempt at caching
2018-08-02 22:41:05 +01:00
Amber Brown
8a86d7ea96
Merge pull request #3645 from matrix-org/michaelkaye/mention_newsfragment
...
Mention the word "newsfragment" in CONTRIBUTING.rst
2018-08-03 04:40:18 +10:00
Michael Kaye
70baa61e95
newsfragment
2018-08-02 18:58:43 +01:00
Michael Kaye
4c4a123bd0
Mention the word "newsfragment" in CONTRIBUTING.rst
2018-08-02 18:53:44 +01:00
Michael Kaye
489949879e
Add news entry
2018-08-02 18:49:50 +01:00
Michael Kaye
1758f4e1c7
Address SPAG issues
2018-08-02 18:21:34 +01:00
Michael Kaye
26a37f3d4d
Do not include docker files in python build
2018-08-02 18:21:34 +01:00
Michael Kaye
0d25724419
Refactor docker locations and README.
...
This addresses #3224
2018-08-02 18:21:32 +01:00
Richard van der Hoff
1fa98495d0
Merge pull request #3639 from matrix-org/rav/refactor_error_handling
...
Clean up handling of errors from outbound requests
2018-08-02 17:38:24 +01:00
Richard van der Hoff
bdae8f2e68
Merge pull request #3638 from matrix-org/rav/refactor_federation_client_exception_handling
...
Factor out exception handling in federation_client
2018-08-02 17:37:46 +01:00
Neil Johnson
74b1d46ad9
do mau checks based on monthly_active_users table
2018-08-02 16:57:35 +01:00
Neil Johnson
9180061b49
remove unused count_monthly_users
2018-08-02 15:55:29 +01:00
Richard van der Hoff
704c3e6239
Merge branch 'master' into develop
2018-08-02 15:43:30 +01:00
Richard van der Hoff
43ecfe0b10
Merge tag 'v0.33.1'
...
Synapse 0.33.1 (2018-08-02)
===========================
SECURITY FIXES
--------------
- Fix a potential issue where servers could request events for rooms they have not joined. (`#3641 <https://github.com/matrix-org/synapse/issues/3641 >`_)
- Fix a potential issue where users could see events in private rooms before they joined. (`#3642 <https://github.com/matrix-org/synapse/issues/3642 >`_)
2018-08-02 15:40:44 +01:00
Richard van der Hoff
c2a83349f0
changelog: this is a security release
2018-08-02 15:35:42 +01:00
Richard van der Hoff
db1f33fb36
fix changelog typos
2018-08-02 15:33:53 +01:00
Richard van der Hoff
14a4e7d5a4
Prepare 0.33.1
2018-08-02 15:31:04 +01:00
Richard van der Hoff
50d9d97408
Merge pull request #3642 from matrix-org/rav/another_room_id_check
...
Check room visibility for /event/ requests
2018-08-02 15:21:59 +01:00
Richard van der Hoff
8cefc690c9
changelogs
2018-08-02 15:11:19 +01:00
Richard van der Hoff
0bf5ec0db7
Check room visibility for /event/ requests
...
Make sure that the user has permission to view the requeseted event for
/event/{eventId} and /room/{roomId}/event/{eventId} requests.
Also check that the event is in the given room for
/room/{roomId}/event/{eventId}, for sanity.
2018-08-02 15:03:27 +01:00
Richard van der Hoff
a937497cf5
Merge pull request #3641 from matrix-org/rav/room_id_check
...
Validation for events/rooms in fed requests
2018-08-02 14:22:05 +01:00
Richard van der Hoff
a013404292
changelog
2018-08-02 14:00:29 +01:00
Richard van der Hoff
14fa9d4d92
Avoid extra db lookups
...
Since we're about to look up the events themselves anyway, we can skip the
extra db queries here.
2018-08-02 13:55:51 +01:00
Neil Johnson
c4ffbecb68
fix test, update constructor call
2018-08-02 13:51:05 +01:00
Richard van der Hoff
0a65450d04
Validation for events/rooms in fed requests
...
When we get a federation request which refers to an event id, make sure that
said event is in the room the caller claims it is in.
(patch supplied by @turt2live)
2018-08-02 13:48:40 +01:00
Neil Johnson
00f99f74b1
insertion into monthly_active_users
2018-08-02 13:47:19 +01:00
Neil Johnson
4a6725d9d1
Merge branch 'neilj/mau_tracker' of github.com:matrix-org/synapse into neilj/mau_tracker
2018-08-02 11:04:18 +01:00
Neil Johnson
165e067033
Revert "change monthly_active_users table to be a single column"
...
This reverts commit ec716a35b2 .
2018-08-02 10:59:58 +01:00
Erik Johnston
40c1c59cf4
Merge pull request #3621 from matrix-org/erikj/split_fed_store
...
Split out DB writes in federation handler
2018-08-02 10:41:42 +01:00
Neil Johnson
08281fe6b7
self.db_conn unused
2018-08-01 23:26:24 +01:00
Neil Johnson
c21d82bab3
normalise reaping query
2018-08-01 23:24:38 +01:00
Neil Johnson
ec716a35b2
change monthly_active_users table to be a single column
2018-08-01 17:54:37 +01:00
Neil Johnson
d766f26de9
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/mau_tracker
2018-08-01 17:49:41 +01:00
Neil Johnson
085435e13a
Merge pull request #3630 from matrix-org/neilj/mau_sign_in_log_in_limits
...
Initial impl of capping MAU
2018-08-01 15:58:45 +00:00
Richard van der Hoff
b8d7d3996b
Merge pull request #3620 from fuzzmz/return-404-room-not-found
...
return 404 if room not found
2018-08-01 16:34:32 +01:00
Richard van der Hoff
908be65e64
changelog
2018-08-01 16:23:31 +01:00
Neil Johnson
b7f203a566
count_monthly_users is now async
2018-08-01 16:17:42 +01:00
Neil Johnson
7ff44d9215
improve clarity
2018-08-01 16:17:00 +01:00
Richard van der Hoff
38b98e5a98
changelog
2018-08-01 16:07:49 +01:00
Richard van der Hoff
01e93f48ed
Kill off MatrixCodeMessageException
...
This code brings the SimpleHttpClient into line with the
MatrixFederationHttpClient by having it raise HttpResponseExceptions when a
request fails (rather than trying to parse for matrix errors and maybe raising
MatrixCodeMessageException).
Then, whenever we were checking for MatrixCodeMessageException and turning them
into SynapseErrors, we now need to check for HttpResponseExceptions and call
to_synapse_error.
2018-08-01 16:02:46 +01:00
Richard van der Hoff
018d75a148
Refactor code for turning HttpResponseException into SynapseError
...
This commit replaces SynapseError.from_http_response_exception with
HttpResponseException.to_synapse_error.
The new method actually returns a ProxiedRequestError, which allows us to pass
through additional metadata from the API call.
2018-08-01 16:02:46 +01:00
Richard van der Hoff
fa7dc889f1
Be more careful which errors we send back over the C-S API
...
We really shouldn't be sending all CodeMessageExceptions back over the C-S API;
it will include things like 401s which we shouldn't proxy.
That means that we need to explicitly turn a few HttpResponseExceptions into
SynapseErrors in the federation layer.
The effect of the latter is that the matrix errcode will get passed through
correctly to calling clients, which might help with some of the random
M_UNKNOWN errors when trying to join rooms.
2018-08-01 16:02:38 +01:00
Richard van der Hoff
c82ccd3027
Factor out exception handling in federation_client
...
Factor out the error handling from make_membership_event, send_join, and
send_leave, so that it can be shared.
2018-08-01 16:01:04 +01:00
Amber Brown
da7785147d
Python 3: Convert some unicode/bytes uses ( #3569 )
2018-08-02 00:54:06 +10:00
Neil Johnson
c480c4c962
fix isort
2018-08-01 14:25:58 +01:00
Neil Johnson
6eed16d8a2
fix test for py3
2018-08-01 14:02:10 +01:00
Neil Johnson
303f1c851f
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/mau_sign_in_log_in_limits
2018-08-01 13:42:50 +01:00
Erik Johnston
a6d7b74915
update docs
2018-08-01 13:39:14 +01:00
Erik Johnston
4b256b9271
_persist_auth_tree no longer returns anything
2018-08-01 13:39:07 +01:00
Neil Johnson
4e5ac901dd
clean up
2018-08-01 12:03:57 +01:00
Neil Johnson
f9f5559971
fix comment
2018-08-01 12:03:42 +01:00
Neil Johnson
4e6e00152c
fix known broken test
2018-08-01 11:48:37 +01:00
Neil Johnson
0aba3d361a
count_monthly_users() async
2018-08-01 11:47:58 +01:00
Neil Johnson
2c54f1c225
remove need to plot limit_usage_by_mau
2018-08-01 11:46:59 +01:00
Jan Christian Grünhage
c4842e16cb
Merge pull request #3543 from bebehei/docker
...
Improvements for Docker usage
2018-08-01 11:32:45 +02:00
Richard van der Hoff
6e63d6868c
Update 2952.bugfix
2018-08-01 10:31:22 +01:00
Richard van der Hoff
f49147d14f
Merge pull request #3634 from matrix-org/rav/wtf_is_a_replication_layer
...
rename replication_layer to federation_client
2018-08-01 10:29:29 +01:00
Richard van der Hoff
cab782c17e
Merge pull request #3384 from matrix-org/rav/rewrite_cachedlist_decorator
...
Rewrite cache list decorator
2018-08-01 10:28:56 +01:00
Neil Johnson
6023cdd227
remove errant print
2018-08-01 10:27:17 +01:00
Neil Johnson
7931393495
make count_monthly_users async synapse/handlers/auth.py
2018-08-01 10:21:56 +01:00
Neil Johnson
c507fa15ce
only need to loop if mau limiting is enabled
2018-08-01 10:20:42 +01:00
Travis Ralston
37be52ac34
limt -> limit
2018-07-31 16:29:09 -06:00
Serban Constantin
70af98e361
return NotFoundError if room not found
...
Per the Client-Server API[0] we should return
`M_NOT_FOUND` if the room isn't found instead
of generic SynapseError.
This ensures that /directory/list API returns
404 for room not found instead of 400.
[0]: https://matrix.org/docs/spec/client_server/unstable.html#get-matrix-client-r0-directory-list-room-roomid
Signed-off-by: Serban Constantin <serban.constantin@gmail.com >
2018-07-31 21:47:23 +03:00
Travis Ralston
5e2ee64660
Merge pull request #3628 from turt2live/travis/goodby-pdu-failures
...
Remove pdu_failures from transactions
2018-07-31 12:13:09 -06:00
Richard van der Hoff
1841672c85
changelog
2018-07-31 18:26:54 +01:00
Neil Johnson
6ef983ce5c
api into monthly_active_users table
2018-07-31 16:36:24 +01:00
Richard van der Hoff
bdbdceeafa
rename replication_layer to federation_client
...
I have HAD ENOUGH of trying to remember wtf a replication layer is in terms of
classes.
2018-07-31 15:44:05 +01:00
Erik Johnston
16bd63f32f
Newsfile
2018-07-31 14:48:43 +01:00
Erik Johnston
443da003bc
Use new helper base class for membership requests
2018-07-31 14:32:23 +01:00
Erik Johnston
729b672823
Use new helper base class for ReplicationSendEventRestServlet
2018-07-31 14:32:23 +01:00
Erik Johnston
d81602b75a
Add helper base class for generating new replication endpoints
...
This will hopefully reduce the boiler plate required to implement new
internal HTTP requests.
2018-07-31 14:32:20 +01:00
Richard van der Hoff
5de936caa1
Merge pull request #3612 from matrix-org/rav/store_heirarchy
...
Make EventStore inherit from EventFederationStore
2018-07-31 13:44:04 +01:00
Neil Johnson
5bb39b1e0c
mau limts
2018-07-31 13:22:14 +01:00
Neil Johnson
df2235e7fa
coding style
2018-07-31 13:16:20 +01:00
Richard van der Hoff
0bc9b9e397
reinstate explicit include of EventsWorkerStore
2018-07-31 13:11:04 +01:00
Neil Johnson
7d05406a07
fix user_ips counting
2018-07-31 12:03:23 +01:00
Richard van der Hoff
82977477e3
Merge pull request #3629 from ptman/patch-1
...
Add some documentation for using the dashboard
2018-07-31 11:31:52 +01:00
Paul Tötterman
9c14c2b561
Add some documentation for using the dashboard
2018-07-31 12:48:37 +03:00
Richard van der Hoff
6aab397ada
synapse grafana dashboard
2018-07-31 09:45:58 +01:00
Amber Brown
52384f2ee5
Merge pull request #3626 from krombel/only_import_secrets_when_available
...
Only import secrets when available
2018-07-31 08:58:24 +10:00
Travis Ralston
e908b86832
Remove pdu_failures from transactions
...
The field is never read from, and all the opportunities given to populate it are not utilized. It should be very safe to remove this.
2018-07-30 16:28:47 -06:00
Krombel
254e8267e2
Only import secrets when available
...
secrets got introduced in python 3.6 so this class is not available
in 3.5 and before.
This now checks for the current running version and only tries using
secrets if the version is 3.6 or above
Signed-Off-By: Matthias Kesler <krombel@krombel.de >
2018-07-30 23:59:02 +02:00
Neil Johnson
21276ff846
remove errant logging
2018-07-30 22:42:12 +01:00
Neil Johnson
fef7e58ac6
actually close conn
2018-07-30 22:29:44 +01:00
Neil Johnson
cefac79c10
monthly_active_tests
2018-07-30 22:08:09 +01:00
Neil Johnson
9b13817e06
factor out metrics from __init__ to app/homeserver
2018-07-30 22:07:07 +01:00
Neil Johnson
251e6c1210
limit register and sign in on number of monthly users
2018-07-30 15:55:57 +01:00
Erik Johnston
143f1a2532
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/split_fed_store
2018-07-30 09:56:18 +01:00
Jeroen
2903e65aff
fix isort
2018-07-29 19:47:08 +02:00
Richard van der Hoff
a8cbce0ced
fix invalidation
2018-07-27 16:17:17 +01:00
Matthew Hodgson
e9b2d047f6
make /context lazyload & filter aware ( #3567 )
...
make /context lazyload & filter aware.
2018-07-27 15:12:50 +01:00
Erik Johnston
ad7cd95a78
Newsfile
2018-07-27 15:02:57 +01:00
Richard van der Hoff
f102c05856
Rewrite cache list decorator
...
Because it was complicated and annoyed me. I suspect this will be more
efficient too.
2018-07-27 13:47:04 +01:00
Jeroen
8e3f75b39a
fix accidental removal of hs
2018-07-27 12:17:31 +02:00
Richard van der Hoff
b0b5566f36
Merge pull request #3391 from t3chguy/t3chguy/default_inviter_display_name_3pid
...
if inviter_display_name == ""||None then default to inviter MXID
2018-07-27 10:08:39 +01:00
Richard van der Hoff
781c2bd21a
Merge pull request #3469 from DJViking/master
...
Add instructions for install on OpenSUSE and SLES
2018-07-27 09:21:41 +01:00
Richard van der Hoff
7041cd872b
Merge branch 'develop' into send_sni_for_federation_requests
2018-07-27 09:17:11 +01:00
Richard van der Hoff
d42455cdc9
Merge pull request #3616 from matrix-org/travis/event_id_send_leave
...
Update the send_leave path to be an event_id
2018-07-26 23:25:17 +01:00
Richard van der Hoff
65c8dee900
Merge pull request #3614 from matrix-org/rav/stop_populating_event_content
...
Stop populating events.content
2018-07-26 22:54:08 +01:00
Matthew Hodgson
a75231b507
Deduplicate redundant lazy-loaded members ( #3331 )
...
* attempt at deduplicating lazy-loaded members
as per the proposal; we can deduplicate redundant lazy-loaded members
which are sent in the same sync sequence. we do this heuristically
rather than requiring the client to somehow tell us which members it
has chosen to cache, by instead caching the last N members sent to
a client, and not sending them again. For now we hardcode N to 100.
Each cache for a given (user,device) tuple is in turn cached for up to
X minutes (to avoid the caches building up). For now we hardcode X to 30.
* add include_redundant_members filter option & make it work
* remove stale todo
* add tests for _get_some_state_from_cache
* incorporate review
2018-07-26 22:51:30 +01:00
Richard van der Hoff
9e68b1bd2d
Merge pull request #3613 from matrix-org/rav/stop_using_event_edges_room_id
...
Remove some redundant joins on event_edges.room_id
2018-07-26 22:31:01 +01:00
Travis Ralston
49254d43a6
Create 3616.misc
2018-07-26 14:45:48 -06:00
Travis Ralston
7d32f0d745
Update the send_leave path to be an event_id
...
It's still not used, however the parameter is an event ID not a transaction ID.
2018-07-26 14:41:59 -06:00
Richard van der Hoff
ef9d51b081
Merge pull request #3610 from matrix-org/rav/fix_looping_calls
...
Fix some looping_call calls which were broken in #3604
2018-07-26 14:55:57 +01:00
Richard van der Hoff
85531a06a2
changelog
2018-07-26 14:55:29 +01:00
Richard van der Hoff
51d7df1915
Create the column nullable
...
There's no real point in ever making the column non-nullable, and doing so
breaks the sytests.
2018-07-26 14:54:04 +01:00
Richard van der Hoff
5c1d301fd9
Stop populating events.content
...
This field is no longer read from, so we should stop populating it. Once we're
happy that this doesn't break everything, and a rollback is unlikely, we can
think about dropping the column.
2018-07-26 14:43:02 +01:00
Richard van der Hoff
cf78eaebad
changelog
2018-07-26 13:22:40 +01:00
Richard van der Hoff
bd4b25f4d0
Remove some redundant joins on event_edges.room_id
...
We've long passed the point where it's possible to have the same event_id in
different tables, so these join conditions are redundant: we can just join on
event_id.
event_edges is of non-trivial size, and the room_id column is wasteful, so
let's stop reading from it. In future, we can stop writing to it, and then drop
it.
2018-07-26 13:19:08 +01:00
Richard van der Hoff
1b4d73fa52
comment on event_edges
2018-07-26 12:53:51 +01:00
Richard van der Hoff
a15ed52267
changelog
2018-07-26 12:53:18 +01:00
Richard van der Hoff
21e878ebb6
Make EventStore inherit from EventFederationStore
...
(since it uses methods therein)
Turns out that we had a bunch of things which were incorrectly importing
EventWorkerStore from events.py rather than events_worker.py, which broke once
I removed the import into events.py.
2018-07-26 12:48:51 +01:00
Richard van der Hoff
03751a6420
Fix some looping_call calls which were broken in #3604
...
It turns out that looping_call does check the deferred returned by its
callback, and (at least in the case of client_ips), we were relying on this,
and I broke it in #3604 .
Update run_as_background_process to return the deferred, and make sure we
return it to clock.looping_call.
2018-07-26 11:48:08 +01:00
Matthew Hodgson
1bcd0490c2
Merge pull request #2970 from matrix-org/matthew/filter_members
...
Implement the lazy_load_members room state filter parameter
2018-07-26 00:03:01 +01:00
Matthew Hodgson
bc7944e6d2
switch missing_types to be a bool
2018-07-25 23:36:31 +01:00
Travis Ralston
a4fe9d2d36
Merge pull request #3609 from matrix-org/travis/doc-typo-2
...
Fix a minor documentation typo in on_make_leave
2018-07-25 16:09:45 -06:00
Travis Ralston
6185650f9c
Create 3609.misc
2018-07-25 15:46:56 -06:00
Travis Ralston
d8e65ed7e1
Fix a minor documentation typo in on_make_leave
2018-07-25 15:44:41 -06:00
Matthew Hodgson
2565804030
Merge branch 'develop' into matthew/filter_members
2018-07-25 17:27:49 +01:00
Matthew Hodgson
0620d27f4d
flake8
2018-07-25 17:21:17 +01:00
Matthew Hodgson
0a7ee0ab8b
add tests for _get_some_state_from_cache
2018-07-25 16:33:52 +01:00
Matthew Hodgson
7d9fb88617
incorporate more review.
2018-07-25 16:33:50 +01:00
Erik Johnston
78a691d005
Split out DB writes in federation handler
...
This will allow us to easily add an internal replication API to proxy
these reqeusts to master, so that we can move federation APIs to
workers.
2018-07-25 16:22:56 +01:00
Erik Johnston
3849f7f69f
Merge pull request #3603 from matrix-org/erikj/handle_outliers
...
Correctly handle outliers during persist events
2018-07-25 13:24:04 +01:00
Richard van der Hoff
cee1ae1b72
Merge pull request #3606 from matrix-org/rav/logcontext_fixes_once_more
...
Fix another logcontext leak in _persist_events
2018-07-25 11:56:00 +01:00
Richard van der Hoff
32b30e15f2
Merge pull request #3607 from matrix-org/rav/fix_persist_events_integrity_error
...
Fix occasional 'tuple index out of range' error
2018-07-25 11:55:45 +01:00
Richard van der Hoff
4081bd1560
Merge pull request #3605 from matrix-org/rav/fix_update_remote_profile_cache
...
Fix updating of cached remote profiles
2018-07-25 11:54:46 +01:00
Richard van der Hoff
1bfb5bed1d
Merge pull request #3604 from matrix-org/rav/background_process_fixes
...
Wrap a number of things that run in the background
2018-07-25 11:54:33 +01:00
Erik Johnston
7780a7b47c
Actually fix it by adding continue
2018-07-25 11:13:20 +01:00
Richard van der Hoff
1be94440d3
Fix occasional 'tuple index out of range' error
...
This fixes a bug in _delete_existing_rows_txn which was introduced in #3435
(though it's been on matrix-org-hotfixes for *years*). This code is only called
when there is some sort of conflict the first time we try to persist an event,
so it only happens rarely. Still, the exceptions are annoying.
2018-07-25 11:05:58 +01:00
Richard van der Hoff
07defd5fe6
Fix another logcontext leak in _persist_events
...
We need to run the errback in the sentinel context to avoid losing our own
context.
Also: add logging to runInteraction to help identify where "Starting db
connection from sentinel context" warnings are coming from
2018-07-25 10:53:23 +01:00
Richard van der Hoff
9c237a7ab5
changelog
2018-07-25 10:46:01 +01:00
Richard van der Hoff
55acd6856c
Fix updating of cached remote profiles
...
_update_remote_profile_cache was missing its `defer.inlineCallbacks`, so when
it was called, would just return a generator object, without actually running
any of the method body.
2018-07-25 10:34:48 +01:00
Richard van der Hoff
f59be4eb0e
Fix unit tests
...
on_notifier_poke no longer runs synchonously, so we have to do a different hack
to make sure that the replication data has been sent. Let's actually listen for
its arrival.
2018-07-25 10:30:36 +01:00
Erik Johnston
a297ff2b16
Fix typo in conditional
2018-07-25 09:48:01 +01:00
Richard van der Hoff
3f11d84534
Changelog
2018-07-25 09:43:25 +01:00
Richard van der Hoff
371da42ae4
Wrap a number of things that run in the background
...
This will reduce the number of "Starting db connection from sentinel context"
warnings, and will help with our metrics.
2018-07-25 09:41:12 +01:00
Erik Johnston
0b300d323a
Newsfile
2018-07-25 09:39:45 +01:00
Erik Johnston
ec56121b0d
Correctly handle outliers during persist events
...
We incorrectly asserted that all contexts must have a non None state
group without consider outliers. This would usually be fine as the
assertion would never be hit, as there is a shortcut during persistence
if the forward extremities don't change.
However, if the outlier is being persisted with non-outlier events, the
function would be called and the assertion would be hit.
Fixes #3601
2018-07-25 09:35:02 +01:00
Matthew Hodgson
cb5c37a57c
handle the edge case for _get_some_state_from_cache where types is []
2018-07-24 20:34:45 +01:00
Michael Telatynski
38eaa5280d
add changelog entry for PR#3391
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
2018-07-24 17:25:42 +01:00
Erik Johnston
1e5dbdcbb1
Merge pull request #3597 from matrix-org/erikj/did_forget
...
Fix client_reader worker being able to handle /context requests
2018-07-24 17:20:39 +01:00
Erik Johnston
1674a85238
Move newsfile
2018-07-24 17:20:27 +01:00
Michael Telatynski
87951d3891
Merge branch 'develop' of github.com:matrix-org/synapse into t3chguy/default_inviter_display_name_3pid
2018-07-24 17:17:46 +01:00
Erik Johnston
f14c866e37
Newsfile
2018-07-24 16:51:19 +01:00
Erik Johnston
8b8c4f34a3
Replace usage of get_current_toke with StreamToken.START
...
This allows us to handle /context/ requests on the client_reader worker
without having to pull in all the various stream handlers (e.g.
precence, typing, pushers etc). The only thing the token gets used for
is pagination, and that ignores everything but the room portion of the
token.
2018-07-24 16:49:17 +01:00
Erik Johnston
3188973857
Pull out did_forget to worker store
2018-07-24 16:49:14 +01:00
Erik Johnston
60a1d147a7
Merge pull request #3595 from matrix-org/erikj/use_deltas
...
Use deltas to calculate current state deltas
2018-07-24 15:41:18 +01:00
Erik Johnston
709c309b0e
Expand on docstring comment about return value
2018-07-24 15:12:50 +01:00
Erik Johnston
8f65ab98d2
Remove unnecessary iteritems
2018-07-24 15:08:01 +01:00
Erik Johnston
ed0dd68731
Fixup comment (and indent)
2018-07-24 14:31:38 +01:00
Erik Johnston
f33c596533
Newsfile
2018-07-24 14:28:04 +01:00
Erik Johnston
811ac73a42
Don't fetch state from the database unless needed
2018-07-24 14:18:23 +01:00
Erik Johnston
a79410e7b8
Have _get_new_state_after_events return delta
...
If we have a delta from the existing to new current state, then we can
reuse that rather than manually working it out by fetching both lots of
state.
2018-07-24 14:14:17 +01:00
Richard van der Hoff
f7b133fc26
Merge pull request #3594 from matrix-org/richvdh-patch-1
...
Update ISSUE_TEMPLATE.md
2018-07-24 14:13:15 +01:00
Richard van der Hoff
81946db9cf
Merge pull request #3587 from matrix-org/rav/better_exception_logging
...
Improve logging for exceptions when handling PDUs
2018-07-24 14:12:12 +01:00
Richard van der Hoff
a321f78991
Merge pull request #3586 from matrix-org/rav/optimise_resolve_state_groups
...
Fixes and optimisations for resolve_state_groups
2018-07-24 14:11:45 +01:00
Richard van der Hoff
93b0722c50
Merge pull request #3583 from matrix-org/rav/remove_who_forgot_in_room
...
Remove redundant checks on room forgottenness
2018-07-24 14:11:11 +01:00
Matthew Hodgson
454f59b7ad
Merge branch 'develop' into matthew/filter_members
2018-07-24 14:03:37 +01:00
Matthew Hodgson
1a01a5b964
clarify comment on p_ids
2018-07-24 14:03:15 +01:00
Erik Johnston
223341205e
Don't require to_delete to have event_ids
2018-07-24 14:02:40 +01:00
Matthew Hodgson
e22700c3dd
consider non-filter_type types as wildcards, thus missing from the state-group-cache
2018-07-24 13:59:07 +01:00
Richard van der Hoff
7417951117
Update ISSUE_TEMPLATE.md
...
request backticks for logs
2018-07-24 13:46:39 +01:00
Matthew Hodgson
eb1d911ab7
rather than adding ll_ids, remove them from p_ids
2018-07-24 13:40:49 +01:00
Erik Johnston
0a8e4f3af9
Merge pull request #3592 from matrix-org/erikj/speed_up_calculate_state_delta
...
Speed up _calculate_state_delta
2018-07-24 13:39:58 +01:00
Matthew Hodgson
d19fba3655
Merge branch 'develop' into matthew/filter_members
2018-07-24 12:39:54 +01:00
Matthew Hodgson
cd241d6bda
incorporate more review
2018-07-24 12:39:40 +01:00
Richard van der Hoff
30bfed5aa5
Merge remote-tracking branch 'origin/develop' into rav/remove_who_forgot_in_room
2018-07-24 11:46:09 +01:00
Erik Johnston
97acd385a3
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/speed_up_calculate_state_delta
2018-07-24 11:32:13 +01:00
Erik Johnston
0fa73e4a63
Remove unnecessary if
2018-07-24 11:19:23 +01:00
Erik Johnston
2581eb3e1d
Newsfile
2018-07-24 11:14:28 +01:00
Richard van der Hoff
69292de6cc
Merge pull request #3591 from matrix-org/rav/logcontext_fixes
...
Logcontext fixes
2018-07-24 11:11:27 +01:00
Erik Johnston
ff5426f6b8
Speed up _calculate_state_delta
2018-07-24 10:55:11 +01:00
Richard van der Hoff
a678145010
Merge branch 'develop' into rav/logcontext_fixes
2018-07-24 10:43:30 +01:00
Erik Johnston
d436ad332c
Merge pull request #3555 from matrix-org/erikj/client_apis_move
...
Make client_reader support some more read only APIs
2018-07-24 10:42:28 +01:00
Richard van der Hoff
2601ee28bd
Merge pull request #3590 from matrix-org/rav/persist_events_metrics
...
Add some measure blocks to persist_events
2018-07-24 10:41:51 +01:00
Erik Johnston
536bc63a4e
Merge branch 'develop' into erikj/client_apis_move
2018-07-24 09:57:05 +01:00
Richard van der Hoff
cf2d15c6a9
another couple of logcontext leaks
2018-07-24 00:57:48 +01:00
Richard van der Hoff
c6e66821a9
Changelog
2018-07-24 00:38:39 +01:00
Richard van der Hoff
8dff6e0322
Logcontext fixes
...
Fix some random logcontext leaks.
2018-07-24 00:37:17 +01:00
Richard van der Hoff
30957a941a
changelog
2018-07-24 00:24:38 +01:00
Richard van der Hoff
69fb5dbdab
fix idiocy
2018-07-24 00:04:44 +01:00
Richard van der Hoff
1938cffaea
Add some measure blocks to persist_events
...
... to help us figure out where 40% of CPU is going
2018-07-23 23:48:19 +01:00
Matthew Hodgson
efcdacad7d
handle case where types is [] on postgres correctly
2018-07-23 22:41:05 +01:00
Matthew Hodgson
004a83b43a
changelog
2018-07-23 22:32:35 +01:00
Richard van der Hoff
d8709df739
changelog
2018-07-23 22:16:22 +01:00
Richard van der Hoff
ce0c18dec5
Improve logging for exceptions handling PDUs
...
when we get an exception handling a federation PDU, log the whole stacktrace.
2018-07-23 22:13:19 +01:00
Richard van der Hoff
c1f80effbe
Handle delta_ids being None in _update_context_for_auth_events
...
it's easier to create the new state group as a delta from the existing one.
(There's an outside chance this will help with
https://github.com/matrix-org/synapse/issues/3364 )
2018-07-23 22:06:50 +01:00
Matthew Hodgson
adfe29ec0b
Merge branch 'develop' into matthew/filter_members
2018-07-23 19:21:37 +01:00
Matthew Hodgson
254fb430d1
incorporate review
2018-07-23 19:21:20 +01:00
Richard van der Hoff
cc99256e90
newsfile
2018-07-23 19:10:50 +01:00
Richard van der Hoff
5c705f70c9
Fixes and optimisations for resolve_state_groups
...
First of all, fix the logic which looks for identical input state groups so
that we actually use them. This turned out to be most easily done by factoring
the relevant code out to a separate function so that we could do an early
return.
Secondly, avoid building the whole `conflicted_state` dict (which was only ever
used as a boolean flag).
Thirdly, replace the construction of the `state` dict (which mapped from keys
to events that set them), with an optimistic construction of the resolution
result assuming there will be no conflicts. This should be no slower than
building the old `state` dict, and:
- in the conflicted case, we'll short-cut it, saving part of the work
- in the unconflicted case, it saves rebuilding the resolution from the
`state` dict.
Finally, do a couple of s/values/itervalues/.
2018-07-23 19:10:11 +01:00
Erik Johnston
f559119de0
Merge pull request #3584 from matrix-org/erikj/use_cached
...
Only get cached state from context in persist_event
2018-07-23 17:52:45 +01:00
Erik Johnston
8b9f164fff
Comments
2018-07-23 17:43:01 +01:00
Erik Johnston
2d5bba151b
Newsfile
2018-07-23 17:29:32 +01:00
Erik Johnston
50c60e5fad
Only get cached state from context in persist_event
...
We don't want to bother pulling out the current state from the DB since
until we know we have to. Checking the context for state is just an
optimisation.
2018-07-23 17:21:40 +01:00
Richard van der Hoff
4f5cc8e4e7
Merge remote-tracking branch 'origin/develop' into rav/remove_who_forgot_in_room
2018-07-23 17:15:12 +01:00
Richard van der Hoff
dae6dc1e77
Remove redundant checks on room forgottenness
...
Fixes #3550
2018-07-23 17:13:34 +01:00
Erik Johnston
a646bdc670
Merge pull request #3582 from matrix-org/erikj/fixup_stateless
...
Fix missing attributes on workers.
2018-07-23 16:44:42 +01:00
Erik Johnston
9f41ad491d
Newsfile
2018-07-23 16:31:46 +01:00
Erik Johnston
0faa3223cd
Fix missing attributes on workers.
...
This was missed during the transition from attribute to getter for
getting state from context.
2018-07-23 16:28:00 +01:00
Erik Johnston
37e87611bc
Merge pull request #3581 from matrix-org/erikj/fixup_stateless
...
Fix EventContext when using workers
2018-07-23 16:06:59 +01:00
Erik Johnston
a4d24781bf
Newsfile
2018-07-23 15:28:51 +01:00
Erik Johnston
999bcf9d01
Fix EventContext when using workers
...
We were:
1. Not correctly setting all attributes
2. Using defer.inlineCallbacks in a non-generator
2018-07-23 15:24:21 +01:00
Erik Johnston
9c294ea864
Merge pull request #3579 from matrix-org/erikj/stateless_contexts_4
...
Add concept of StatelessContext, take 4.
2018-07-23 15:14:39 +01:00
Erik Johnston
4797ed000e
Update docstrings to make sense
2018-07-23 15:05:56 +01:00
Richard van der Hoff
726a0b1e64
Merge branch 'develop' into erikj/stateless_contexts_4
2018-07-23 14:44:27 +01:00
Erik Johnston
f0a1b8e4cd
Merge pull request #3577 from matrix-org/erikj/cleanup_context
...
Refcator EventContext to accept state during init
2018-07-23 14:41:37 +01:00
Erik Johnston
8fbe418777
Fix unit tests
2018-07-23 13:33:49 +01:00
Erik Johnston
0b0b24cb82
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/client_apis_move
2018-07-23 13:21:15 +01:00
Erik Johnston
4fc52b1037
Update docs/workers.rst
2018-07-23 13:20:43 +01:00
Erik Johnston
f3182bb1d0
Newsfile
2018-07-23 13:19:24 +01:00
Erik Johnston
027bc01a1b
Add support for updating state
2018-07-23 13:17:25 +01:00
Erik Johnston
e42510ba63
Use new getters
2018-07-23 13:17:22 +01:00
Erik Johnston
440b8845b5
Make EventContext lazy load state
2018-07-23 12:56:56 +01:00
Erik Johnston
842cdece42
pep8
2018-07-23 12:31:35 +01:00
Erik Johnston
959f4b9074
Newsfile
2018-07-23 12:22:59 +01:00
Erik Johnston
acbfdc3442
Refcator EventContext to accept state during init
2018-07-23 12:20:55 +01:00
Matthew Hodgson
354a99c968
Merge pull request #3520 from matrix-org/matthew/sync_deleted_devices
...
Announce deleted devices explicitly over federation.
2018-07-23 10:16:05 +01:00
Matthew Hodgson
9b34f3ea3a
Merge branch 'develop' into matthew/sync_deleted_devices
2018-07-23 10:03:28 +01:00
Matthew Hodgson
c1bf2b587e
add trailing comma
2018-07-23 09:56:23 +01:00
Amber Brown
3132b89f12
Make the rest of the .iterwhatever go away ( #3562 )
2018-07-21 15:47:18 +10:00
Erik Johnston
5c88bb722f
Move PaginationHandler to its own file
2018-07-20 15:32:23 +01:00
Erik Johnston
0ecf68aedc
Move check_in_room_or_world_readable to Auth
2018-07-20 15:30:59 +01:00
Richard van der Hoff
ff48ab8527
Merge pull request #3572 from matrix-org/rav/linearizer_cancellation
...
Test and fix support for cancellation in Linearizer
2018-07-20 14:44:02 +01:00
Richard van der Hoff
5c30cb709a
Changelog
2018-07-20 14:01:36 +01:00
Richard van der Hoff
3d6df84658
Test and fix support for cancellation in Linearizer
2018-07-20 13:59:55 +01:00
Richard van der Hoff
4f67623674
Merge pull request #3571 from matrix-org/rav/limiter_fixes
...
A set of improvements to the Limiter
2018-07-20 13:53:03 +01:00
Amber Brown
e1a237eaab
Admin API for creating new users ( #3415 )
2018-07-20 22:41:13 +10:00
Richard van der Hoff
683f4058c1
changelogs
2018-07-20 13:16:39 +01:00
Richard van der Hoff
7c712f95bb
Combine Limiter and Linearizer
...
Linearizer was effectively a Limiter with max_count=1, so rather than
maintaining two sets of code, let's combine them.
2018-07-20 13:11:43 +01:00
Richard van der Hoff
8462c26485
Improvements to the Limiter
...
* give them names, to improve logging
* use a deque rather than a list for efficiency
2018-07-20 12:50:27 +01:00
Richard van der Hoff
d7275eecf3
Add a sleep to the Limiter to fix stack overflows.
...
Fixes #3570
2018-07-20 12:37:12 +01:00
Matthew Hodgson
650daf5628
make test work
2018-07-19 20:49:44 +01:00
Matthew Hodgson
1fa4f7e03e
first cut of a UT for testing state store (untested)
2018-07-19 20:19:32 +01:00
Matthew Hodgson
2f558300cc
fix thinkos; unbreak tests
2018-07-19 19:22:27 +01:00
Matthew Hodgson
bcaec2915a
incorporate review
2018-07-19 19:03:50 +01:00
Matthew Hodgson
924eb34d94
add a filtered_types param to limit filtering to specific types
2018-07-19 18:32:02 +01:00
Richard van der Hoff
7044af3298
Merge pull request #3564 from matrix-org/hawkowl/markdown
...
Switch changes to markdown & flip content on for miscs
2018-07-19 17:31:59 +01:00
Richard van der Hoff
5f3658baf5
Merge pull request #3377 from Valodim/note-affinity
...
document that the affinity package is required for the cpu_affinity setting
2018-07-19 14:35:06 +01:00
Amber Brown
fd9b08873c
Merge remote-tracking branch 'origin/develop' into hawkowl/markdown
2018-07-19 21:48:28 +10:00
Richard van der Hoff
11d592290c
Merge branch 'master' into develop
2018-07-19 12:44:04 +01:00
Amber Brown
87086ac69d
fixes
2018-07-19 21:42:40 +10:00
Amber Brown
7814e4cc86
fix up weird translation things
2018-07-19 21:37:57 +10:00
Richard van der Hoff
6284f579bf
Update r0.33.0 release notes
...
(mostly just clarifications)
2018-07-19 12:37:55 +01:00
Amber Brown
7cf76c9a09
changelog
2018-07-19 21:26:30 +10:00
Amber Brown
37af0d2a13
make pyproject point at it
2018-07-19 21:25:47 +10:00
Amber Brown
252f80094c
rst -> md
2018-07-19 21:25:33 +10:00
Amber Brown
9a8acdc720
Merge branch 'master' into develop
2018-07-19 21:16:44 +10:00
Amber Brown
d69decd5c7
0.33.0 final changelog
2018-07-19 21:12:15 +10:00
Amber Brown
38f53399a2
0.33 final
2018-07-19 21:11:40 +10:00
Amber Brown
13d501c773
update changelogs
2018-07-19 21:11:24 +10:00
Amber Brown
ce0545eca1
Revert "0.33.0rc1 changelog"
...
This reverts commit 21d3b87943 .
2018-07-19 21:03:15 +10:00
Amber Brown
95ccb6e2ec
Don't spew errors because we can't save metrics ( #3563 )
2018-07-19 20:58:18 +10:00
Richard van der Hoff
ba6477feac
Merge pull request #3507 from Peetz0r/patch-1
...
Changed http links to https
2018-07-19 11:55:40 +01:00
Matthew Hodgson
be3adfc331
merge develop pydoc for _get_state_for_groups
2018-07-19 11:26:04 +01:00
Matthew Hodgson
9e40834f74
yes, we do need to invalidate the device_id_exists_cache when deleting a remote device
2018-07-19 11:15:10 +01:00
Richard van der Hoff
f1a15ea206
revert 00bc979
...
... we've fixed the things that caused the warnings, so we should reinstate the
warning.
2018-07-19 11:14:20 +01:00
Richard van der Hoff
1ffb7bec20
Merge remote-tracking branch 'origin/release-v0.33.0' into develop
2018-07-19 11:12:33 +01:00
Richard van der Hoff
2de3d994f3
Merge pull request #3561 from matrix-org/rav/disable_logcontext_warning
...
Disable logcontext warning
2018-07-19 11:05:57 +01:00
Richard van der Hoff
c754e006f4
Merge pull request #3556 from matrix-org/rav/background_processes
...
Run things as background processes
2018-07-19 11:04:18 +01:00
Amber Brown
a97c845271
Move v1-only APIs into their own module & isolate deprecated ones ( #3460 )
2018-07-19 20:03:33 +10:00
Matthew Hodgson
c0685f67c0
spell out that include_deleted_devices requires include_all_devices
2018-07-19 10:59:02 +01:00
Richard van der Hoff
18a2b2c0b4
changelog
2018-07-19 10:54:39 +01:00
Richard van der Hoff
00bc979137
Disable logcontext warning
...
Temporary workaround to #3518 while we release 0.33.0.
2018-07-19 10:51:15 +01:00
Benedikt Heine
f1dd89fe86
[Docker] Use sorted multiline package lists
...
This matches docker best practices.
Signed-off-by: Benedikt Heine <bebe@bebehei.de >
2018-07-19 11:38:58 +02:00
Erik Johnston
6f62a6ef21
Merge pull request #3554 from matrix-org/erikj/response_metrics_code
...
Add response code to response timer metrics
2018-07-19 10:25:18 +01:00
Amber Brown
77091d7e8e
Merge pull request #3559 from matrix-org/rav/pep8_config
...
add config for pep8
2018-07-19 13:17:07 +10:00
Richard van der Hoff
eed24893fa
changelog
2018-07-18 22:12:19 +01:00
Richard van der Hoff
3f9e649f17
add config for pep8
...
Since, for better or worse, we seem to have configured isort to generate
89-character lines, pycharm is now complaining at me that our lines are too
long.
So, let's configure pep8 to behave consistently with flake8.
2018-07-18 20:55:37 +01:00
Richard van der Hoff
8c69b735e3
Make Distributor run its processes as a background process
...
This is more involved than it might otherwise be, because the current
implementation just drops its logcontexts and runs everything in the sentinel
context.
It turns out that we aren't actually using a bunch of the functionality here
(notably suppress_failures and the fact that Distributor.fire returns a
deferred), so the easiest way to fix this is actually by simplifying a bunch of
code.
2018-07-18 20:55:05 +01:00
Richard van der Hoff
08436c556a
changelog
2018-07-18 20:55:05 +01:00
Richard van der Hoff
667fba68f3
Run things as background processes
...
This fixes #3518 , and ensures that we get useful logs and metrics for lots of
things that happen in the background.
(There are certainly more things that happen in the background; these are just
the common ones I've found running a single-process synapse locally).
2018-07-18 20:55:05 +01:00
Erik Johnston
3a993a660d
Newsfile
2018-07-18 15:39:49 +01:00
Erik Johnston
9b596177ae
Add some room read only APIs to client_reader
2018-07-18 15:33:03 +01:00
Erik Johnston
bacdf0cbf9
Move RoomContextHandler out of Handlers
...
This is in preparation for moving GET /context/ to a worker
2018-07-18 15:33:03 +01:00
Erik Johnston
8cb8df55e9
Split MessageHandler into read only and writers
...
This will let us call the read only parts from workers, and so be able
to move some APIs off of master, e.g. the `/state` API.
2018-07-18 15:33:03 +01:00
Richard van der Hoff
65d6a0e477
Merge pull request #3553 from matrix-org/rav/background_process_tracking
...
Resource tracking for background processes
2018-07-18 14:27:50 +01:00
Erik Johnston
5bd0a47fcd
pep8
2018-07-18 14:19:00 +01:00
Erik Johnston
00845c49d2
Newsfile
2018-07-18 14:03:16 +01:00
Erik Johnston
e45a46b6e4
Add response code to response timer metrics
2018-07-18 13:59:36 +01:00
Richard van der Hoff
dab00faa83
Merge pull request #3367 from matrix-org/rav/drop_re_signing_hacks
...
Remove event re-signing hacks
2018-07-18 12:46:27 +01:00
David Baker
c91a44572e
Merge pull request #3514 from matrix-org/dbkr/turn_dont_add_defaults
...
Comment dummy TURN parameters in default config
2018-07-18 11:56:18 +01:00
Richard van der Hoff
92aecd557b
changelog
2018-07-18 11:29:48 +01:00
Richard van der Hoff
6e3fc657b4
Resource tracking for background processes
...
This introduces a mechanism for tracking resource usage by background
processes, along with an example of how it will be used.
This will help address #3518 , but more importantly will give us better insights
into things which are happening but not being shown up by the request metrics.
We *could* do this with Measure blocks, but:
- I think having them pulled out as a completely separate metric class will
make it easier to distinguish top-level processes from those which are
nested.
- I want to be able to report on in-flight background processes, and I don't
think we want to do this for *all* Measure blocks.
2018-07-18 10:50:33 +01:00
Amber Brown
21d3b87943
0.33.0rc1 changelog
2018-07-18 12:53:32 +10:00
Amber Brown
5f3d02f6eb
bump to 0.33.0rc1
2018-07-18 12:52:56 +10:00
Richard van der Hoff
0aed3fc346
Merge pull request #3546 from matrix-org/rav/fix_erasure_over_federation
...
Fix visibility of events from erased users over federation
2018-07-17 15:16:45 +01:00
Richard van der Hoff
79eb339c66
add a comment
2018-07-17 14:53:34 +01:00
Richard van der Hoff
4a11df5b64
changelog
2018-07-17 14:24:29 +01:00
Richard van der Hoff
d897be6a98
Fix visibility of events from erased users over federation
2018-07-17 14:02:07 +01:00
Richard van der Hoff
9c04b4abf9
Merge pull request #3541 from matrix-org/rav/optimize_filter_events_for_server
...
Refactor and optimze filter_events_for_server
2018-07-17 14:01:39 +01:00
Richard van der Hoff
94440ae994
fix imports
2018-07-17 11:51:26 +01:00
Amber Brown
bc006b3c9d
Refactor REST API tests to use explicit reactors ( #3351 )
2018-07-17 20:43:18 +10:00
Erik Johnston
c7320a5564
Merge pull request #3544 from matrix-org/erikj/fixup_stream_cache
...
Fix perf regression in PR #3530
2018-07-17 11:16:59 +01:00
Richard van der Hoff
2172a3d8cb
add a comment
2018-07-17 11:13:57 +01:00
Erik Johnston
b2aa05a8d6
Use efficient .intersection
2018-07-17 11:07:04 +01:00
Erik Johnston
850238b4ef
Add unit test
2018-07-17 10:59:02 +01:00
Erik Johnston
9952d18e4d
Newsfile
2018-07-17 10:31:51 +01:00
Erik Johnston
547b1355d3
Fix perf regression in PR #3530
...
The get_entities_changed function was changed to return all changed
entities since the given stream position, rather than only those changed
from a given list of entities. This resulted in the function incorrectly
returning large numbers of entities that, for example, caused large
increases in database usage.
2018-07-17 10:27:51 +01:00
Benedikt Heine
fe089b13cb
[Docker] Build docker image via compose
...
It's much easier to build the image via docker-compose instead of an
error-prone low-level docker call.
Signed-off-by: Benedikt Heine <bebe@bebehei.de >
2018-07-17 09:24:33 +02:00
Amber Brown
3fe0938b76
Merge pull request #3530 from matrix-org/erikj/stream_cache
...
Don't return unknown entities in get_entities_changed
2018-07-17 13:44:46 +10:00
Amber Brown
fe10dd9fb2
Merge pull request #3540 from krombel/enforce_isort
...
check isort by travis
2018-07-17 13:41:59 +10:00
Krombel
9677b1d1c0
rename 'isort' to 'check_isort' as requested
2018-07-16 16:03:41 +02:00
Richard van der Hoff
2731bf7ac3
Changelog
2018-07-16 14:12:25 +01:00
Richard van der Hoff
09e29fb58b
Attempt to make _filter_events_for_server more efficient
2018-07-16 14:06:09 +01:00
Richard van der Hoff
15b13b537f
Add a test which profiles filter_events_for_server in a large room
2018-07-16 14:06:09 +01:00
Krombel
78a9ddcf9a
rerun isort with latest version
2018-07-16 14:23:25 +02:00
Richard van der Hoff
ea69d35651
Move filter_events_for_server out of FederationHandler
...
for easier unit testing.
2018-07-16 13:06:24 +01:00
Krombel
4a27000548
check isort by travis
2018-07-16 13:57:33 +02:00
Jeroen
505530f36a
Merge remote-tracking branch 'upstream/develop' into send_sni_for_federation_requests
...
# Conflicts:
# synapse/crypto/context_factory.py
2018-07-14 20:24:46 +02:00
Amber Brown
8a4f05fefb
Fix develop because I broke it :( ( #3535 )
2018-07-14 09:51:00 +10:00
Amber Brown
8532953c04
Merge pull request #3534 from krombel/use_parse_and_asserts_from_servlet
...
Use parse and asserts from http.servlet
2018-07-14 09:09:19 +10:00
Amber Brown
a2374b2c7f
fix sytests
2018-07-14 07:52:58 +10:00
Amber Brown
33b60c01b5
Make auth & transactions more testable ( #3499 )
2018-07-14 07:34:49 +10:00
Krombel
516f960ad8
add changelog
2018-07-13 22:19:19 +02:00
Krombel
3366b9c534
rename assert_params_in_request to assert_params_in_dict
...
the method "assert_params_in_request" does handle dicts and not
requests. A request body has to be parsed to json before this method
can be used
2018-07-13 21:53:01 +02:00
Krombel
32fd6910d0
Use parse_{int,str} and assert from http.servlet
...
parse_integer and parse_string can take a request and raise errors
in case we have wrong or missing params.
This PR tries to use them more to deduplicate some code and make it
better readable
2018-07-13 21:40:14 +02:00
Erik Johnston
bc832f822f
Fixup unit test
2018-07-13 17:03:04 +01:00
Richard van der Hoff
2aba1f549c
Merge pull request #3533 from matrix-org/rav/fix_federation_ratelimite_queue
...
Make FederationRateLimiter queue requests properly
2018-07-13 16:59:18 +01:00
Richard van der Hoff
08546be40f
better changelog
2018-07-13 16:47:13 +01:00
Richard van der Hoff
b03a0e14db
changelog
2018-07-13 16:28:28 +01:00
Richard van der Hoff
3b391d9c45
Fix unit tests
2018-07-13 16:28:04 +01:00
Richard van der Hoff
33b40d0a25
Make FederationRateLimiter queue requests properly
...
popitem removes the *most recent* item by default [1]. We want the oldest.
Fixes #3524
[1]: https://docs.python.org/2/library/collections.html#collections.OrderedDict.popitem
2018-07-13 16:19:40 +01:00
Erik Johnston
5f263b607e
Newsfile
2018-07-13 15:47:25 +01:00
Erik Johnston
77b692e65d
Don't return unknown entities in get_entities_changed
...
The stream cache keeps track of all entities that have changed since
a particular stream position, so get_entities_changed does not need to
return unknown entites when given a larger stream position.
This makes it consistent with the behaviour of has_entity_changed.
2018-07-13 15:26:10 +01:00
Matthew Hodgson
ba22b6a456
typo
2018-07-13 12:03:39 +01:00
Richard van der Hoff
6dff49b8a9
Merge pull request #3521 from matrix-org/rav/optimise_stream_change_cache
...
Reduce set building in get_entities_changed
2018-07-12 12:08:49 +01:00
Matthew Hodgson
37c4fba0ac
changelog
2018-07-12 11:45:33 +01:00
Richard van der Hoff
38c5fa7ee4
changelog
2018-07-12 11:45:28 +01:00
Matthew Hodgson
12ec58301f
shift to using an explicit deleted flag on m.device_list_update EDUs
...
and generally make it work.
2018-07-12 11:39:43 +01:00
Richard van der Hoff
fa5c2bc082
Reduce set building in get_entities_changed
...
This line shows up as about 5% of cpu time on a synchrotron:
not_known_entities = set(entities) - set(self._entity_to_key)
Presumably the problem here is that _entity_to_key can be largeish, and
building a set for its keys every time this function is called is slow.
Here we rewrite the logic to avoid building so many sets.
2018-07-12 11:37:44 +01:00
Richard van der Hoff
4c4dd6299d
Merge pull request #3316 from matrix-org/rav/enforce_report_api
...
Enforce the specified API for report_event
2018-07-12 10:50:05 +01:00
Richard van der Hoff
c969754a91
changelog
2018-07-12 10:00:57 +01:00
Richard van der Hoff
482d17b58b
Merge branch 'develop' into rav/enforce_report_api
2018-07-12 09:56:28 +01:00
Erik Johnston
0456e05977
Merge pull request #3505 from matrix-org/erikj/receipts_cahce
...
Use stream cache in get_linearized_receipts_for_room
2018-07-12 09:46:29 +01:00
Erik Johnston
aff1dfdf3d
Update return value docstring
2018-07-12 09:45:37 +01:00
Matthew Hodgson
5797f5542b
WIP to announce deleted devices over federation
...
Previously we queued up the poke correctly when the device was deleted,
but then the actual EDU wouldn't get sent, as the device was no longer known.
Instead, we now send EDUs for deleted devices too if there's a poke for them.
2018-07-12 01:32:39 +01:00
David Baker
1b5425527c
I failed to correctly guess the PR number
2018-07-11 16:02:29 +01:00
David Baker
36f4fd3e1e
Comment dummy TURN parameters in default config
...
This default config is parsed and used a base before the actual
config is overlaid, so with these values not commented out, the
code to detect when no turn params were set and refuse to generate
credentials was never firing because the dummy default was always set.
2018-07-11 15:49:29 +01:00
Peter
2ef3f84945
change http links to https
...
Especially useful for the debian repo, as this makes it easier to get the key in a secure way
2018-07-10 21:14:22 +02:00
Amber Brown
129ffd7b88
Merge pull request #3498 from OlegGirko/fix_attrs_syntax
...
* Use more portable syntax using attrs package.
Newer syntax
attr.ib(factory=dict)
is just a syntactic sugar for
attr.ib(default=attr.Factory(dict))
It was introduced in newest version of attrs package (18.1.0)
and doesn't work with older versions.
We should either require minimum version of attrs to be 18.1.0,
or use older (slightly more verbose) syntax.
Requiring newest version is not a good solution because
Linux distributions may have older version of attrs (17.4.0 in Fedora 28),
and requiring to build (and package)
newer version just to use newer syntactic sugar in only one test
is just too much.
It's much better to fix that test to use older syntax.
Signed-off-by: Oleg Girko <ol@infoserver.lv >
2018-07-11 04:22:46 +10:00
Amber Brown
85354bb18e
changelog entry
2018-07-11 03:27:03 +10:00
Erik Johnston
6ccefef07a
Use 'is not None' and add comments
2018-07-10 18:12:39 +01:00
Matthew Hodgson
ea752bdd99
s/becuase/because/g
2018-07-10 17:58:18 +01:00
Erik Johnston
bb3d536087
Newsfile
2018-07-10 17:28:31 +01:00
Erik Johnston
05f5dabc10
Use stream cache in get_linearized_receipts_for_room
...
This avoids us from uncessarily hitting the database when there has been
no change for the room
2018-07-10 17:22:42 +01:00
Richard van der Hoff
c3c29aa196
Attempt to include db threads in cpu usage stats ( #3496 )
...
Let's try to include time spent in the DB threads in the per-request/block cpu
usage metrics.
2018-07-10 16:12:36 +01:00
Richard van der Hoff
55370331da
Refactor logcontext resource usage tracking ( #3501 )
...
Factor out the resource usage tracking out to a separate object, which can be
passed around and copied independently of the logcontext itself.
2018-07-10 13:56:07 +01:00
Matthew Hodgson
16b10666e7
another typo
2018-07-10 12:28:42 +01:00
Matthew Hodgson
4ea391a6ae
typo (i think)
2018-07-10 12:08:09 +01:00
Richard van der Hoff
b1fe697b3c
Merge pull request #3497 from matrix-org/rav/measure_fetch_event_loop
...
Add CPU metrics for _fetch_event_list
2018-07-10 10:00:24 +01:00
Oleg Girko
6c1ec5a1bd
Use more portable syntax using attrs package.
...
Newer syntax
attr.ib(factory=dict)
is just a syntactic sugar for
attr.ib(default=attr.Factory(dict))
It was introduced in newest version of attrs package (18.1.0)
and doesn't work with older versions.
We should either require minimum version of attrs to be 18.1.0,
or use older (slightly more verbose) syntax.
Requiring newest version is not a good solution because
Linux distributions may have older version of attrs (17.4.0 in Fedora 28),
and requiring to build (and package)
newer version just to use newer syntactic sugar in only one test
is just too much.
It's much better to fix that test to use older syntax.
Signed-off-by: Oleg Girko <ol@infoserver.lv >
2018-07-10 00:38:49 +01:00
Richard van der Hoff
f3b3b9dd8f
changelog
2018-07-09 18:16:52 +01:00
Richard van der Hoff
e31e5dee38
Add CPU metrics for _fetch_event_list
...
add a Measure block on _fetch_event_list, in the hope that we can better
measure CPU usage here.
2018-07-09 18:15:54 +01:00
Richard van der Hoff
395fa8d1fd
Merge pull request #3464 from matrix-org/hawkowl/isort-run
...
Run isort on Synapse
2018-07-09 10:24:43 +01:00
Jeroen
b5e157d895
Merge branch 'develop' into send_sni_for_federation_requests
...
# Conflicts:
# synapse/http/endpoint.py
2018-07-09 08:51:11 +02:00
Amber Brown
09477bd884
changelog
2018-07-09 16:09:37 +10:00
Amber Brown
49af402019
run isort
2018-07-09 16:09:20 +10:00
Amber Brown
2ee9f1bd1a
Add an isort configuration ( #3463 )
2018-07-09 16:05:21 +10:00
Amber Brown
1241156c82
changelog
2018-07-07 10:48:30 +10:00
Amber Brown
3060bcc8e9
version
2018-07-07 10:48:06 +10:00
Amber Brown
e845fd41c2
Correct attrs package name in requirements ( #3492 )
2018-07-07 10:46:59 +10:00
Richard van der Hoff
20ff89d6e1
Merge tag 'v0.32.1'
...
Synapse 0.32.1 (2018-07-06)
===========================
Bugfixes
--------
- Add explicit dependency on netaddr ([#3488 ](https://github.com/matrix-org/synapse/issues/3488 ))
2018-07-06 16:56:23 +01:00
Richard van der Hoff
1cfc2c4790
Prepare 0.32.1 release
2018-07-06 16:50:52 +01:00
Richard van der Hoff
2087d5d046
Merge pull request #3488 from matrix-org/rav/fix-netaddr-dep
...
Add explicit dependency on netaddr
2018-07-06 16:39:56 +01:00
Richard van der Hoff
1464a0578a
Add explicit dependency on netaddr
...
the dependencies file, causing failures on upgrade (and presumably for new
installs).
2018-07-06 16:27:17 +01:00
Neil Johnson
277c561766
0.32.0 version bump, update changelog
2018-07-06 15:07:29 +01:00
Amber Brown
89690aaaeb
changelog
2018-07-05 20:46:40 +10:00
Amber Brown
be8b32dbc2
ACL changelog
2018-07-05 20:45:12 +10:00
Amber Brown
d196fe42a9
bump version to 0.32.0rc1
2018-07-05 20:22:35 +10:00
Neil Johnson
feef8461d1
Merge remote-tracking branch 'hera/rav/server_acls' into develop
2018-07-05 11:04:01 +01:00
Erik Johnston
1a88640677
Merge pull request #3483 from matrix-org/rav/more_server_name_validation
...
More server_name validation
2018-07-05 10:04:20 +01:00
Richard van der Hoff
3cf3e08a97
Implementation of server_acls
...
... as described at
https://docs.google.com/document/d/1EttUVzjc2DWe2ciw4XPtNpUpIl9lWXGEsy2ewDS7rtw .
2018-07-04 19:06:20 +01:00
Richard van der Hoff
546bc9e28b
More server_name validation
...
We need to do a bit more validation when we get a server name, but don't want
to be re-doing it all over the shop, so factor out a separate
parse_and_validate_server_name, and do the extra validation.
Also, use it to verify the server name in the config file.
2018-07-04 18:59:51 +01:00
Richard van der Hoff
f192a93875
Merge pull request #3481 from matrix-org/rav/fix_cachedescriptor_test
...
Reinstate lost run_on_reactor in unit test
2018-07-04 18:55:33 +01:00
Erik Johnston
13f7adf84b
Merge pull request #3473 from matrix-org/erikj/thread_cache
...
Invalidate cache on correct thread
2018-07-04 10:11:38 +01:00
Erik Johnston
40252d13d1
Merge pull request #3474 from matrix-org/erikj/py3_auth
...
Fix up auth check
2018-07-04 09:41:33 +01:00
Richard van der Hoff
ea555d5633
Reinstate lost run_on_reactor in unit test
...
a61738b removed a call to run_on_reactor from a unit test, but that call was
doing something useful, in making the function in question asynchronous.
Reinstate the call and add a check that we are testing what we wanted to be
testing.
2018-07-04 09:40:01 +01:00
Richard van der Hoff
c4e7ad0e0f
Add changelog
2018-07-04 09:15:45 +01:00
Richard van der Hoff
a4ab491371
Merge branch 'develop' into rav/drop_re_signing_hacks
2018-07-04 07:13:38 +01:00
Richard van der Hoff
508196e08a
Reject invalid server names ( #3480 )
...
Make sure that server_names used in auth headers are sane, and reject them with
a sensible error code, before they disappear off into the depths of the system.
2018-07-03 14:36:14 +01:00
Richard van der Hoff
f741630847
Merge pull request #3470 from matrix-org/matthew/fix-utf8-logging
...
don't mix unicode strings with utf8-in-byte-strings
2018-07-02 15:25:36 +01:00
Matthew Hodgson
6ec3aa2f72
news snippet
2018-07-02 13:43:34 +01:00
Erik Johnston
abb183438c
Correct newsfile
2018-07-02 13:12:38 +01:00
Erik Johnston
f88dea577d
Newsfile
2018-07-02 11:46:32 +01:00
Erik Johnston
cea4662b13
Newsfile
2018-07-02 11:46:20 +01:00
Erik Johnston
2c33b55738
Avoid relying on int vs None comparison
...
Python 3 doesn't support comparing None to ints
2018-07-02 11:40:32 +01:00
Erik Johnston
cbf82dddf1
Ensure that we define sender_domain
2018-07-02 11:37:57 +01:00
Erik Johnston
3905c693c5
Invalidate cache on correct thread
2018-07-02 11:36:44 +01:00
Matthew Hodgson
fc4f8f33be
replace invalid utf8 with \ufffd
2018-07-02 11:33:02 +01:00
Matthew Hodgson
1c867f5391
a fix which doesn't NPE everywhere
2018-07-01 11:56:33 +01:00
Matthew Hodgson
f131bf8d3e
don't mix unicode strings with utf8-in-byte-strings
...
otherwise we explode with:
```
Traceback (most recent call last):
File /usr/lib/python2.7/logging/handlers.py, line 78, in emit
logging.FileHandler.emit(self, record)
File /usr/lib/python2.7/logging/__init__.py, line 950, in emit
StreamHandler.emit(self, record)
File /usr/lib/python2.7/logging/__init__.py, line 887, in emit
self.handleError(record)
File /usr/lib/python2.7/logging/__init__.py, line 810, in handleError
None, sys.stderr)
File /usr/lib/python2.7/traceback.py, line 124, in print_exception
_print(file, 'Traceback (most recent call last):')
File /usr/lib/python2.7/traceback.py, line 13, in _print
file.write(str+terminator)
File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_io.py, line 170, in write
self.log.emit(self.level, format=u{log_io}, log_io=line)
File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_logger.py, line 144, in emit
self.observer(event)
File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_observer.py, line 136, in __call__
errorLogger = self._errorLoggerForObserver(brokenObserver)
File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_observer.py, line 156, in _errorLoggerForObserver
if obs is not observer
File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_observer.py, line 81, in __init__
self.log = Logger(observer=self)
File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_logger.py, line 64, in __init__
namespace = self._namespaceFromCallingContext()
File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_logger.py, line 42, in _namespaceFromCallingContext
return currentframe(2).f_globals[__name__]
File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/python/compat.py, line 93, in currentframe
for x in range(n + 1):
RuntimeError: maximum recursion depth exceeded while calling a Python object
Logged from file site.py, line 129
File /usr/lib/python2.7/logging/__init__.py, line 859, in emit
msg = self.format(record)
File /usr/lib/python2.7/logging/__init__.py, line 732, in format
return fmt.format(record)
File /usr/lib/python2.7/logging/__init__.py, line 471, in format
record.message = record.getMessage()
File /usr/lib/python2.7/logging/__init__.py, line 335, in getMessage
msg = msg % self.args
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4: ordinal not in range(128)
Logged from file site.py, line 129
```
...where the logger apparently recurses whilst trying to log the error, hitting the
maximum recursion depth and killing everything badly.
2018-07-01 05:08:58 +01:00
Sverre Moe
ff65916108
Add instructions for install on OpenSUSE and SLES
2018-07-01 00:06:51 +02:00
Matthew Hodgson
75d4986a8c
Merge pull request #3467 from matrix-org/hawkowl/contributor-requirements
...
Clarify "real name" in contributor requirements
2018-06-30 00:21:10 +01:00
Amber Brown
7c0cdd330f
topfile
2018-06-29 14:13:15 +01:00
Erik Johnston
e3b4043800
Merge pull request #3456 from matrix-org/hawkowl/federation-prevevent-checking
...
Check the state of prev_events a bit more thoroughly when coming over federation
2018-06-29 13:55:02 +01:00
Amber Brown
ec766b2530
clarification on what "real names" are
2018-06-29 10:33:31 +01:00
Matthew Hodgson
fc0e17b3e5
Merge pull request #3465 from matrix-org/matthew/as_ip_lock
...
add ip_range_whitelist parameter to limit where ASes can connect from
2018-06-28 21:15:06 +01:00
Matthew Hodgson
f82cf3c7df
add test
2018-06-28 21:14:16 +01:00
Matthew Hodgson
0d7eabeada
add towncrier snippet
2018-06-28 20:59:01 +01:00
Matthew Hodgson
e72234f6bd
fix tests
2018-06-28 20:56:07 +01:00
Matthew Hodgson
f4f1cda928
add ip_range_whitelist parameter to limit where ASes can connect from
2018-06-28 20:32:00 +01:00
Amber Brown
6350bf925e
Attempt to be more performant on PyPy ( #3462 )
2018-06-28 14:49:57 +01:00
Amber Brown
cfda61e9cd
topfile update
2018-06-28 11:13:08 +01:00
Amber Brown
72d2143ea8
Revert "Revert "Try to not use as much CPU in the StreamChangeCache"" ( #3454 )
2018-06-28 11:04:18 +01:00
Amber Brown
caf07f770a
topfile
2018-06-27 15:07:16 +01:00
Amber Brown
99800de63d
try and clean up
2018-06-27 11:40:27 +01:00
Amber Brown
f03a5d1a17
pep8
2018-06-27 11:38:14 +01:00
Amber Brown
94f09618e5
cleanups
2018-06-27 11:38:03 +01:00
Amber Brown
a7ecf34b70
cleanups
2018-06-27 11:36:03 +01:00
Amber Brown
35cc3e8b14
stylistic cleanup
2018-06-27 11:32:09 +01:00
Amber Brown
8d62baa48c
cleanups
2018-06-27 11:31:48 +01:00
Amber Brown
77078d6c8e
handle federation not telling us about prev_events
2018-06-27 11:27:32 +01:00
Amber Brown
cd6bcdaf87
Better testing framework for homeserver-using things ( #3446 )
2018-06-27 10:37:24 +01:00
Jeroen
95341a8f6f
take idna implementation from twisted
2018-06-26 21:15:14 +02:00
Jeroen
26651b0d6a
towncrier changelog
2018-06-26 21:10:45 +02:00
Jeroen
b7f34ee348
allow self-signed certificates
2018-06-26 20:41:05 +02:00
Matthew Hodgson
71ad43a8b5
Merge pull request #3452 from matrix-org/revert-3451-hawkowl/sorteddict-api
...
Revert "Try to not use as much CPU in the StreamChangeCache"
2018-06-26 18:09:28 +01:00
Matthew Hodgson
8057489b26
Revert "Try to not use as much CPU in the StreamChangeCache"
2018-06-26 18:09:01 +01:00
Matthew Hodgson
d91efb06cf
Merge pull request #3451 from matrix-org/hawkowl/sorteddict-api
...
Try to not use as much CPU in the cache
2018-06-26 17:49:55 +01:00
Amber Brown
1202508067
fixes
2018-06-26 17:29:01 +01:00
Amber Brown
bd3d329c88
fixes
2018-06-26 17:28:12 +01:00
Amber Brown
abfe4b2957
try and make loading items from the cache faster
2018-06-26 17:25:34 +01:00
Matthew Hodgson
c695a8d003
Merge pull request #3449 from matrix-org/dbkr/fix_deactivate_account_multiple_pending
...
Fix error on deleting users pending deactivation
2018-06-26 10:59:19 +01:00
David Baker
028490afd4
Fix error on deleting users pending deactivation
...
Use simple_delete instead of simple_delete_one as commented
2018-06-26 10:52:52 +01:00
Matthew Hodgson
c7f6b420ae
Merge pull request #3448 from matrix-org/matthew/gdpr-deactivate-admin-api
...
add GDPR erase param to deactivate API
2018-06-26 10:43:14 +01:00
Matthew Hodgson
9570aa82eb
update doc for deactivate API
2018-06-26 10:42:50 +01:00
Matthew Hodgson
1e788db430
add GDPR erase param to deactivate API
2018-06-26 10:26:54 +01:00
Amber Brown
1d62c4a127
Merge pull request #3438 from turt2live/travis/dont-print-access-tokens-in-logs
...
Stop including access tokens in warnings in the log
2018-06-26 09:55:55 +01:00
Erik Johnston
d72fb9a448
Merge pull request #3442 from matrix-org/matthew/allow-unconsented-parts
...
allow non-consented users to still part rooms (to let us autopart them)
2018-06-25 20:14:18 +01:00
Erik Johnston
1b947d6dde
Merge pull request #3443 from matrix-org/erikj/fast_filter_servers
...
Add fast path to _filter_events_for_server
2018-06-25 20:11:00 +01:00
Erik Johnston
df48f7ef37
Actually fix it
2018-06-25 20:03:41 +01:00
Erik Johnston
a0e8a53c6d
Comment
2018-06-25 19:57:38 +01:00
Erik Johnston
7bdc5c8fa3
Fix bug with assuming wrong type
2018-06-25 19:56:02 +01:00
Erik Johnston
ea7a9c0483
Add fast path to _filter_events_for_server
...
Most rooms have a trivial history visibility like "shared" or
"world_readable", especially large rooms, so lets not bother getting the
full membership of those rooms in that case.
2018-06-25 19:49:13 +01:00
Matthew Hodgson
0269367f18
allow non-consented users to still part rooms (to let us autopart them)
2018-06-25 17:56:10 +01:00
Matthew Hodgson
784189b1f4
typos
2018-06-25 17:37:16 +01:00
Matthew Hodgson
6eb861b67f
typo
2018-06-25 17:37:16 +01:00
Erik Johnston
947fea67cb
Need to pass reactor to endpoint fac
2018-06-25 15:22:57 +01:00
Amber Brown
36cb570641
Use towncrier to build the changelog ( #3425 )
2018-06-25 14:42:27 +01:00
Erik Johnston
33fdcfa957
Merge pull request #3441 from matrix-org/erikj/redo_erasure
...
Fix user erasure and re-enable
2018-06-25 14:37:01 +01:00
Erik Johnston
eb50c44eaf
Add UserErasureWorkerStore to workers
2018-06-25 14:22:24 +01:00
Amber Brown
07cad26d65
Remove all global reactor imports & pass it around explicitly ( #3424 )
2018-06-25 14:08:28 +01:00
Erik Johnston
244484bf3c
Revert "Revert "Merge pull request #3431 from matrix-org/rav/erasure_visibility""
...
This reverts commit 1d009013b3 .
2018-06-25 13:42:55 +01:00
Jeroen
07b4f88de9
formatting changes for pep8
2018-06-25 12:31:16 +02:00
Jeroen
3d605853c8
send SNI for federation requests
2018-06-24 22:38:43 +02:00
Travis Ralston
ec1e799e17
Don't print invalid access tokens in the logs
...
Tokens shouldn't be appearing the logs, valid or invalid.
Signed-off-by: Travis Ralston <travpc@gmail.com >
2018-06-24 12:17:01 -06:00
Richard van der Hoff
1d009013b3
Revert "Merge pull request #3431 from matrix-org/rav/erasure_visibility"
...
This reverts commit ce0d911156 , reversing
changes made to b4a5d767a9 .
2018-06-22 16:35:10 +01:00
Richard van der Hoff
516f884176
Merge pull request #3435 from matrix-org/rav/fix_event_push_actions_tablescan
...
Fix event_push_actions tablescan when reinserting events
2018-06-22 15:57:22 +01:00
Mark Haines
9850f66abe
Deleting from event_push_actions needs to use an index
2018-06-22 15:54:48 +01:00
Richard van der Hoff
fe8d2968e3
Merge pull request #3434 from matrix-org/rav/search_logging
...
Add some logging to /search and /context queries
2018-06-22 15:51:11 +01:00
Erik Johnston
28ddc6cfbe
Also log number of events for serach context
2018-06-22 15:42:11 +01:00
Erik Johnston
4b4cec3989
Add some logging to search queries
2018-06-22 15:42:11 +01:00
Richard van der Hoff
200e11c5bf
Merge pull request #3432 from matrix-org/rav/joined_hosts_cache_non_iterable
...
Make _get_joined_hosts_cache cache non-iterable
2018-06-22 15:18:51 +01:00
Erik Johnston
f8272813a9
Make _get_joined_hosts_cache cache non-iterable
2018-06-22 15:12:26 +01:00
Richard van der Hoff
1d7ad11747
Merge pull request #3430 from matrix-org/rav/configurable_push_action_rotation
...
Make push actions rotation configurable
2018-06-22 15:07:31 +01:00
Erik Johnston
ce0d911156
Merge pull request #3431 from matrix-org/rav/erasure_visibility
...
Support hiding events from deleted users
2018-06-22 15:06:44 +01:00
Erik Johnston
b4a5d767a9
Merge pull request #3428 from matrix-org/erikj/persisted_pdu
...
Simplify get_persisted_pdu
2018-06-22 14:47:43 +01:00
Erik Johnston
f79abda87f
Merge pull request #3427 from matrix-org/erikj/remove_filters
...
remove dead filter_events_for_clients
2018-06-22 14:45:42 +01:00
Erik Johnston
75dc3ddeab
Make push actions rotation configurable
2018-06-22 14:44:37 +01:00
Richard van der Hoff
bb018d0b5b
Merge pull request #3383 from matrix-org/rav/hacky_speedup_state_group_cache
...
Improve StateGroupCache efficiency for wildcard lookups
2018-06-22 14:01:55 +01:00
Richard van der Hoff
43e02c409d
Disable partial state group caching for wildcard lookups
...
When _get_state_for_groups is given a wildcard filter, just do a complete
lookup. Hopefully this will give us the best of both worlds by not filling up
the ram if we only need one or two keys, but also making the cache still work
for the federation reader usecase.
2018-06-22 11:52:07 +01:00
Richard van der Hoff
240f192523
Merge pull request #3382 from matrix-org/rav/optimise_state_groups
...
Optimise state_group_cache update
2018-06-22 11:20:20 +01:00
Richard van der Hoff
70e6501913
Merge pull request #3419 from matrix-org/rav/events_per_request
...
Log number of events fetched from DB
2018-06-22 11:17:56 +01:00
Richard van der Hoff
0495fe0035
Indirect evt_count updates via method call
...
so that we can stub it for the sentinel and not have a billion failing UTs
2018-06-22 10:42:28 +01:00
Amber Brown
9a685d60ae
Merge pull request #3418 from matrix-org/rav/fix_metric_desc
...
Fix description of "python_gc_time" metric
2018-06-22 09:43:26 +01:00
Amber Brown
77ac14b960
Pass around the reactor explicitly ( #3385 )
2018-06-22 09:37:10 +01:00
Richard van der Hoff
cbbfaa4be8
Fix description of "python_gc_time" metric
2018-06-21 10:02:42 +01:00
Amber Brown
c2eff937ac
Populate synapse_federation_client_sent_pdu_destinations:count again ( #3386 )
2018-06-21 09:39:58 +01:00
Amber Brown
99b77aa829
Fix tcp protocol metrics naming ( #3410 )
2018-06-21 09:39:27 +01:00
Richard van der Hoff
b088aafcae
Log number of events fetched from DB
...
When we finish processing a request, log the number of events we fetched from
the database to handle it.
[I'm trying to figure out which requests are responsible for large amounts of
event cache churn. It may turn out to be more helpful to add counts to the
prometheus per-request/block metrics, but that is an extension to this code
anyway.]
2018-06-21 06:15:03 +01:00
Richard van der Hoff
aff3d76920
Merge pull request #3416 from matrix-org/rav/restart_indicator
...
Write a clear restart indicator in logs
2018-06-20 18:14:08 +01:00
Richard van der Hoff
02bfc581f8
Merge pull request #3399 from costacruise/master
...
Add error code to room creation error
2018-06-20 17:26:25 +01:00
Richard van der Hoff
245d53d32a
Write a clear restart indicator in logs
...
I'm fed up with never being able to find the point a server restarted in the
logs.
2018-06-20 15:33:14 +01:00
Amber Brown
f6c4d74f96
Fix inflight requests metric (incorrect name & traceback) ( #3413 )
2018-06-20 11:18:57 +01:00
Matthew Hodgson
ccfdaf68be
spell gauge correctly
2018-06-16 07:10:34 +01:00
Richard van der Hoff
9a793f861c
Merge branch 'master' into develop
2018-06-14 16:36:01 +01:00
Richard van der Hoff
53969e1960
Merge tag 'v0.31.2'
...
SECURITY UPDATE: Prevent unauthorised users from setting state events in a room
when there is no `m.room.power_levels` event in force in the room. (PR #3397 )
Discussion around the Matrix Spec change proposal for this change can be
followed at https://github.com/matrix-org/matrix-doc/issues/1304 .
2018-06-14 16:35:33 +01:00
Richard van der Hoff
667c6546bd
link to spec proposal from changelog
2018-06-14 16:27:41 +01:00
Richard van der Hoff
7e1c616452
v0.31.2
2018-06-14 16:24:32 +01:00
Richard van der Hoff
ba438a3ac1
changelog for 0.31.2
2018-06-14 16:22:46 +01:00
Richard van der Hoff
61ab08a197
Merge pull request #3397 from matrix-org/rav/adjust_auth_rules
...
Adjust event auth rules when there is no PL event
2018-06-14 16:09:13 +01:00
Richard van der Hoff
1e77ac66e3
Fix broken unit test
...
We need power levels for this test to do what it is supposed to do.
2018-06-14 14:21:29 +01:00
Richard van der Hoff
a502cfec00
remove spurious debug
2018-06-14 14:20:53 +01:00
Michael Wagner
19cd3120ec
Add error code to room creation error
...
This error code is mentioned in the documentation at https://matrix.org/docs/api/client-server/#!/Room32creation/createRoom
2018-06-14 14:08:40 +02:00
Richard van der Hoff
5c9afd6f80
Make default state_default 50
...
Make it so that, before there is a power-levels event in the room, you need a
power level of at least 50 to send state.
Partially addresses https://github.com/matrix-org/matrix-doc/issues/1192
2018-06-14 12:38:09 +01:00
Richard van der Hoff
52423607bd
Clarify interface for event_auth
...
stop pretending that it returns a boolean, which just almost gave me a heart
attack.
2018-06-14 12:26:17 +01:00
Amber Brown
f116f32ace
add a last seen metric ( #3396 )
2018-06-14 20:26:59 +10:00
Richard van der Hoff
557b686eac
Refactor get_send_level to take a power_levels event
...
it makes it easier for me to reason about
2018-06-14 11:26:27 +01:00
Amber Brown
a61738b316
Remove run_on_reactor ( #3395 )
2018-06-14 18:27:37 +10:00
Richard van der Hoff
3681437c35
Merge pull request #3368 from matrix-org/rav/fix_federation_client_host
...
Fix commandline federation_client to send the right Host header
2018-06-13 15:41:51 +01:00
Amber Brown
0fde1896cd
Merge pull request #3389 from turt2live/travis/name_metrics
...
Use the correct flag (enable_metrics) when warning about an incorrect metrics setup
2018-06-13 23:50:10 +10:00
Amber Brown
2a4fde0a6f
Merge pull request #3390 from turt2live/travis/appsvc-metrics
...
Use the RegistryProxy for appservices too
2018-06-13 22:05:15 +10:00
Michael Telatynski
94700e55fa
if inviter_display_name == ""||None then default to inviter MXID
...
to prevent email invite from "None"
2018-06-13 10:31:01 +01:00
Travis Ralston
45768d1640
Use the RegistryProxy for appservices too
...
Signed-off-by: Travis Ralston <travpc@gmail.com >
2018-06-12 12:55:48 -06:00
Travis Ralston
12285a1a76
The flag is named enable_metrics, not collect_metrics
...
Signed-off-by: Travis Ralston <travpc@gmail.com >
2018-06-12 12:51:31 -06:00
Richard van der Hoff
96bad44f87
Fix federation_client to send the right Host
...
This appears to have stopped working since matrix.org moved to cloudflare. The
Host header should match the name of the server, not whatever is in the SRV
record.
2018-06-12 14:14:36 +01:00
Richard van der Hoff
b6faef2ad7
Filter out erased messages
...
Redact any messges sent by erased users.
2018-06-12 09:53:18 +01:00
Richard van der Hoff
f1023ebf4b
mark accounts as erased when requested
2018-06-12 09:53:18 +01:00
Richard van der Hoff
3ff8a619f5
UserErasureStore
...
to store which users have been erased
2018-06-12 09:52:22 +01:00
Richard van der Hoff
9fc5b74b24
simplify get_persisted_pdu
...
it doesn't make much sense to use get_persisted_pdu on the receive path: just
get the event straight from the store.
2018-06-12 09:51:31 +01:00
Richard van der Hoff
bd348f0af6
remove dead filter_events_for_clients
...
This is only used by filter_events_for_client, so we can simplify the whole
thing by just doing one user at a time, and removing a dead storage function to
boot.
2018-06-12 09:51:31 +01:00
Richard van der Hoff
eb32b2ca20
Optimise state_group_cache update
...
(1) matrix-org-hotfixes has removed the intern calls; let's do the same here.
(2) remove redundant iteritems() so we can used an optimised db update.
2018-06-11 22:56:11 +01:00
David Baker
187a546bff
Merge pull request #3276 from matrix-org/dbkr/unbind
...
Remove email addresses / phone numbers from ID servers when they're removed from synapse
2018-06-11 16:02:00 +01:00
Matthew Hodgson
d6cc369205
fix idiotic typo in state res
2018-06-11 14:43:55 +01:00
Nicholas Eckardt
76c80e3fdf
The project matrix-synapse-auto-deploy does not seem to be maintained anymore.
...
It has been over a year since any code has been commited. Some of the relevant links in
the documentation are broken, but since no pull requests are being accepted, they
won't get fixed. We should probably remove this from the README.
2018-06-10 18:24:12 -07:00
Matthew Hodgson
c96d882a02
Merge branch 'develop' into matthew/filter_members
2018-06-10 12:26:14 +03:00
Vincent Breitmoser
b800834351
add note that the affinity package is required for the cpu_affinity setting
2018-06-09 22:50:29 +02:00
Neil Johnson
ed5a0780a4
Merge branch 'master' into develop
2018-06-08 15:47:11 +01:00
Neil Johnson
1032393dfb
Merge tag 'v0.31.1'
...
Changes in synapse v0.31.1 (2018-06-08)
=======================================
v0.31.1 fixes a security bug in the ``get_missing_events`` federation API
where event visibility rules were not applied correctly.
We are not aware of it being actively exploited but please upgrade asap.
Bug Fixes:
* Fix event filtering in get_missing_events handler (PR #3371 )
2018-06-08 15:46:18 +01:00
Neil Johnson
aefcc0f5e5
tweak changelog
2018-06-08 15:32:54 +01:00
Neil Johnson
82e751c43f
Update CHANGES.rst
2018-06-08 15:22:34 +01:00
Neil Johnson
0eb4722932
changelog a bump version
2018-06-08 15:21:46 +01:00
Richard van der Hoff
c6b1441c52
Fix event filtering in get_missing_events handler
2018-06-08 14:15:31 +01:00
Matthew Hodgson
8b98acca05
fix various changelog bugs and typos
2018-06-08 14:15:16 +01:00
David Baker
0e505b1913
Merge pull request #3372 from matrix-org/rav/better_verification_logging
...
Try to log more helpful info when a sig verification fails
2018-06-08 13:32:02 +01:00
David Baker
ad9edd1d96
Merge pull request #3371 from matrix-org/rav/fix_get_missing_events
...
Fix event filtering in get_missing_events handler
2018-06-08 13:19:15 +01:00
Richard van der Hoff
e82db24a0e
Try to log more helpful info when a sig verification fails
...
Firstly, don't swallow the reason for the failure
Secondly, don't assume all exceptions are verification failures
Thirdly, log a bit of info about the key being used if debug is enabled
2018-06-08 12:13:08 +01:00
Richard van der Hoff
0834b49c6a
Fix event filtering in get_missing_events handler
2018-06-08 11:34:46 +01:00
Matthew Hodgson
36446ffedb
fix various changelog bugs and typos
2018-06-07 23:54:16 +03:00
Richard van der Hoff
8503dd0047
Remove event re-signing hacks
...
These "temporary fixes" have been here three and a half years, and I can't find
any events in the matrix.org database where the calculated signature differs
from what's in the db. It's time for them to go away.
2018-06-07 16:08:29 +01:00
Will Hunt
13d211edc1
Merge pull request #3344 from Half-Shot/hs/as-metrics
...
Add metrics to track appservice transactions
2018-06-07 11:37:12 +01:00
Richard van der Hoff
1152f495a0
Merge pull request #3363 from matrix-org/rav/fix_purge
...
Fix event-purge-by-ts admin API
2018-06-07 11:34:46 +01:00
Richard van der Hoff
e2acf536d4
Merge pull request #3355 from matrix-org/rav/fix_federation_backfill
...
Fix federation backfill from sqlite servers
2018-06-07 10:18:01 +01:00
Amber Brown
0160f6601f
Merge pull request #3356 from matrix-org/rav/add_missing_attr_dep
...
Make sure that attr is installed
2018-06-07 16:33:30 +10:00
Richard van der Hoff
f4caf3f83d
fix log
2018-06-07 00:26:38 +01:00
Richard van der Hoff
0546715c18
Fix event-purge-by-ts admin API
...
This got completely broken in 0.30.
Fixes #3300 .
2018-06-07 00:15:49 +01:00
Richard van der Hoff
57e3f923d2
Add missing dependency on attr
...
We've rcently added a dep on `attr`. I don't know why the CI didn't pick this
up, but we should make it explicit anyway.
2018-06-06 17:12:41 +01:00
Richard van der Hoff
d3a8c9c55e
Fix sql error in _get_state_groups_from_groups
...
If this was called with a `(type, None)` entry in types (which is supposed to
return all state of type `type`), it would explode with a sql error.
2018-06-06 14:19:01 +01:00
Neil Johnson
fef6c2cdcc
Merge branch 'master' into develop
2018-06-06 12:28:15 +01:00
Neil Johnson
752b7b32ed
Merge tag 'v0.31.0'
...
Changes in synapse v0.31.0 (2018-06-06)
======================================
Most notable change from v0.30.0 is to switch to python prometheus library to improve system
stats reporting. WARNING this changes a number of prometheus metrics in a
backwards-incompatible manner. For more details, see
`docs/metrics-howto.rst <docs/metrics-howto.rst#removal-of-deprecated-metrics--time-based-counters-becoming-histograms-in-0310>`_.
Bug Fixes:
* Fix metric documentation tables (PR #3341 )
* Fix LaterGuage error handling (694968f )
* Fix replication metrics (b7e7fd2 )
Changes in synapse v0.31.0-rc1 (2018-06-04)
==========================================
Features:
* Switch to the Python Prometheus library (PR #3256 , #3274 )
* Let users leave the server notice room after joining (PR #3287 )
Changes:
* daily user type phone home stats (PR #3264 )
* Use iter* methods for _filter_events_for_server (PR #3267 )
* Docs on consent bits (PR #3268 )
* Remove users from user directory on deactivate (PR #3277 )
* Avoid sending consent notice to guest users (PR #3288 )
* disable CPUMetrics if no /proc/self/stat (PR #3299 )
* Add local and loopback IPv6 addresses to url_preview_ip_range_blacklist (PR #3312 ) Thanks to @thegcat!
* Consistently use six's iteritems and wrap lazy keys/values in list() if they're not meant to be lazy (PR #3307 )
* Add private IPv6 addresses to example config for url preview blacklist (PR #3317 ) Thanks to @thegcat!
* Reduce stuck read-receipts: ignore depth when updating (PR #3318 )
* Put python's logs into Trial when running unit tests (PR #3319 )
Changes, python 3 migration:
* Replace some more comparisons with six (PR #3243 ) Thanks to @NotAFile!
* replace some iteritems with six (PR #3244 ) Thanks to @NotAFile!
* Add batch_iter to utils (PR #3245 ) Thanks to @NotAFile!
* use repr, not str (PR #3246 ) Thanks to @NotAFile!
* Misc Python3 fixes (PR #3247 ) Thanks to @NotAFile!
* Py3 storage/_base.py (PR #3278 ) Thanks to @NotAFile!
* more six iteritems (PR #3279 ) Thanks to @NotAFile!
* More Misc. py3 fixes (PR #3280 ) Thanks to @NotAFile!
* remaining isintance fixes (PR #3281 ) Thanks to @NotAFile!
* py3-ize state.py (PR #3283 ) Thanks to @NotAFile!
* extend tox testing for py3 to avoid regressions (PR #3302 ) Thanks to @krombel!
* use memoryview in py3 (PR #3303 ) Thanks to @NotAFile!
Bugs:
* Fix federation backfill bugs (PR #3261 )
* federation: fix LaterGauge usage (PR #3328 ) Thanks to @intelfx!
2018-06-06 12:27:33 +01:00
Neil Johnson
3f589f9097
7 char sha in changelog
2018-06-06 11:39:42 +01:00
Neil Johnson
176f1206d1
Update CHANGES.rst
2018-06-06 11:28:30 +01:00
Neil Johnson
61134debdc
bump version and changelog
2018-06-06 11:26:21 +01:00
Richard van der Hoff
ad459a106c
Merge pull request #3349 from t3chguy/redact_as_request_token
...
Redact AS tokens in log (fixes to #3327 )
2018-06-06 10:58:07 +01:00
Michael Telatynski
592c162516
also redact __str__ of ApplicationService used for logging
2018-06-06 10:35:29 +01:00
Michael Telatynski
330432031b
redact_uri in two missed log paths
2018-06-06 10:25:48 +01:00
David Baker
bf54c1cf6c
pep8
2018-06-06 10:15:33 +01:00
David Baker
3e4bc4488c
More doc fixes
2018-06-06 09:44:10 +01:00
Amber Brown
48e2b48888
Merge pull request #3347 from krombel/py3_extend_tox_2
...
update tox.ini to cover 292 succeeding tests
2018-06-06 16:37:19 +10:00
Amber Brown
d8db6d9267
Merge pull request #3348 from intelfx/fix-sortedcontainers
...
federation/send_queue.py: fix usage of sortedcontainers.SortedDict
2018-06-06 16:36:53 +10:00
Amber Brown
23c785992f
Fix metric documentation tables ( #3341 )
2018-06-06 07:12:16 +01:00
Richard van der Hoff
b3b16490f7
Add note to changelog on prometheus metrics
2018-06-06 07:08:36 +01:00
Richard van der Hoff
592ee217a3
Merge commit 'b7e7fd2' into release-v0.31.0
2018-06-06 07:02:02 +01:00
Amber Brown
304bb22c1d
Fix metric documentation tables ( #3341 )
2018-06-06 15:52:37 +10:00
Ivan Shapovalov
c88d50aa8f
federation/send_queue.py: fix usage of sortedcontainers.SortedDict
2018-06-06 02:45:18 +03:00
Krombel
0c87eed294
update tox.ini to cover 292 succeeding tests
...
Signed-Off-By: Matthias Kesler <krombel@krombel.de >
2018-06-05 23:10:15 +02:00
Richard van der Hoff
e316407b5d
Merge pull request #3327 from t3chguy/redact_as_request_token
...
Strip `access_token` from outgoing requests
2018-06-05 19:08:46 +01:00
Michael Telatynski
e6cbf47773
factor out uri redaction into a method on http
2018-06-05 18:31:40 +01:00
David Baker
607bd27c83
fix pep8
2018-06-05 18:10:35 +01:00
David Baker
d62162bbec
doc fixes
2018-06-05 18:09:13 +01:00
Richard van der Hoff
617afee069
Merge pull request #3340 from ArchangeGabriel/patch-1
...
doc/postgres.rst: fix display of the last command block
2018-06-05 17:45:17 +01:00
Richard van der Hoff
522bd3c8a3
Merge remote-tracking branch 'origin/master' into develop
2018-06-05 17:42:49 +01:00
Will Hunt
d6e3c2c79b
Let's try labels instead of label, that might work
2018-06-05 17:30:45 +01:00
Amber Brown
f7869f8f8b
Port to sortedcontainers (with tests!) ( #3332 )
2018-06-06 00:13:57 +10:00
Will Hunt
604cff1a06
Add metrics to track appservice transactions
2018-06-05 13:21:30 +01:00
Bruno Pagani
b50f18171d
doc/postgres.rest: fix displaying of the last command block
...
Also indent all of them with 4 spaces.
2018-06-04 22:41:52 +00:00
Richard van der Hoff
f29b41fde9
Merge pull request #3324 from matrix-org/rav/remove_dead_method
...
Remove was_forgotten_at
2018-06-04 18:18:08 +01:00
Richard van der Hoff
28b0490dfd
Merge pull request #3334 from matrix-org/rav/cache_factor_override
...
Cache factor override system for specific caches
2018-06-04 17:19:33 +01:00
Richard van der Hoff
b7e7fd2d0e
Fix replication metrics
...
fix bug introduced in #3256
2018-06-04 16:23:05 +01:00
Neil Johnson
244ab974e7
bump version and changelog
2018-06-04 16:09:58 +01:00
Richard van der Hoff
694968fa81
Hopefully, fix LaterGuage error handling
2018-06-04 15:59:14 +01:00
Erik Johnston
042eedfa2b
Add hacky cache factor override system
2018-06-04 15:39:28 +01:00
David Baker
c5930d513a
Docstring
2018-06-04 12:05:58 +01:00
David Baker
6a29e815fc
Fix comment
2018-06-04 12:01:23 +01:00
David Baker
e44150a6de
Missing yield
2018-06-04 12:01:13 +01:00
David Baker
f731e42baf
docstring
2018-06-04 12:00:51 +01:00
Amber Brown
5dbf305444
Put python's logs into Trial when running unit tests ( #3319 )
2018-06-04 16:06:06 +10:00
Amber Brown
86accac5d5
Merge pull request #3328 from intelfx/fix-metrics-LaterGauge-usage
...
federation: fix LaterGauge usage
2018-06-04 15:35:32 +10:00
Matthew Hodgson
28f09fcdd5
Merge branch 'develop' into matthew/filter_members
2018-06-04 00:09:17 +03:00
Matthew Hodgson
5f6122fe10
more comments
2018-06-04 00:08:52 +03:00
Ivan Shapovalov
7d9d75e4e8
federation/send_queue.py: fix usage of LaterGauge
...
Fixes a startup crash due to commit df9f72d9e5
"replacing portions".
2018-06-03 14:16:17 +03:00
Michael Telatynski
09503126df
Strip access_token from outgoing requests using existing regex
2018-06-02 23:25:13 +01:00
Richard van der Hoff
c1f4118bb6
Remove was_forgotten_at
...
This is unused. IT MUST DIE!!!1
̧̪͈̱̹̳͖͙H̵̰̤̰͕̖e̛ ͚͉̗̼̞w̶̩̥͉̮h̩̺̪̩͘ͅọ͎͉̟ ̜̩͔̦̘ͅW̪̫̩̣̲͔̳a͏͔̳͖i͖͜t͓̤̠͓͙s̘̰̩̥̙̝ͅ ̲̠̬̥Be̡̙̫̦h̰̩i̛̫͙͔̭̤̗̲n̳͞d̸ ͎̻͘T̛͇̝̲̹̠̗ͅh̫̦̝ͅe̩̫͟ ͓͖̼W͕̳͎͚̙̥ą̙l̘͚̺͔͞ͅl̳͍̙̤̤̮̳.̢
̟̺̜̙͉Z̤̲̙̙͎̥̝A͎̣͔̙͘L̥̻̗̳̻̳̳͢G͉̖̯͓̞̩̦O̹̹̺!̙͈͎̞̬ *
2018-06-01 18:21:49 +01:00
Richard van der Hoff
a9e97dcd65
Merge pull request #3317 from thegcat/feature/3312-add_ipv6_to_blacklist_example_config
...
Add private IPv6 addresses to example config for url preview blacklist
2018-06-01 14:45:14 +01:00
Neil Johnson
71477f3317
Merge pull request #3264 from matrix-org/neil/sign-up-stats
...
daily user type phone home stats
2018-06-01 13:42:01 +00:00
Richard van der Hoff
41006d9c28
Merge pull request #3318 from matrix-org/rav/ignore_depth_on_rrs
...
Ignore depth when updating read-receipts
2018-06-01 14:14:45 +01:00
Richard van der Hoff
9f797a24a4
Handle RRs which arrive before their events
2018-06-01 14:01:43 +01:00
Richard van der Hoff
857e6fd8b6
Ignore depth when updating read-receipts
...
Order read receipts by stream ordering instead of depth
2018-06-01 12:18:11 +01:00
Felix Schäfer
4ef76f3ac4
Add private IPv6 addresses to preview blacklist #3312
...
The added addresses are expected to be local or loopback addresses and
shouldn't be spidered for previews.
Signed-off-by: Felix Schäfer <felix@thegcat.net >
2018-06-01 12:18:35 +02:00
Neil Johnson
4986b084f8
remove unnecessary INSERT
2018-06-01 10:50:40 +01:00
Richard van der Hoff
7e15410f02
Enforce the specified API for report_event
...
as per
https://matrix.org/docs/spec/client_server/unstable.html#post-matrix-client-r0-rooms-roomid-report-eventid
2018-05-31 18:17:11 +01:00
Richard van der Hoff
c2c3092cce
code_style.rst: formatting
2018-05-31 16:11:34 +01:00
Amber Brown
febe0ec8fd
Run Prometheus on a different port, optionally. ( #3274 )
2018-05-31 19:04:50 +10:00
Amber Brown
c936a52a9e
Consistently use six's iteritems and wrap lazy keys/values in list() if they're not meant to be lazy ( #3307 )
2018-05-31 19:03:47 +10:00
Richard van der Hoff
e73635191f
Merge pull request #3290 from rubo77/patch-7
...
Add link to thorough instruction how to configure consent
2018-05-30 19:52:01 +01:00
Richard van der Hoff
219c2a322b
remove trailing whitespace
2018-05-30 19:42:19 +01:00
Richard van der Hoff
2e4be8bfd9
fix english and wrap comment
2018-05-30 19:24:12 +01:00
Amber Brown
872cf43516
Merge pull request #3303 from NotAFile/py3-memoryview
...
use memoryview in py3
2018-05-30 12:51:42 +10:00
Amber Brown
debff7ae09
Merge pull request #3281 from NotAFile/py3-six-isinstance
...
remaining isintance fixes
2018-05-30 12:44:46 +10:00
Richard van der Hoff
34b85df7f5
Update some comments and docstrings in SyncHandler
2018-05-29 22:31:18 +01:00
Richard van der Hoff
711f61a31d
Merge pull request #3304 from matrix-org/rav/exempt_as_users_from_gdpr
...
Exempt AS-registered users from doing gdpr
2018-05-29 20:25:12 +01:00
Richard van der Hoff
a995fdae39
fix tests
2018-05-29 20:19:29 +01:00
Richard van der Hoff
4a9cbdbc15
Exempt AS-registered users from doing gdpr
2018-05-29 19:54:32 +01:00
Neil Johnson
ab0ef31dc7
create users index on creation_ts
2018-05-29 17:51:08 +01:00
Neil Johnson
558f3d376a
create index in background
2018-05-29 17:47:55 +01:00
Neil Johnson
c379acd4fd
bump version
2018-05-29 17:47:28 +01:00
Richard van der Hoff
db2e4608ab
Merge pull request #3302 from krombel/py3_extend_tox_testing
...
extend tox testing for py3 to avoid regressions
2018-05-29 17:37:52 +01:00
Adrian Tschira
4b9d0cde97
add remaining memoryview changes
2018-05-29 17:42:43 +02:00
Adrian Tschira
7873cde526
pep8
2018-05-29 17:35:55 +02:00
Adrian Tschira
1afafb3497
use memoryview in py3
...
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-05-29 17:14:34 +02:00
Krombel
d6cd55532b
extend tox testing for py3 to avoid regressions
2018-05-29 16:02:41 +02:00
Matthew Hodgson
9bbb9f5556
add lazy_load_members to the filter json schema
2018-05-29 04:26:10 +01:00
Matthew Hodgson
8df7bad839
pep8
2018-05-29 02:49:36 +01:00
Amber Brown
235b53263a
Merge pull request #3299 from matrix-org/matthew/macos-fixes
...
disable CPUMetrics if no /proc/self/stat
2018-05-29 11:45:45 +10:00
Matthew Hodgson
ff1bc0a279
pep8
2018-05-29 02:32:15 +01:00
Matthew Hodgson
adb6bac4d5
fix another dumb typo
2018-05-29 02:29:22 +01:00
Matthew Hodgson
0a240ad36e
disable CPUMetrics if no /proc/self/stat
...
fixes build on macOS again
2018-05-29 02:23:30 +01:00
Matthew Hodgson
284e36ad04
fix dumb typo
2018-05-29 02:23:11 +01:00
Matthew Hodgson
b69ff33d9e
disable CPUMetrics if no /proc/self/stat
...
fixes build on macOS again
2018-05-29 02:22:27 +01:00
Matthew Hodgson
5e6b31f0da
fix dumb typo
2018-05-29 02:22:09 +01:00
Matthew Hodgson
a6c8f7c875
add pydoc
2018-05-29 01:09:55 +01:00
Matthew Hodgson
7a6df013cc
merge develop
2018-05-29 00:25:22 +01:00
Amber Brown
81717e8515
Merge pull request #3256 from matrix-org/3218-official-prom
...
Switch to the Python Prometheus library
2018-05-28 23:30:09 +10:00
Amber Brown
57ad76fa4a
fix up tests
2018-05-28 19:51:53 +10:00
Amber Brown
3ef5cd74a6
update to more consistently use seconds in any metrics or logging
2018-05-28 19:39:27 +10:00
Amber Brown
5c40ce3777
invalid syntax :(
2018-05-28 19:16:09 +10:00
Amber Brown
357c74a50f
add comment about why unreg
2018-05-28 19:14:41 +10:00
Amber Brown
a2eb5db4a0
update metrics to be in seconds
2018-05-28 19:10:27 +10:00
Amber Brown
754826a830
Merge remote-tracking branch 'origin/develop' into 3218-official-prom
2018-05-28 18:57:23 +10:00
Ruben Barkow
08ea5fe635
add link to thorough instruction how to configure consent
2018-05-25 23:19:55 +02:00
Richard van der Hoff
60f09b1e11
Merge pull request #3288 from matrix-org/rav/no_spam_guests
...
Avoid sending consent notice to guest users
2018-05-25 11:44:45 +01:00
Richard van der Hoff
66bdae986f
Fix default for send_server_notice_to_guests
...
bool("False") == True...
2018-05-25 11:42:05 +01:00
Richard van der Hoff
ba1b163590
Avoid sending consent notice to guest users
...
we think it makes sense not to send the notices to guest users.
2018-05-25 11:36:43 +01:00
Richard van der Hoff
41921ac01b
Merge pull request #3287 from matrix-org/rav/allow_leaving_server_notices_room
...
Let users leave the server notice room after joining
2018-05-25 11:15:45 +01:00
Richard van der Hoff
757ed27258
Let users leave the server notice room after joining
...
They still can't reject invites, but we let them leave it.
2018-05-25 11:07:21 +01:00
Adrian Tschira
4ee4450d66
fix recursion error
2018-05-24 21:44:10 +02:00
Amber Brown
9c36c150e7
Merge pull request #3283 from NotAFile/py3-state
...
py3-ize state.py
2018-05-24 14:23:33 -05:00
Amber Brown
cc1349c06a
Merge pull request #3279 from NotAFile/py3-more-iteritems
...
more six iteritems
2018-05-24 14:23:13 -05:00
Amber Brown
5b788aba90
Merge pull request #3280 from NotAFile/py3-more-misc
...
More Misc. py3 fixes
2018-05-24 14:22:59 -05:00
Adrian Tschira
0e61705661
py3-ize state.py
2018-05-24 20:59:00 +02:00
Adrian Tschira
dd068ca979
remaining isintance fixes
...
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-05-24 20:55:08 +02:00
Adrian Tschira
17a70cf6e9
Misc. py3 fixes
...
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-05-24 20:20:33 +02:00
Adrian Tschira
6c16a4ec1b
more iteritems
2018-05-24 20:19:06 +02:00
Amber Brown
7ea07c7305
Merge pull request #3278 from NotAFile/py3-storage-base
...
Py3 storage/_base.py
2018-05-24 13:08:09 -05:00
Amber Brown
1f69693347
Merge pull request #3244 from NotAFile/py3-six-4
...
replace some iteritems with six
2018-05-24 13:04:07 -05:00
Amber Brown
c4fb15a06c
Merge pull request #3246 from NotAFile/py3-repr-string
...
use repr, not str
2018-05-24 13:00:20 -05:00
Amber Brown
36501068d8
Merge pull request #3247 from NotAFile/py3-misc
...
Misc Python3 fixes
2018-05-24 12:58:37 -05:00
Amber Brown
2aff6eab6d
Merge pull request #3245 from NotAFile/batch-iter
...
Add batch_iter to utils
2018-05-24 12:54:12 -05:00
Adrian Tschira
095292304f
Py3 storage/_base.py
...
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-05-24 18:24:12 +02:00
David Baker
77a23e2e05
Merge remote-tracking branch 'origin/develop' into dbkr/unbind
2018-05-24 16:20:53 +01:00
David Baker
ecc4b88bd1
Merge pull request #3277 from matrix-org/dbkr/remove_from_user_dir
...
Remove users from user directory on deactivate
2018-05-24 16:12:12 +01:00
Erik Johnston
46345187cc
Merge pull request #3243 from NotAFile/py3-six-3
...
Replace some more comparisons with six
2018-05-24 16:08:57 +01:00
Neil Johnson
037c6db85d
Merge branch 'master' into develop
2018-05-24 16:03:44 +01:00
David Baker
7a1af504d7
Remove users from user directory on deactivate
2018-05-24 15:59:58 +01:00
Neil Johnson
14ca678674
Update CHANGES.rst
2018-05-24 15:54:02 +01:00
Neil Johnson
6f67163c63
Update CHANGES.rst
2018-05-24 15:04:41 +01:00
Neil Johnson
bdd2ed5acf
update for v0.30.0
2018-05-24 15:02:03 +01:00
Erik Johnston
f72d5a44d5
Merge pull request #3261 from matrix-org/erikj/pagination_fixes
...
Fix federation backfill bugs
2018-05-24 14:52:03 +01:00
Erik Johnston
68399fc4de
Merge pull request #3267 from matrix-org/erikj/iter_filter
...
Use iter* methods for _filter_events_for_server
2018-05-24 14:44:57 +01:00
Neil Johnson
91d95a1d8e
bump version
2018-05-24 14:05:07 +01:00
David Baker
9700d15611
pep8
2018-05-24 11:23:15 +01:00
David Baker
a21a41bad7
comment
2018-05-24 11:19:59 +01:00
David Baker
b3bff53178
Unbind 3pids when they're deleted too
2018-05-24 11:08:05 +01:00
Richard van der Hoff
8c98281b8d
Merge branch 'release-v0.30.0' into develop
2018-05-24 10:33:12 +01:00
Richard van der Hoff
6abcb5d22d
Merge pull request #3273 from matrix-org/rav/server_notices_avatar_url
...
Allow overriding the server_notices user's avatar
2018-05-24 10:31:43 +01:00
Amber Brown
389dac2c15
pepeightttt
2018-05-23 13:08:59 -05:00
Amber Brown
472a5ec4e2
add back CPU metrics
2018-05-23 13:03:56 -05:00
Amber Brown
e987079037
fixes
2018-05-23 13:03:51 -05:00
Richard van der Hoff
9bf4b2bda3
Allow overriding the server_notices user's avatar
...
probably should have done this in the first place, like @turt2live suggested.
2018-05-23 17:43:30 +01:00
Richard van der Hoff
23aa70cea8
Merge pull request #3272 from matrix-org/rav/localpart_in_consent_uri
...
Use the localpart in the consent uri
2018-05-23 16:29:44 +01:00
Richard van der Hoff
043f05a078
Merge docs on consent bits from PR #3268 into release branch
2018-05-23 16:24:58 +01:00
Richard van der Hoff
96f07cebda
Merge pull request #3268 from matrix-org/rav/privacy_policy_docs
...
Docs on consent bits
2018-05-23 16:23:05 +01:00
Richard van der Hoff
a0b3946fe2
Merge branch 'release-v0.30.0' into rav/localpart_in_consent_uri
2018-05-23 16:06:03 +01:00
Richard van der Hoff
2f7008d4eb
Merge pull request #3271 from matrix-org/rav/consent_uri_in_messages
...
Support for putting %(consent_uri)s in messages
2018-05-23 16:04:30 +01:00
Richard van der Hoff
e206b2c9ac
consent_tracking.md: clarify link
2018-05-23 15:57:10 +01:00
Richard van der Hoff
2df8c3139a
minor post-review tweaks
2018-05-23 15:39:52 +01:00
Richard van der Hoff
dda40fb55d
fix typo
2018-05-23 15:30:26 +01:00
Richard van der Hoff
3ff6f50eac
Use the localpart in the consent uri
...
... because it's shorter.
2018-05-23 15:28:23 +01:00
Richard van der Hoff
82191b08f6
Support for putting %(consent_uri)s in messages
...
Make it possible to put the URI in the error message and the server notice that
get sent by the server
2018-05-23 15:24:31 +01:00
Richard van der Hoff
2c62ea2515
Merge pull request #3270 from matrix-org/rav/block_remote_server_notices
...
Block attempts to send server notices to remote users
2018-05-23 15:06:35 +01:00
Richard van der Hoff
cd8ab9a0d8
mention public_baseurl
2018-05-23 14:43:09 +01:00
David Baker
2c7866d664
Hit the 3pid unbind endpoint on deactivation
2018-05-23 14:38:56 +01:00
Richard van der Hoff
321f02d263
Block attempts to send server notices to remote users
2018-05-23 14:30:47 +01:00
Richard van der Hoff
1cbb8e5a33
fix wrapping
2018-05-23 13:58:28 +01:00
Richard van der Hoff
052d08a6a5
Using the manhole to send server notices
2018-05-23 13:55:39 +01:00
Richard van der Hoff
5ad1149f38
Notes on the manhole
2018-05-23 13:47:34 +01:00
Richard van der Hoff
563606b8f2
consent_tracking: formatting etc
2018-05-23 12:37:39 +01:00
Richard van der Hoff
2574ea3dc8
server_notices.md: fix link
2018-05-23 12:34:34 +01:00
Richard van der Hoff
833db2d922
consent tracking docs
2018-05-23 12:32:38 +01:00
Neil Johnson
9e8ab0a4f4
style
2018-05-23 12:05:58 +01:00
Neil Johnson
3601a240aa
bump version and changelog
2018-05-23 12:03:23 +01:00
Richard van der Hoff
e7598b666b
Some docs about server notices
2018-05-23 11:14:23 +01:00
Erik Johnston
5aaa3189d5
s/values/itervalues/
2018-05-23 10:13:05 +01:00
Erik Johnston
0a4bca4134
Use iter* methods for _filter_events_for_server
2018-05-23 10:04:23 +01:00
Amber Brown
b6063631c3
more cleanup
2018-05-22 17:36:20 -05:00
Amber Brown
53cc2cde1f
cleanup
2018-05-22 17:32:57 -05:00
Amber Brown
071206304d
cleanup pep8 errors
2018-05-22 16:54:22 -05:00
Amber Brown
4abeaedcf3
tests/metrics is gone now
2018-05-22 16:45:11 -05:00
Amber Brown
85ba83eb51
fixes
2018-05-22 16:28:23 -05:00
Amber Brown
228f1f584e
fix the test failures
2018-05-22 15:02:38 -05:00
Erik Johnston
e85b5a0ff7
Use iter* methods
2018-05-22 19:02:48 +01:00
Erik Johnston
586b66b197
Fix that states is a dict of dicts
2018-05-22 19:02:36 +01:00
Erik Johnston
35ca3e7b65
Merge pull request #3265 from matrix-org/erikj/limit_pagination
...
Don't support limitless pagination
2018-05-22 18:29:36 +01:00
Erik Johnston
a17e901f4d
Remove unused string formatting param
2018-05-22 18:24:32 +01:00
Erik Johnston
5494c1d71e
Don't support limitless pagination
...
The pagination storage function supported not specifiying a limit on the
number of events returned. This was triggered when using the search or
context API with a limit of zero, which the storage function took to
mean not being limited.
2018-05-22 18:15:21 +01:00
Neil Johnson
d8cb7225d2
daily user type phone home stats
2018-05-22 18:09:09 +01:00
hera
ad2823ee27
fix synchrotron
2018-05-22 17:47:42 +01:00
Richard van der Hoff
08bfc48abf
custom error code for not leaving server notices room
2018-05-22 17:27:27 +01:00
David Baker
0a078026ea
comment typo
2018-05-22 17:14:06 +01:00
Amber Brown
07bb9bdae8
update gitignore to remove some files that got put on my machine
2018-05-22 10:57:28 -05:00
Amber Brown
8f5a688d42
cleanups, self-registration
2018-05-22 10:56:03 -05:00
Amber Brown
a8990fa2ec
Merge remote-tracking branch 'origin/develop' into 3218-official-prom
2018-05-22 10:50:26 -05:00
Erik Johnston
cb2a2ad791
get_domains_from_state returns list of tuples
2018-05-22 16:23:39 +01:00
Richard van der Hoff
08a14b32ae
Merge pull request #3262 from matrix-org/rav/has_already_consented
...
Add a 'has_consented' template var to consent forms
2018-05-22 15:35:10 +01:00
Richard van der Hoff
82c2a52987
Merge pull request #3263 from matrix-org/rav/fix_jinja_dep
...
Fix dependency on jinja2
2018-05-22 15:31:08 +01:00
Richard van der Hoff
7b36d06a69
Add a 'has_consented' template var to consent forms
...
fixes #3260
2018-05-22 14:58:34 +01:00
Richard van der Hoff
669400e22f
Enable auto-escaping for the consent templates
...
... to reduce the risk of somebody introducing an html injection attack...
2018-05-22 14:58:34 +01:00
Richard van der Hoff
b5b2d5d64b
Fix dependency on jinja2
...
Delay the import of ConsentResource, so that we can get away without jinja2 if
people don't have the consent resource enabled.
Fixes #3259
2018-05-22 14:03:45 +01:00
Richard van der Hoff
3b2def6c7a
Merge pull request #3257 from matrix-org/rav/fonx_on_no_consent
...
Reject attempts to send event before privacy consent is given
2018-05-22 12:01:43 +01:00
Richard van der Hoff
a5e2941aad
Reject attempts to send event before privacy consent is given
...
Returns an M_CONSENT_NOT_GIVEN error (cf
https://github.com/matrix-org/matrix-doc/issues/1252 ) if consent is not yet
given.
2018-05-22 12:00:47 +01:00
Richard van der Hoff
8aeb529262
Merge pull request #3236 from matrix-org/rav/consent_notice
...
Send users a server notice about consent
2018-05-22 11:56:09 +01:00
Richard van der Hoff
8810685df9
Stub out ServerNoticesSender on the workers
...
... and have the sync endpoints call it directly rather than obsure indirection
via PresenceHandler
2018-05-22 11:54:51 +01:00
Richard van der Hoff
d5dca9a04f
Move consent config parsing into ConsentConfig
...
turns out we need to reuse this, so it's better in the config class.
2018-05-22 11:54:51 +01:00
Richard van der Hoff
9ea219c514
Send users a server notice about consent
...
When a user first syncs, we will send them a server notice asking them to
consent to the privacy policy if they have not already done so.
2018-05-22 11:54:51 +01:00
Richard van der Hoff
d14d7b8fdc
Rename 'version' param on user consent config
...
we're going to use it for the version we require too.
2018-05-22 11:54:51 +01:00
Erik Johnston
7cfa8a87a1
Merge pull request #3258 from matrix-org/erikj/fixup_logcontext_rusage
...
Fix logcontext resource usage tracking
2018-05-22 11:39:56 +01:00
Erik Johnston
7948ecf234
Comment
2018-05-22 11:39:43 +01:00
Erik Johnston
020377a550
Fix logcontext resource usage tracking
2018-05-22 11:16:07 +01:00
Erik Johnston
13a8dfba0d
Merge pull request #3252 from matrix-org/erikj/in_flight_requests
...
Add in flight request metrics
2018-05-22 09:54:30 +01:00
Erik Johnston
c435b0b441
Don't store context
2018-05-22 09:34:26 +01:00
Erik Johnston
fb2806b186
Move in_flight_requests_count to be a callback metric
2018-05-22 09:31:53 +01:00
Amber Brown
fcc525b0b7
rest of the changes
2018-05-21 19:48:57 -05:00
Amber Brown
df9f72d9e5
replacing portions
2018-05-21 19:47:37 -05:00
Amber Brown
c60e0d5e02
don't need the resource portion
2018-05-21 17:03:20 -05:00
Amber Brown
02c1d29133
look at the Prometheus metrics instead
2018-05-21 17:02:20 -05:00
Amber Brown
f258deffcb
remove old metrics libs
2018-05-21 17:01:15 -05:00
Richard van der Hoff
413482f578
Merge pull request #3255 from matrix-org/rav/fix_transactions
...
Stop the transaction cache caching failures
2018-05-21 17:58:08 +01:00
Neil Johnson
4aac88928f
Merge pull request #3251 from matrix-org/cohort_analytics
...
Tighter filtering for user_daily_visits
2018-05-21 16:42:18 +00:00
Richard van der Hoff
6e1cb54a05
Fix logcontext leak in HttpTransactionCache
...
ONE DAY I WILL PURGE THE WORLD OF THIS EVIL
2018-05-21 16:58:20 +01:00
Richard van der Hoff
6d6e7288fe
Stop the transaction cache caching failures
...
The transaction cache has some code which tries to stop it caching failures,
but if the callback function failed straight away, then things would happen
backwards and we'd end up with the failure stuck in the cache.
2018-05-21 16:49:59 +01:00
Michael Kaye
d689e0dba1
Merge pull request #3239 from ptman/develop
...
Add lxml to docker image for web previews
2018-05-21 16:31:18 +01:00
Erik Johnston
dfa70adc33
Add in flight request metrics
...
This tracks CPU and DB usage while requests are in flight, rather than
when we write the response.
2018-05-21 16:23:06 +01:00
Adrian Tschira
933bf2dd35
replace some iteritems with six
...
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-05-19 17:59:26 +02:00
Adrian Tschira
d9fe2b2d9d
Replace some more comparisons with six
...
plus a bonus b"" string I missed last time
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-05-19 17:56:31 +02:00
Adrian Tschira
45b55e23d3
Add batch_iter to utils
...
There's a frequent idiom I noticed where an iterable is split up into a
number of chunks/batches. Unfortunately that method does not work with
iterators like dict.keys() in python3. This implementation works with
iterators.
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-05-19 17:48:30 +02:00
Adrian Tschira
dcc235b47d
use stand-in value if maxint is not available
...
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-05-19 17:35:44 +02:00
Adrian Tschira
73cbdef5f7
fix py3 intern and remove unnecessary py3 encode
...
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-05-19 17:35:31 +02:00
Adrian Tschira
aafb0f6b0d
py3-ize url preview
2018-05-19 17:35:20 +02:00
Adrian Tschira
b932b4ea25
use repr, not str
...
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-05-19 17:28:42 +02:00
Neil Johnson
644aac5f73
Tighter filtering for user_daily_visits
2018-05-18 17:10:35 +01:00
Neil Johnson
08462620bf
Merge pull request #3241 from matrix-org/fix_user_visits_insertion
...
fix psql compatability bug
2018-05-18 15:01:01 +00:00
Neil Johnson
ef466b3a13
fix psql compatability bug
2018-05-18 15:51:21 +01:00
Paul Tötterman
861f8a9b21
Add lxml to docker image for web previews
...
Signed-off-by: Paul Tötterman <paul.totterman@iki.fi >
2018-05-18 16:20:08 +03:00
Neil Johnson
2725223f08
Merge branch 'master' into develop
2018-05-18 14:07:50 +01:00
Neil Johnson
ab5e888927
Merge tag 'v0.29.1'
...
Changes in synapse v0.29.1 (2018-05-17)
==========================================
Changes:
* Update docker documentation (PR #3222 )
Changes in synapse v0.29.0 (2018-05-16)
===========================================
Not changes since v0.29.0-rc1
Changes in synapse v0.29.0-rc1 (2018-05-14)
===========================================
Notable changes, a docker file for running Synapse (Thanks to @kaiyou!) and a
closed spec bug in the Client Server API. Additionally further prep for Python 3
migration.
Potentially breaking change:
* Make Client-Server API return 401 for invalid token (PR #3161 ).
This changes the Client-server spec to return a 401 error code instead of 403
when the access token is unrecognised. This is the behaviour required by the
specification, but some clients may be relying on the old, incorrect
behaviour.
Thanks to @NotAFile for fixing this.
Features:
* Add a Dockerfile for synapse (PR #2846 ) Thanks to @kaiyou!
Changes - General:
* nuke-room-from-db.sh: added postgresql option and help (PR #2337 ) Thanks to @rubo77!
* Part user from rooms on account deactivate (PR #3201 )
* Make 'unexpected logging context' into warnings (PR #3007 )
* Set Server header in SynapseRequest (PR #3208 )
* remove duplicates from groups tables (PR #3129 )
* Improve exception handling for background processes (PR #3138 )
* Add missing consumeErrors to improve exception handling (PR #3139 )
* reraise exceptions more carefully (PR #3142 )
* Remove redundant call to preserve_fn (PR #3143 )
* Trap exceptions thrown within run_in_background (PR #3144 )
Changes - Refactors:
* Refactor /context to reuse pagination storage functions (PR #3193 )
* Refactor recent events func to use pagination func (PR #3195 )
* Refactor pagination DB API to return concrete type (PR #3196 )
* Refactor get_recent_events_for_room return type (PR #3198 )
* Refactor sync APIs to reuse pagination API (PR #3199 )
* Remove unused code path from member change DB func (PR #3200 )
* Refactor request handling wrappers (PR #3203 )
* transaction_id, destination defined twice (PR #3209 ) Thanks to @damir-manapov!
* Refactor event storage to prepare for changes in state calculations (PR #3141 )
* Set Server header in SynapseRequest (PR #3208 )
* Use deferred.addTimeout instead of time_bound_deferred (PR #3127 , #3178 )
* Use run_in_background in preference to preserve_fn (PR #3140 )
Changes - Python 3 migration:
* Construct HMAC as bytes on py3 (PR #3156 ) Thanks to @NotAFile!
* run config tests on py3 (PR #3159 ) Thanks to @NotAFile!
* Open certificate files as bytes (PR #3084 ) Thanks to @NotAFile!
* Open config file in non-bytes mode (PR #3085 ) Thanks to @NotAFile!
* Make event properties raise AttributeError instead (PR #3102 ) Thanks to @NotAFile!
* Use six.moves.urlparse (PR #3108 ) Thanks to @NotAFile!
* Add py3 tests to tox with folders that work (PR #3145 ) Thanks to @NotAFile!
* Don't yield in list comprehensions (PR #3150 ) Thanks to @NotAFile!
* Move more xrange to six (PR #3151 ) Thanks to @NotAFile!
* make imports local (PR #3152 ) Thanks to @NotAFile!
* move httplib import to six (PR #3153 ) Thanks to @NotAFile!
* Replace stringIO imports with six (PR #3154 , #3168 ) Thanks to @NotAFile!
* more bytes strings (PR #3155 ) Thanks to @NotAFile!
Bug Fixes:
* synapse fails to start under Twisted >= 18.4 (PR #3157 )
* Fix a class of logcontext leaks (PR #3170 )
* Fix a couple of logcontext leaks in unit tests (PR #3172 )
* Fix logcontext leak in media repo (PR #3174 )
* Escape label values in prometheus metrics (PR #3175 , #3186 )
* Fix 'Unhandled Error' logs with Twisted 18.4 (PR #3182 ) Thanks to @Half-Shot!
* Fix logcontext leaks in rate limiter (PR #3183 )
* notifications: Convert next_token to string according to the spec (PR #3190 ) Thanks to @mujx!
* nuke-room-from-db.sh: fix deletion from search table (PR #3194 ) Thanks to @rubo77!
* add guard for None on purge_history api (PR #3160 ) Thanks to @krombel!
2018-05-18 14:06:34 +01:00
Neil Johnson
f3d9dca975
Merge branch 'release-v0.29.0' of https://github.com/matrix-org/synapse into release-v0.29.0
2018-05-18 13:55:19 +01:00
Richard van der Hoff
6d9dc67139
Merge pull request #3232 from matrix-org/rav/server_notices_room
...
Infrastructure for a server notices room
2018-05-18 11:28:04 +01:00
Richard van der Hoff
ed3125b0a1
Merge pull request #3235 from matrix-org/rav/fix_receipts_deferred
...
Fix error in handling receipts
2018-05-18 11:23:11 +01:00
Richard van der Hoff
67af392712
Merge pull request #3233 from matrix-org/rav/remove_dead_code
...
Remove unused `update_external_syncs`
2018-05-18 11:22:43 +01:00
Richard van der Hoff
011e1f4010
Better docstrings
2018-05-18 11:22:12 +01:00
Richard van der Hoff
26305788fe
Make sure we reject attempts to invite the notices user
2018-05-18 11:18:39 +01:00
Richard van der Hoff
d10707c810
Replace inline docstrings with "Attributes" in class docstring
2018-05-18 11:00:55 +01:00
Erik Johnston
fa30ac38cc
Merge pull request #3221 from matrix-org/erikj/purge_token
...
Make purge_history operate on tokens
2018-05-18 10:35:23 +01:00
Richard van der Hoff
8b1c856d81
Fix error in handling receipts
...
Fixes an error which has been happening ever since #2158 (v0.21.0-rc1):
> TypeError: argument of type 'ObservableDeferred' is not iterable
fixes #3234
2018-05-18 09:15:35 +01:00
Neil Johnson
6958459b50
bump version, change log
2018-05-17 21:35:07 +01:00
Richard van der Hoff
88d3405332
fix missing yield for server_notices_room
2018-05-17 18:33:45 +01:00
Richard van der Hoff
d43d480d86
Remove unused update_external_syncs
...
This method isn't used anywhere. Burninate it.
2018-05-17 18:22:19 +01:00
Neil Johnson
a2da6de40e
light grammar changes
2018-05-17 18:12:00 +01:00
Michael Kaye
450f500d0c
Note that secrets need to be retained.
2018-05-17 18:12:00 +01:00
Michael Kaye
82b0361f02
Document macaroon env var correctly
2018-05-17 18:12:00 +01:00
Michael Kaye
1b1b47aec6
Reference synapse docker image and docker-compose
2018-05-17 18:12:00 +01:00
Richard van der Hoff
fed62e21ad
Infrastructure for a server notices room
...
Server Notices use a special room which the user can't dismiss. They are
created on demand when some other bit of the code calls send_notice.
(This doesn't actually do much yet becuse we don't call send_notice anywhere)
2018-05-17 17:58:25 +01:00
Richard van der Hoff
f8a1e76d64
Merge pull request #3225 from matrix-org/rav/move_creation_handler
...
Move RoomCreationHandler out of synapse.handlers.Handlers
2018-05-17 17:56:42 +01:00
Erik Johnston
f7906203f6
Merge pull request #3212 from matrix-org/erikj/epa_stream
...
Use stream rather depth ordering for push actions
2018-05-17 12:01:21 +01:00
Richard van der Hoff
ae53c71d90
Merge pull request #1756 from rubo77/patch-4
...
Add instructions how to setup the postgres user and clarify the final step
2018-05-17 10:52:54 +01:00
rubo77
616da9eb1d
postgres.rst: Add instructions how to setup the postgres user and clarify the final step
2018-05-17 11:48:56 +02:00
Richard van der Hoff
c46367d0d7
Move RoomCreationHandler out of synapse.handlers.Handlers
...
Handlers is deprecated nowadays, so let's move this out before I add a new
dependency on it.
Also fix the docstrings on create_room.
2018-05-17 09:08:42 +01:00
Neil Johnson
85b8acdeb4
Merge branch 'master' into develop
2018-05-16 16:48:10 +01:00
Neil Johnson
3c099219e0
bump version and changelog for 0.29.0
2018-05-16 15:44:59 +01:00
Erik Johnston
680530cc7f
Clarify comment
2018-05-16 11:47:29 +01:00
Erik Johnston
43e6e82c4d
Comments
2018-05-16 11:13:31 +01:00
Neil Johnson
dc8930ea9e
Merge pull request #3163 from matrix-org/cohort_analytics
...
user visit data
2018-05-16 10:09:24 +00:00
Erik Johnston
c945af8799
Move and rename variable
2018-05-16 10:52:06 +01:00
Neil Johnson
be11a02c4f
remove empty line
2018-05-16 10:45:40 +01:00
Neil Johnson
a2204cc9cc
remove unused method recurring_user_daily_visit_stats
2018-05-16 09:47:20 +01:00
Neil Johnson
31c2502ca8
style and further contraining query
2018-05-16 09:46:43 +01:00
Richard van der Hoff
8030a825c8
Merge pull request #3213 from matrix-org/rav/consent_handler
...
ConsentResource to gather policy consent from users
2018-05-16 07:19:18 +01:00
Neil Johnson
c92a8aa578
pep8
2018-05-15 17:31:11 +01:00
Neil Johnson
05ac15ae82
Limit query load of generate_user_daily_visits
...
The aim is to keep track of when it was last called and only query from that point in time
2018-05-15 17:01:33 +01:00
Erik Johnston
5f27ed75ad
Make purge_history operate on tokens
...
As we're soon going to change how topological_ordering works
2018-05-15 16:23:50 +01:00
Erik Johnston
37dbee6490
Use events_to_purge table rather than token
2018-05-15 16:23:47 +01:00
Richard van der Hoff
47815edcfa
ConsentResource to gather policy consent from users
...
Hopefully there are enough comments and docs in this that it makes sense on its
own.
2018-05-15 15:11:59 +01:00
Neil Johnson
589ecc5b58
further musical chairs
2018-05-14 17:49:59 +01:00
Neil Johnson
e71fb118f4
rearrange and collect related PRs
2018-05-14 17:39:22 +01:00
Neil Johnson
aea80a0118
v0.29.0-rc1: bump version and change log
2018-05-14 15:50:57 +01:00
Neil Johnson
f077e97914
instead of inserting user daily visit data at the end of the day, instead insert incrementally through the day
2018-05-14 13:50:58 +01:00
David Baker
8cbbfd16fb
Merge pull request #3201 from matrix-org/dbkr/leave_rooms_on_deactivate
...
Part user from rooms on account deactivate
2018-05-14 11:31:48 +01:00
Neil Johnson
977765bde2
Merge branch 'develop' of https://github.com/matrix-org/synapse into cohort_analytics
2018-05-14 09:31:42 +01:00
Michael Kaye
16f41237f0
Merge pull request #2846 from kaiyou/feat-dockerfile
...
Add a Dockerfile for synapse
2018-05-11 17:21:12 +01:00
Richard van der Hoff
c25d7ba12e
Merge pull request #3208 from matrix-org/rav/more_refactor_request_handler
...
Set Server header in SynapseRequest
2018-05-11 16:07:47 +01:00
Erik Johnston
6406b70aeb
Use stream rather depth ordering for push actions
...
This simplifies things as it is, but will also allow us to change the
way we traverse topologically without having to update the way push
actions work.
2018-05-11 15:30:11 +01:00
Richard van der Hoff
23e2dfe940
Merge pull request #3209 from damir-manapov/master
...
transaction_id, destination defined twice
2018-05-11 00:35:13 +01:00
Richard van der Hoff
bd8d0cfab1
Merge remote-tracking branch 'origin/master' into develop
2018-05-11 00:19:26 +01:00
Damir Manapov
db18d854cd
transaction_id, destination twice
2018-05-10 22:13:31 +03:00
Richard van der Hoff
318711e139
Set Server header in SynapseRequest
...
(instead of everywhere that writes a response. Or rather, the subset of places
which write responses where we haven't forgotten it).
This also means that we don't have to have the mysterious version_string
attribute in anything with a request handler.
Unfortunately it does mean that we have to pass the version string wherever we
instantiate a SynapseSite, which has been c&ped 150 times, but that is code
that ought to be cleaned up anyway really.
2018-05-10 18:50:27 +01:00
Richard van der Hoff
7b411007e6
Merge pull request #3203 from matrix-org/rav/refactor_request_handler
...
Refactor request handling wrappers
2018-05-10 15:26:53 +01:00
David Baker
6b49628e3b
Catch failure to part user from room
2018-05-10 12:23:53 +01:00
David Baker
217bc53c98
Many docstrings
2018-05-10 12:20:40 +01:00
Richard van der Hoff
645cb4bf06
Remove redundant request_handler decorator
...
This is needless complexity; we might as well use the wrapper directly.
Also rename wrap_request_handler->wrap_json_request_handler.
2018-05-10 12:19:53 +01:00
Richard van der Hoff
09f570b935
Factor wrap_request_handler_with_logging out of wrap_request_handler
...
... so that it can be used on non-JSON endpoints
2018-05-10 12:19:52 +01:00
Richard van der Hoff
9589a1925e
Remove include_metrics param
...
The metrics are now available via the request, so this is redundant and can go
away at last.
2018-05-10 12:19:52 +01:00
Richard van der Hoff
49e5a613f1
Move outgoing_responses_counter handling to RequestMetrics
...
it's much neater there.
2018-05-10 12:19:52 +01:00
Richard van der Hoff
b8700dd7d0
Bump requests_counter in wrapped_request_handler
...
less magic
2018-05-10 12:19:52 +01:00
Richard van der Hoff
c6f730282c
Move RequestMetrics handling into SynapseRequest.processing()
...
It fits quite nicely here, and opens the path to getting rid of the
"include_metrics" mess.
2018-05-10 12:19:51 +01:00
Richard van der Hoff
09b29f9c4a
Make RequestMetrics take a raw time rather than a clock
...
... which is going to make it easier to move around.
2018-05-10 12:18:52 +01:00
David Baker
4d298506dd
Oops, don't call function passed to run_in_background
2018-05-10 11:57:13 +01:00
Richard van der Hoff
8460e48d06
Move request_id management into SynapseRequest
2018-05-10 11:48:17 +01:00
Richard van der Hoff
18e144fe08
Move RequestsMetrics to its own file
...
This is useful in its own right, because server.py is full of stuff; but more
importantly, I want to do some refactoring that will cause a circular reference
as it is.
2018-05-09 19:55:03 +01:00
Erik Johnston
bfe1f73855
Merge pull request #3199 from matrix-org/erikj/pagination_sync
...
Refactor sync APIs to reuse pagination API
2018-05-09 16:16:56 +01:00
Erik Johnston
5adb75bcba
Merge pull request #3198 from matrix-org/erikj/fixup_return_pagination
...
Refactor get_recent_events_for_room return type
2018-05-09 16:07:14 +01:00
Erik Johnston
a5c98dda48
Merge pull request #3200 from matrix-org/erikj/remove_membership_change
...
Remove unused code path from member change DB func
2018-05-09 16:02:13 +01:00
Erik Johnston
d26bec8a43
Add comment to sync as to why code path is split
2018-05-09 15:56:07 +01:00
Erik Johnston
fcf55f2255
Fix returned token is no longer a tuple
2018-05-09 15:43:00 +01:00
Erik Johnston
7ce98804ff
Fix up comment
2018-05-09 15:42:39 +01:00
Erik Johnston
cddf91c8b9
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/remove_membership_change
2018-05-09 15:32:07 +01:00
Erik Johnston
9896dab8f6
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/fixup_return_pagination
2018-05-09 15:31:33 +01:00
Erik Johnston
1e5280b7d0
Merge pull request #3196 from matrix-org/erikj/pagination_return
...
Refactor pagination DB API to return concrete type
2018-05-09 15:27:17 +01:00
Erik Johnston
75552d2148
Update comments
2018-05-09 15:15:38 +01:00
David Baker
294e9a0c9b
Prefix internal functions
2018-05-09 15:10:37 +01:00
David Baker
46df23f581
Add the schema file
2018-05-09 15:07:54 +01:00
David Baker
52281e4c54
Indent fail
2018-05-09 15:06:16 +01:00
David Baker
7e8726b8fb
Part deactivated users in the background
...
One room at a time so we don't take out the whole server with leave
events, and restart at server restart.
2018-05-09 14:54:28 +01:00
Erik Johnston
c0e08dc45b
Remove unused code path from member change DB func
...
The function is never called without a from_key, so we can remove all
the handling for that scenario.
2018-05-09 14:31:32 +01:00
Erik Johnston
0461ef01b7
Merge pull request #3195 from matrix-org/erikj/pagination_refactor
...
Refactor recent events func to use pagination func
2018-05-09 14:12:24 +01:00
Erik Johnston
e2accd7f1d
Refactor sync APIs to reuse pagination API
...
The sync API often returns events in a topological rather than stream
ordering, e.g. when the user joined the room or on initial sync. When
this happens we can reuse existing pagination storage functions.
2018-05-09 13:43:39 +01:00
Erik Johnston
e5ab9cd24b
Don't unnecessarily require token to be stream token
...
This allows calling the `get_recent_event_ids_for_room` function in more
situations.
2018-05-09 11:58:35 +01:00
Richard van der Hoff
60590211c1
Merge pull request #3194 from rubo77/fix-nuke
...
nuke-room-from-db.sh: fix deletion from search table
2018-05-09 11:58:07 +01:00
Erik Johnston
c4af4c24ca
Refactor get_recent_events_for_room return type
...
There is no reason to return a tuple of tokens when the last token is
always the token passed as an argument. Changing it makes it consistent
with other storage APIs
2018-05-09 11:55:34 +01:00
Erik Johnston
05e0a2462c
Refactor pagination DB API to return concrete type
...
This makes it easier to document what is being returned by the storage
functions and what some functions expect as arguments.
2018-05-09 11:34:24 +01:00
Erik Johnston
7dd13415db
Remove unused from_token param
2018-05-09 10:58:16 +01:00
Erik Johnston
27cf170558
Refactor recent events func to use pagination func
...
This also removes a cache that is unlikely to ever get hit.
2018-05-09 10:55:55 +01:00
Erik Johnston
1aeb5e28a9
Merge pull request #3193 from matrix-org/erikj/pagination_refactor
...
Refactor /context to reuse pagination storage functions
2018-05-09 10:22:38 +01:00
Erik Johnston
23ec51c94c
Fix up comments and make function private
2018-05-09 09:55:19 +01:00
Richard van der Hoff
d5377eba55
Merge pull request #2337 from rubo77/patch-5
...
nuke-room-from-db.sh: added postgresql option and help
2018-05-09 09:43:07 +01:00
rubo77
d11b8b6b65
nuke-room-from-db.sh: nuke from table event_search too
2018-05-09 00:46:47 +02:00
rubo77
8ff8ab3bce
Dont nuke non-existing table event_search_content
2018-05-09 00:21:00 +02:00
rubo77
6c957e26f0
nuke-room-from-db.sh: added postgresql option and help
2018-05-09 00:14:01 +02:00
Erik Johnston
696f532453
Reuse existing pagination code for context API
2018-05-08 16:20:19 +01:00
Erik Johnston
3e6d306e94
Parse tokens before calling DB function
2018-05-08 16:18:58 +01:00
Erik Johnston
274b8c6025
Only fetch required fields from database
2018-05-08 16:15:25 +01:00
Erik Johnston
06c0d0ed08
Split paginate_room_events storage function
2018-05-08 16:14:26 +01:00
David Baker
bf98fa0864
Part user from rooms on account deactivate
...
This implements this very crudely: this probably isn't viable
because parting a user from all their rooms could take a long time,
and if the HS gets restarted in that time the process will be
aborted.
2018-05-08 15:58:35 +01:00
Richard van der Hoff
678e649b78
Merge pull request #3190 from mujx/notif-token-fix
...
notifications: Convert next_token to string according to the spec
2018-05-08 13:54:47 +01:00
Erik Johnston
0b7dfbb194
Merge pull request #3186 from matrix-org/erikj/fix_int_values_metrics
...
Fix metrics that have integer value labels
2018-05-08 09:48:50 +01:00
Konstantinos Sideris
88868b2839
notifications: Convert next_token to string according to the spec
...
Currently the parameter is serialized as an integer.
Signed-off-by: Konstantinos Sideris <sideris.konstantin@gmail.com >
2018-05-05 12:55:02 +03:00
kaiyou
5addeaa02c
Add Docker packaging in the author list
2018-05-04 21:23:01 +02:00
Erik Johnston
6d8ec3462d
Note that label values can be anything
2018-05-03 16:25:05 +01:00
Erik Johnston
95b6912045
Fix metrics that have integer value labels
2018-05-03 15:51:04 +01:00
Richard van der Hoff
966686c845
Merge pull request #3007 from matrix-org/rav/warn_on_logcontext_fail
...
Make 'unexpected logging context' into warnings
2018-05-03 15:10:04 +01:00
Richard van der Hoff
093d8c415a
Merge remote-tracking branch 'origin/develop' into rav/warn_on_logcontext_fail
2018-05-03 14:59:29 +01:00
Richard van der Hoff
0ba609dc6f
Merge pull request #3183 from matrix-org/rav/moar_logcontext_leaks
...
Fix logcontext leaks in rate limiter
2018-05-03 14:58:13 +01:00
Richard van der Hoff
2117f84323
Merge pull request #3182 from Half-Shot/hs/fix-twisted-shutdown
...
Fix 'Unhandled Error' logs with Twisted 18.4
2018-05-03 12:40:11 +01:00
Richard van der Hoff
a7fe62f0cb
Fix logcontext leaks in rate limiter
2018-05-03 12:31:59 +01:00
Will Hunt
2e7a94c36b
Don't abortConnection() if the transport connection has already closed.
2018-05-03 12:31:47 +01:00
Richard van der Hoff
a2aaa9cb3c
Merge pull request #3178 from matrix-org/rav/fix_request_timeouts
...
fix http request timeout code
2018-05-03 11:33:26 +01:00
Richard van der Hoff
d72faf2fad
Fix changes warning
2018-05-03 10:56:42 +01:00
Richard van der Hoff
a0501ac57e
Warn of potential client incompatibility from #3161
2018-05-03 10:51:39 +01:00
Erik Johnston
0a3b51c420
Merge pull request #3141 from matrix-org/erikj/fixup_state
...
Refactor event storage to prepare for changes in state calculations
2018-05-03 10:39:20 +01:00
Erik Johnston
31c7c29d43
Fix up grammar
2018-05-03 10:38:58 +01:00
Richard van der Hoff
902673e356
Merge pull request #3161 from NotAFile/remove-v1auth
...
Make Client-Server API return 403 for invalid token
2018-05-03 10:10:57 +01:00
Erik Johnston
53a5fdf312
Merge pull request #3175 from matrix-org/erikj/escape_metric_values
...
Escape label values in prometheus metrics
2018-05-03 10:01:04 +01:00
Richard van der Hoff
1dfd650348
add missing param to cancelled_to_request_timed_out_error
...
This gets two arguments, not one.
2018-05-02 22:42:36 +01:00
kaiyou
9a779c2ddb
Merge remote-tracking branch 'upstream/master' into feat-dockerfile
2018-05-02 20:22:41 +02:00
Erik Johnston
a41117c63b
Make _escape_character take MatchObject
2018-05-02 17:27:27 +01:00
Erik Johnston
32015e1109
Escape label values in prometheus metrics
2018-05-02 16:52:42 +01:00
Richard van der Hoff
3a42aed9a1
Merge pull request #3170 from matrix-org/rav/more_logcontext_leaks
...
Fix a class of logcontext leaks
2018-05-02 16:45:51 +01:00
Richard van der Hoff
5a0be97ab2
Merge pull request #3174 from matrix-org/rav/media_repo_logcontext_leaks
...
Fix logcontext leak in media repo
2018-05-02 16:43:04 +01:00
Richard van der Hoff
415c6b672e
Merge branch 'develop' into rav/more_logcontext_leaks
2018-05-02 16:16:01 +01:00
Richard van der Hoff
4e9bdeba57
Merge pull request #3172 from matrix-org/rav/fix_test_logcontext_leaks
...
Fix a couple of logcontext leaks in unit tests
2018-05-02 16:15:22 +01:00
Richard van der Hoff
be31adb036
Fix logcontext leak in media repo
...
Make FileResponder.write_to_consumer uphold the logcontext contract
2018-05-02 16:14:50 +01:00
Richard van der Hoff
11607006d9
Remove spurious unittest.DEBUG
2018-05-02 15:48:47 +01:00
Richard van der Hoff
46beeb9a30
Fix a couple of logcontext leaks in unit tests
...
... which were making other, innocent, tests, fail.
Plus remove a spurious unittest.DEBUG which was making the output noisy.
2018-05-02 15:46:22 +01:00
Richard van der Hoff
f22e7cda2c
Fix a class of logcontext leaks
...
So, it turns out that if you have a first `Deferred` `D1`, you can add a
callback which returns another `Deferred` `D2`, and `D2` must then complete
before any further callbacks on `D1` will execute (and later callbacks on `D1`
get the *result* of `D2` rather than `D2` itself).
So, `D1` might have `called=True` (as in, it has started running its
callbacks), but any new callbacks added to `D1` won't get run until `D2`
completes - so if you `yield D1` in an `inlineCallbacks` function, your `yield`
will 'block'.
In conclusion: some of our assumptions in `logcontext` were invalid. We need to
make sure that we don't optimise out the logcontext juggling when this
situation happens. Fortunately, it is easy to detect by checking `D1.paused`.
2018-05-02 11:58:00 +01:00
Richard van der Hoff
a8d8bf92e0
Merge pull request #3168 from matrix-org/rav/fix_logformatter
...
Fix incorrect reference to StringIO
2018-05-02 10:03:36 +01:00
Richard van der Hoff
e482f8cd85
Fix incorrect reference to StringIO
...
This was introduced in 4f2f5171
2018-05-02 09:12:26 +01:00
kaiyou
4f2e898c29
Make the logging level configurable
2018-05-01 20:50:03 +02:00
kaiyou
d4c14e1438
Fix the documentation about 'POSTGRES_DB'
2018-05-01 20:47:58 +02:00
Matthew Hodgson
9f21de6a01
missing word :|
2018-05-01 19:19:46 +01:00
Matthew Hodgson
da602419b2
missing word :|
2018-05-01 19:19:23 +01:00
Matthew Hodgson
8ae7096958
Merge branch 'release-v0.28.1' into develop
2018-05-01 19:05:03 +01:00
Matthew Hodgson
562532dd2d
Merge branch 'release-v0.28.1'
2018-05-01 19:04:11 +01:00
Matthew Hodgson
5c2214f4c7
fix markdown
2018-05-01 19:03:35 +01:00
Neil Johnson
2414178ed6
Merge branch 'master' into develop
2018-05-01 18:53:56 +01:00
Neil Johnson
40d1bbd257
fix conflict in changelog from previous release
2018-05-01 18:52:44 +01:00
Matthew Hodgson
8e6bd0e324
changelog for 0.28.1
2018-05-01 18:28:23 +01:00
Neil Johnson
8570bb84cc
Update __init__.py
...
bump version
2018-05-01 18:22:53 +01:00
Richard van der Hoff
ca7211104e
Merge branch 'release-v0.28.1' into develop
2018-05-01 18:16:57 +01:00
Richard van der Hoff
d5eee5d601
Merge commit '33f469b' into release-v0.28.1
2018-05-01 18:14:18 +01:00
Richard van der Hoff
d858f3bd4e
Miscellaneous fixes to python_dependencies
...
* add some doc about wtf this thing does
* pin Twisted to < 18.4
* add explicit dep on six (fixes #3089 )
2018-05-01 18:13:54 +01:00
Richard van der Hoff
33f469ba19
Apply some limits to depth to counter abuse
...
* When creating a new event, cap its depth to 2^63 - 1
* When receiving events, reject any without a sensible depth
As per https://docs.google.com/document/d/1I3fi2S-XnpO45qrpCsowZv8P8dHcNZ4fsBsbOW7KABI
2018-05-01 17:54:19 +01:00
Neil Johnson
dd1a832419
remove user agent from data model, will just join on user_ips
2018-05-01 12:13:49 +01:00
Neil Johnson
d0857702e8
add inidexes based on usage
2018-05-01 12:12:57 +01:00
Neil Johnson
5917562b60
10 mins seems more reasonable that every minute
2018-05-01 12:12:22 +01:00
Adrian Tschira
6495dbb326
Burminate v1auth
...
This closes #2602
v1auth was created to account for the differences in status code between
the v1 and v2_alpha revisions of the protocol (401 vs 403 for invalid
tokens). However since those protocols were merged, this makes the r0
version/endpoint internally inconsistent, and violates the
specification for the r0 endpoint.
This might break clients that rely on this inconsistency with the
specification. This is said to affect the legacy angular reference
client. However, I feel that restoring parity with the spec is more
important. Either way, it is critical to inform developers about this
change, in case they rely on the illegal behaviour.
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-30 22:20:43 +02:00
Will Hunt
2ad3fc36e6
Fixes #3135 - Replace _OpenSSLECCurve with crypto.get_elliptic_curve ( #3157 )
...
fixes #3135
Signed-off-by: Will Hunt will@half-shot.uk
2018-04-30 16:21:11 +01:00
Richard van der Hoff
cead75fae3
Merge pull request #3160 from krombel/fix_3076
...
add guard for None on purge_history api
2018-04-30 15:03:59 +01:00
Krombel
576b71dd3d
add guard for None on purge_history api
2018-04-30 14:29:48 +02:00
Matthew Hodgson
99a54bf2af
Merge pull request #3129 from matrix-org/matthew/fix_group_dups
...
remove duplicates from groups tables
2018-04-30 11:47:25 +01:00
Richard van der Hoff
63ae5cbf34
Merge pull request #3143 from matrix-org/rav/remove_redundant_preserve_fn
...
Remove redundant call to preserve_fn
2018-04-30 10:23:59 +01:00
Richard van der Hoff
fdb6849b81
Merge pull request #3144 from matrix-org/rav/run_in_background_exception_handling
...
Trap exceptions thrown within run_in_background
2018-04-30 10:23:02 +01:00
Richard van der Hoff
66aa32ede2
Merge pull request #3159 from NotAFile/py3-tests-config
...
run config tests on py3
2018-04-30 10:22:45 +01:00
Adrian Tschira
6e005d1382
run config tests on py3
...
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-30 10:39:45 +02:00
Richard van der Hoff
01e8a52825
Merge pull request #3102 from NotAFile/py3-attributeerror
...
Make event properties raise AttributeError instead
2018-04-30 09:22:09 +01:00
Adrian Tschira
0c9db26260
add comment explaining attributeerror
2018-04-30 09:49:10 +02:00
Richard van der Hoff
950a32eb47
Merge pull request #3152 from NotAFile/py3-local-imports
...
make imports local
2018-04-30 01:28:13 +01:00
Richard van der Hoff
bc2017a594
Merge pull request #3153 from NotAFile/py3-httplib
...
move httplib import to six
2018-04-30 01:26:42 +01:00
Richard van der Hoff
683149c1f9
Merge pull request #3151 from NotAFile/py3-xrange-1
...
Move more xrange to six
2018-04-30 01:20:06 +01:00
Richard van der Hoff
7b908aeec4
Merge branch 'rav/test_36' into develop
2018-04-30 01:12:58 +01:00
Richard van der Hoff
3b0e431c82
Merge pull request #3150 from NotAFile/py3-listcomp-yield
...
Don't yield in list comprehensions
2018-04-30 01:11:41 +01:00
Richard van der Hoff
db75c86e84
Merge branch 'develop' into py3-xrange-1
2018-04-30 01:02:25 +01:00
Richard van der Hoff
2fd96727b1
Merge pull request #3085 from NotAFile/py3-config-text-mode
...
Open config file in non-bytes mode
2018-04-30 01:00:23 +01:00
Richard van der Hoff
b8ee12b978
Merge pull request #3084 from NotAFile/py3-certs-byte-mode
...
Open certificate files as bytes
2018-04-30 01:00:05 +01:00
Richard van der Hoff
049b0b5af2
Merge pull request #3154 from NotAFile/py3-stringio
...
Replace stringIO imports with six
2018-04-30 00:59:04 +01:00
Richard van der Hoff
d1d54d6088
add py36 to build matrix
2018-04-30 00:58:31 +01:00
Richard van der Hoff
ac5f2f4d86
Merge pull request #3145 from NotAFile/py3-tests
...
Add py3 tests to tox with folders that work
2018-04-30 00:53:05 +01:00
Richard van der Hoff
af3cc50511
Remove redundant call to preserve_fn
...
submit_event_for_as doesn't return a deferred anyway, so this is pointless.
2018-04-30 00:48:36 +01:00
Richard van der Hoff
dbf6f28d64
Merge pull request #3155 from NotAFile/py3-bytes-1
...
more bytes strings
2018-04-30 00:38:21 +01:00
Richard van der Hoff
7767a9fc0e
Update tox.ini
...
add missing comma
2018-04-30 00:37:32 +01:00
Richard van der Hoff
aab2e4da60
Merge pull request #3140 from matrix-org/rav/use_run_in_background
...
Use run_in_background in preference to preserve_fn
2018-04-30 00:34:28 +01:00
Richard van der Hoff
1315d374cc
Merge pull request #3156 from NotAFile/py3-hmac-bytes
...
Construct HMAC as bytes on py3
2018-04-30 00:33:20 +01:00
Richard van der Hoff
9e2601f830
Merge pull request #3108 from NotAFile/py3-six-urlparse
...
Use six.moves.urlparse
2018-04-30 00:33:05 +01:00
Adrian Tschira
122593265b
Construct HMAC as bytes on py3
...
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-29 00:19:41 +02:00
Adrian Tschira
e9143b6593
more bytes strings
...
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-29 00:13:57 +02:00
Matthew Hodgson
adaf3ec87f
fix missing import
2018-04-28 22:39:15 +01:00
Matthew Hodgson
006e18b6bb
pep8
2018-04-28 22:32:24 +01:00
Matthew Hodgson
42c89c8215
make it work with sqlite
2018-04-28 22:27:30 +01:00
Adrian Tschira
d82b6ea9e6
Move more xrange to six
...
plus a bonus next()
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-28 13:57:00 +02:00
Adrian Tschira
4f2f5171b7
replace stringIO imports
2018-04-28 13:46:23 +02:00
Adrian Tschira
94f4d7f49e
move httplib import to six
2018-04-28 13:43:34 +02:00
Adrian Tschira
57b58e2174
make imports local
...
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-28 13:41:41 +02:00
Adrian Tschira
cdb4647a80
Don't yield in list comprehensions
...
I've tried to grep for more of this with no success.
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-28 13:36:30 +02:00
Adrian Tschira
a376d8f761
open log_config in text mode too
...
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-28 13:34:13 +02:00
Adrian Tschira
4f5694e2ce
Add py3 tests to tox with folders that work
...
It's just a few tests, but it will at least prevent a few files from
regressing. Also, it makes it easiert to check your code against py36
while writing it.
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-27 16:29:41 +02:00
Richard van der Hoff
9558236728
Merge pull request #3127 from matrix-org/rav/deferred_timeout
...
Use deferred.addTimeout instead of time_bound_deferred
2018-04-27 14:32:54 +01:00
Richard van der Hoff
453adf00b6
pep8; remove spurious import
2018-04-27 14:32:08 +01:00
Richard van der Hoff
fc149b4eeb
Merge remote-tracking branch 'origin/develop' into rav/use_run_in_background
2018-04-27 14:31:23 +01:00
Richard van der Hoff
6146332387
Merge remote-tracking branch 'origin/develop' into rav/deferred_timeout
2018-04-27 14:18:00 +01:00
Erik Johnston
d2737c1fae
Merge branch 'master' of github.com:matrix-org/synapse into develop
2018-04-27 13:28:51 +01:00
Richard van der Hoff
2a13af23bc
Use run_in_background in preference to preserve_fn
...
While I was going through uses of preserve_fn for other PRs, I converted places
which only use the wrapped function once to use run_in_background, to avoid
creating the function object.
2018-04-27 12:55:51 +01:00
Richard van der Hoff
3d1ae61399
Merge branch 'develop' into rav/deferred_timeout
2018-04-27 12:54:43 +01:00
Richard van der Hoff
9d2c1b8429
Backport deferred.addTimeout
...
Twisted 16.0 doesn't have addTimeout, so let's backport it.
2018-04-27 12:52:30 +01:00
Richard van der Hoff
13843f771e
Trap exceptions thrown within run_in_background
...
Turn any exceptions that get thrown synchronously within run_in_background into
Failures instead.
2018-04-27 12:17:13 +01:00
Richard van der Hoff
41d4b07a53
Merge pull request #3142 from matrix-org/rav/reraise
...
reraise exceptions more carefully
2018-04-27 12:16:19 +01:00
Neil Johnson
05ba7e3a44
Update CHANGES.rst
2018-04-27 12:13:12 +01:00
Neil Johnson
53849ea9d3
Update CHANGES.rst
2018-04-27 12:11:39 +01:00
Richard van der Hoff
268e40341b
Merge pull request #3136 from matrix-org/rav/fix_dependencies
...
Miscellaneous fixes to python_dependencies
2018-04-27 11:48:28 +01:00
Richard van der Hoff
9c3da24561
Merge pull request #3138 from matrix-org/rav/catch_unhandled_exceptions
...
Improve exception handling for background processes
2018-04-27 11:47:49 +01:00
Richard van der Hoff
53494c34df
Merge pull request #3139 from matrix-org/rav/consume_errors
...
Add missing consumeErrors to improve exception handling
2018-04-27 11:47:21 +01:00
Richard van der Hoff
6493b22b42
reraise exceptions more carefully
...
We need to be careful (under python 2, at least) that when we reraise an
exception after doing some error handling, we actually reraise the original
exception rather than anything that might have been raised (and handled) during
the error handling.
2018-04-27 11:40:06 +01:00
Erik Johnston
6e10eed28e
Refactor event storage to not require state
...
This is in preparation for using contexts that may or may not have the
current_state_ids set. This will allow us to avoid unnecessarily pulling
out state for an event on the master process when using workers.
We also add a check to see if the state groups of the old extremities
are the same as the new ones.
2018-04-27 11:38:02 +01:00
Richard van der Hoff
605defb9e4
Add missing consumeErrors
...
In general we want defer.gatherResults to consumeErrors, rather than having
exceptions hanging around and getting logged as CRITICAL unhandled errors.
2018-04-27 11:16:28 +01:00
Richard van der Hoff
9255a6cb17
Improve exception handling for background processes
...
There were a bunch of places where we fire off a process to happen in the
background, but don't have any exception handling on it - instead relying on
the unhandled error being logged when the relevent deferred gets
garbage-collected.
This is unsatisfactory for a number of reasons:
- logging on garbage collection is best-effort and may happen some time after
the error, if at all
- it can be hard to figure out where the error actually happened.
- it is logged as a scary CRITICAL error which (a) I always forget to grep for
and (b) it's not really CRITICAL if a background process we don't care about
fails.
So this is an attempt to add exception handling to everything we fire off into
the background.
2018-04-27 11:07:40 +01:00
Neil Johnson
d842ed14f4
Merge tag 'v0.28.0'
...
Changes in synapse v0.28.0-rc1 (2018-04-26)
===========================================
Bug Fixes:
* Fix quarantine media admin API and search reindex (PR #3130 )
* Fix media admin APIs (PR #3134 )
Changes in synapse v0.28.0-rc1 (2018-04-24)
===========================================
Minor performance improvement to federation sending and bug fixes.
(Note: This release does not include state resolutions discussed in matrix live)
Features:
* Add metrics for event processing lag (PR #3090 )
* Add metrics for ResponseCache (PR #3092 )
Changes:
* Synapse on PyPy (PR #2760 ) Thanks to @Valodim!
* move handling of auto_join_rooms to RegisterHandler (PR #2996 ) Thanks to @krombel!
* Improve handling of SRV records for federation connections (PR #3016 ) Thanks to @silkeh!
* Document the behaviour of ResponseCache (PR #3059 )
* Preparation for py3 (PR #3061 , #3073 , #3074 , #3075 , #3103 , #3104 , #3106 , #3107 , #3109 , #3110 ) Thanks to @NotAFile!
* update prometheus dashboard to use new metric names (PR #3069 ) Thanks to @krombel!
* use python3-compatible prints (PR #3074 ) Thanks to @NotAFile!
* Send federation events concurrently (PR #3078 )
* Limit concurrent event sends for a room (PR #3079 )
* Improve R30 stat definition (PR #3086 )
* Send events to ASes concurrently (PR #3088 )
* Refactor ResponseCache usage (PR #3093 )
* Clarify that SRV may not point to a CNAME (PR #3100 ) Thanks to @silkeh!
* Use str(e) instead of e.message (PR #3103 ) Thanks to @NotAFile!
* Use six.itervalues in some places (PR #3106 ) Thanks to @NotAFile!
* Refactor store.have_events (PR #3117 )
Bug Fixes:
* Return 401 for invalid access_token on logout (PR #2938 ) Thanks to @dklug!
* Return a 404 rather than a 500 on rejoining empty rooms (PR #3080 )
* fix federation_domain_whitelist (PR #3099 )
* Avoid creating events with huge numbers of prev_events (PR #3113 )
* Reject events which have lots of prev_events (PR #3118 )
2018-04-27 10:40:27 +01:00
Richard van der Hoff
31c8be956f
also upgrade pip when installing
2018-04-27 01:56:58 +01:00
Neil Johnson
28dd536e80
update changelog and bump version to 0.28.0
2018-04-26 15:51:39 +01:00
Neil Johnson
8721580303
Merge branch 'develop' of https://github.com/matrix-org/synapse into release-v0.28.0-rc1
2018-04-26 15:44:54 +01:00
Richard van der Hoff
dbf76fd4b9
jenkins build: make sure we have a recent setuptools
2018-04-26 13:11:03 +01:00
Richard van der Hoff
d78ada3166
Miscellaneous fixes to python_dependencies
...
* add some doc about wtf this thing does
* pin Twisted to < 18.4
* add explicit dep on six (fixes #3089 )
2018-04-26 13:11:03 +01:00
Erik Johnston
0ced8b5b47
Merge pull request #3134 from matrix-org/erikj/fix_admin_media_api
...
Fix media admin APIs
2018-04-26 12:02:40 +01:00
Erik Johnston
7ec8e798b4
Fix media admin APIs
2018-04-26 11:31:22 +01:00
Neil Johnson
fb6015d0a6
pep8
2018-04-25 17:56:11 +01:00
Erik Johnston
a5ad88913c
Merge pull request #3130 from matrix-org/erikj/fix_quarantine_room
...
Fix quarantine media admin API
2018-04-25 17:54:12 +01:00
Neil Johnson
617bf40924
Generate user daily stats
2018-04-25 17:37:29 +01:00
Erik Johnston
22881b3d69
Also fix reindexing of search
2018-04-25 15:32:04 +01:00
Erik Johnston
ba3166743c
Fix quarantine media admin API
2018-04-25 15:11:18 +01:00
Matthew Hodgson
e3a373f002
remove duplicates from groups tables
...
and rename inconsistently named indexes.
Based on https://github.com/matrix-org/synapse/pull/3128 - thanks @vurpo\!
2018-04-25 14:58:43 +01:00
Neil Johnson
48c01ae851
ignore atom editor python ide files
2018-04-25 11:02:28 +01:00
Neil Johnson
6ab3b9c743
Update CHANGES.rst
...
Rephrase v0.28.0-rc1 summary
2018-04-24 16:39:20 +01:00
Neil Johnson
1bb83d5d41
Merge branch 'master' into develop
2018-04-24 15:52:43 +01:00
Neil Johnson
13a2beabca
Update CHANGES.rst
...
fix formatting on line break
2018-04-24 15:43:30 +01:00
Neil Johnson
2c3e995f38
Bump version and update changelog
2018-04-24 15:33:22 +01:00
Neil Johnson
8e8b06715f
Revert "Bump version and update changelog"
...
This reverts commit 08b29d4574 .
2018-04-24 13:58:45 +01:00
Neil Johnson
08b29d4574
Bump version and update changelog
2018-04-24 13:56:12 +01:00
Richard van der Hoff
77ebef9d43
Merge pull request #3118 from matrix-org/rav/reject_prev_events
...
Reject events which have lots of prev_events
2018-04-23 17:51:38 +01:00
Richard van der Hoff
9b9c38373c
Remove spurious param
2018-04-23 12:00:06 +01:00
Richard van der Hoff
286e20f2bc
Merge pull request #3109 from NotAFile/py3-tests-fix
...
Make tests py3 compatible
2018-04-23 11:59:03 +01:00
Richard van der Hoff
1ea904b9f0
Use deferred.addTimeout instead of time_bound_deferred
...
This doesn't feel like a wheel we need to reinvent.
2018-04-23 00:53:18 +01:00
Richard van der Hoff
dc875d2712
Merge pull request #3106 from NotAFile/py3-six-itervalues-1
...
Use six.itervalues in some places
2018-04-20 15:43:52 +01:00
Richard van der Hoff
8dc4a6144b
Merge pull request #3107 from NotAFile/py3-bool-nonzero
...
add __bool__ alias to __nonzero__ methods
2018-04-20 15:43:39 +01:00
Richard van der Hoff
d06a9ea5f7
Merge pull request #3104 from NotAFile/py3-unittest-config
...
Add some more variables to the unittest config
2018-04-20 15:35:58 +01:00
Richard van der Hoff
c09a6daf09
Merge pull request #3110 from NotAFile/py3-six-queue
...
Replace Queue with six.moves.queue
2018-04-20 15:35:00 +01:00
Richard van der Hoff
692a3cc806
Merge pull request #3103 from NotAFile/py3-baseexcepton-message
...
Use str(e) instead of e.message
2018-04-20 15:34:49 +01:00
Erik Johnston
366dd893fc
Merge pull request #3100 from silkeh/readme-srv-cname
...
Clarify that SRV may not point to a CNAME
2018-04-20 15:18:44 +01:00
Erik Johnston
bdb7714d13
Merge pull request #3125 from matrix-org/erikj/add_contrib_docs
...
Document contrib directory
2018-04-20 13:02:24 +01:00
Erik Johnston
67dabe143d
Document contrib directory
2018-04-20 11:47:38 +01:00
Richard van der Hoff
3de7d9fe99
accept stupid events over backfill
2018-04-20 11:41:03 +01:00
Richard van der Hoff
11a67b7c9d
Merge pull request #3093 from matrix-org/rav/response_cache_wrap
...
Refactor ResponseCache usage
2018-04-20 11:31:17 +01:00
Richard van der Hoff
0c280d4d99
Reinstate linearizer for federation_server.on_context_state_request
2018-04-20 11:10:04 +01:00
Richard van der Hoff
bc381d5798
Merge pull request #3117 from matrix-org/rav/refactor_have_events
...
Refactor store.have_events
2018-04-20 10:26:12 +01:00
Richard van der Hoff
b1dfbc3c40
Refactor store.have_events
...
It turns out that most of the time we were calling have_events, we were only
using half of the result. Replace have_events with have_seen_events and
get_rejection_reasons, so that we can see what's going on a bit more clearly.
2018-04-20 10:25:56 +01:00
Richard van der Hoff
dacf3a50ac
Merge pull request #3113 from matrix-org/rav/fix_huge_prev_events
...
Avoid creating events with huge numbers of prev_events
2018-04-18 11:27:56 +01:00
Richard van der Hoff
1f4b498b73
Add some comments
2018-04-18 00:15:36 +01:00
Richard van der Hoff
e585228860
Check events on backfill too
2018-04-18 00:06:42 +01:00
Richard van der Hoff
9b7794262f
Reject events which have too many auth_events or prev_events
...
... this should protect us from being dossed by people making silly events
(deliberately or otherwise)
2018-04-18 00:06:42 +01:00
Richard van der Hoff
639480e14a
Avoid creating events with huge numbers of prev_events
...
In most cases, we limit the number of prev_events for a given event to 10
events. This fixes a particular code path which created events with huge
numbers of prev_events.
2018-04-16 18:41:37 +01:00
Adrian Tschira
878995e660
Replace Queue with six.moves.queue
...
and a six.range change which I missed the last time
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-16 00:46:21 +02:00
Adrian Tschira
a1a3c9660f
Make tests py3 compatible
...
This is a mixed commit that fixes various small issues
* print parentheses
* 01 is invalid syntax (it was octal in py2)
* [x for i in 1, 2] is invalid syntax
* six moves
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-16 00:39:32 +02:00
Matthew Hodgson
512633ef44
fix spurious changelog dup
2018-04-15 22:45:06 +01:00
Adrian Tschira
2a3c33ff03
Use six.moves.urlparse
...
The imports were shuffled around a bunch in py3
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-15 21:22:43 +02:00
Adrian Tschira
f63ff73c7f
add __bool__ alias to __nonzero__ methods
...
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-15 20:40:47 +02:00
Adrian Tschira
36c59ce669
Use six.itervalues in some places
...
There's more where that came from
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-15 20:39:43 +02:00
Adrian Tschira
cb9cdfecd0
Add some more variables to the unittest config
...
These worked accidentally before (python2 doesn't complain if you
compare incompatible types) but under py3 this blows up spectacularly
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-15 20:36:39 +02:00
Adrian Tschira
1515560f5c
Use str(e) instead of e.message
...
Doing this I learned e.message was pretty shortlived, added in 2.6,
they realized it was a bad idea and deprecated it in 2.7
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-15 20:32:42 +02:00
Adrian Tschira
bfc2ade9b3
Make event properties raise AttributeError instead
...
They raised KeyError before. I'm changing this because the code uses
hasattr() to check for the presence of a key. This worked accidentally
before, because hasattr() silences all exceptions in python 2. However,
in python3, this isn't the case anymore.
I had a look around to see if anything depended on this raising a
KeyError and I couldn't find anything. Of course, I could have simply
missed it.
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-15 20:16:59 +02:00
Silke
c4bdbc2bd2
Clarify that SRV may not point to a CNAME
...
Signed-off-by: Silke Hofstra <silke@slxh.eu >
2018-04-14 14:55:25 +02:00
kaiyou
041b41a825
Merge remote-tracking branch 'upstream/master' into feat-dockerfile
2018-04-14 12:27:16 +02:00
Neil Johnson
154b44c249
Merge branch 'master' of https://github.com/matrix-org/synapse into develop
2018-04-13 17:07:54 +01:00
Matthew Hodgson
0d8c50df44
Merge pull request #3099 from matrix-org/matthew/fix-federation-domain-whitelist
...
fix federation_domain_whitelist
2018-04-13 15:51:13 +01:00
Matthew Hodgson
78a9698650
fix federation_domain_whitelist
...
we were checking the wrong server_name on inbound requests
2018-04-13 15:47:43 +01:00
Matthew Hodgson
25b0ba30b1
revert last to PR properly
2018-04-13 15:46:37 +01:00
Matthew Hodgson
f8d46cad3c
correctly auth inbound federation_domain_whitelist reqs
2018-04-13 15:41:52 +01:00
Neil Johnson
d4b2e05852
Merge branch 'master' of https://github.com/matrix-org/synapse into develop
2018-04-13 12:16:27 +01:00
Neil Johnson
eb53439c4a
Merge branch 'release-v0.27.0' of https://github.com/matrix-org/synapse
2018-04-13 12:14:57 +01:00
Neil Johnson
51d628d28d
Bump version and Change log
2018-04-13 12:08:19 +01:00
Neil Johnson
df77837a33
Merge pull request #3095 from matrix-org/rav/bump_canonical_json
...
Update canonicaljson dependency
2018-04-13 12:04:46 +01:00
Richard van der Hoff
d3347ad485
Revert "Use sortedcontainers instead of blist"
...
This reverts commit 9fbe70a7dc .
It turns out that sortedcontainers.SortedDict is not an exact match for
blist.sorteddict; in particular, `popitem()` removes things from the opposite
end of the dict.
This is trivial to fix, but I want to add some unit tests, and potentially some
more thought about it, before we do so.
2018-04-13 11:16:43 +01:00
Richard van der Hoff
fac3f9e678
Bump canonicaljson to 1.1.3
...
1.1.2 was a bit broken too :/
2018-04-13 10:21:38 +01:00
Richard van der Hoff
60f6014bb7
ResponseCache: fix handling of completed results
...
Turns out that ObservableDeferred.observe doesn't return a deferred if the
result is already completed. Fix handling and improve documentation.
2018-04-13 07:32:29 +01:00
Richard van der Hoff
119596ab8f
Update canonicaljson dependency
...
1.1.0 and 1.1.1 were broken, so we're updating this to help people make sure
they don't end up on a broken version.
Also, 1.1.0 is speedier...
2018-04-12 17:31:44 +01:00
Richard van der Hoff
b78395b7fe
Refactor ResponseCache usage
...
Adds a `.wrap` method to ResponseCache which wraps up the boilerplate of a
(get, set) pair, and then use it throughout the codebase.
This will be largely non-functional, but does include the following functional
changes:
* federation_server.on_context_state_request: drops use of _server_linearizer
which looked redundant and could cause incorrect cache misses by yielding
between the get and the set.
* RoomListHandler.get_remote_public_room_list(): fixes logcontext leaks
* the wrap function includes some logging. I'm hoping this won't be too noisy
on production.
2018-04-12 13:02:15 +01:00
Richard van der Hoff
d5c74b9f6c
Merge pull request #3092 from matrix-org/rav/response_cache_metrics
...
Add metrics for ResponseCache
2018-04-12 12:59:36 +01:00
Erik Johnston
0f13f30fca
Merge pull request #3090 from matrix-org/erikj/processed_event_lag
...
Add metrics for event processing lag
2018-04-12 12:18:57 +01:00
Erik Johnston
415aeefd89
Format docstring
2018-04-12 12:07:09 +01:00
Erik Johnston
19ceb4851f
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/processed_event_lag
2018-04-12 11:36:07 +01:00
Richard van der Hoff
261124396e
Merge pull request #3059 from matrix-org/rav/doc_response_cache
...
Document the behaviour of ResponseCache
2018-04-12 11:22:30 +01:00
Erik Johnston
23a7f9d7f4
Doc we raise on unknown event
2018-04-12 11:20:51 +01:00
Erik Johnston
d7bf3a68f0
s/list/tuple
2018-04-12 11:19:04 +01:00
Erik Johnston
f67e906e18
Set all metrics at the same time
2018-04-12 11:18:19 +01:00
Erik Johnston
971059a733
Merge pull request #3088 from matrix-org/erikj/as_parallel
...
Send events to ASes concurrently
2018-04-12 10:42:36 +01:00
Erik Johnston
e939f3bca6
Fix tests
2018-04-11 14:37:11 +01:00
Erik Johnston
4dae4a97ed
Track last processed event received_ts
2018-04-11 14:27:09 +01:00
Erik Johnston
92e34615c5
Track where event stream processing have gotten up to
2018-04-11 12:13:40 +01:00
Erik Johnston
ab825aa328
Add GaugeMetric
2018-04-11 12:13:40 +01:00
Richard van der Hoff
233699c42e
Merge pull request #2760 from Valodim/pypy
...
Synapse on PyPy
2018-04-11 11:20:01 +01:00
Neil Johnson
427e6c4059
Merge branch 'release-v0.27.0' of https://github.com/matrix-org/synapse
2018-04-11 10:59:00 +01:00
Neil Johnson
781cd8c54f
bump version/changelog
2018-04-11 10:54:43 +01:00
Neil Johnson
9ef0b179e0
Merge commit '11d2609da70af797405241cdf7d9df19db5628f2' of https://github.com/matrix-org/synapse into release-v0.27.0
2018-04-11 10:51:59 +01:00
Erik Johnston
121591568b
Send events to ASes concurrently
2018-04-11 09:56:00 +01:00
Richard van der Hoff
b3384232a0
Add metrics for ResponseCache
2018-04-10 23:14:47 +01:00
Matthew Hodgson
360d899a64
Merge pull request #3086 from matrix-org/r30_stats
...
fix typo
2018-04-10 17:46:37 +01:00
Neil Johnson
d54cfbb7a8
fix typo
2018-04-10 17:38:16 +01:00
Erik Johnston
eaa2ebf20b
Merge pull request #3079 from matrix-org/erikj/limit_concurrent_sends
...
Limit concurrent event sends for a room
2018-04-10 16:43:58 +01:00
Erik Johnston
9daf82278f
Merge pull request #3078 from matrix-org/erikj/federation_sender
...
Send federation events concurrently
2018-04-10 16:43:48 +01:00
Adrian Tschira
a3f9ddbede
Open certificate files as bytes
...
That's what pyOpenSSL expects on python3
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-10 17:36:29 +02:00
Adrian Tschira
7f8eebc8ee
Open config file in non-bytes mode
...
Nothing written into it is encoded, so it makes little sense, but it
does break in python3 the way it was before.
The variable names were adjusted to be less misleading.
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-10 17:32:40 +02:00
Neil Johnson
dd723267b2
Merge branch 'release-v0.27.0' of https://github.com/matrix-org/synapse into develop
2018-04-10 15:03:29 +01:00
Erik Johnston
a060dfa132
Use run_in_background instead
2018-04-10 14:25:11 +01:00
Erik Johnston
f8e8ec013b
Note why we're limiting concurrent event sends
2018-04-10 14:00:46 +01:00
Erik Johnston
1246d23710
Preserve log contexts correctly
2018-04-10 12:04:32 +01:00
Erik Johnston
d49cbf712f
Log event ID on exception
2018-04-10 12:03:41 +01:00
Erik Johnston
ce72d590ed
Merge pull request #3082 from matrix-org/erikj/urlencode_paths
...
URL quote path segments over federation
2018-04-10 11:31:16 +01:00
Erik Johnston
11d2609da7
Ensure slashes are escaped
2018-04-10 11:24:40 +01:00
Erik Johnston
dab87b84a3
URL quote path segments over federation
2018-04-10 11:16:08 +01:00
Vincent Breitmoser
6d7f0f8dd3
Don't disable GC when running on PyPy
...
PyPy's incminimark GC can't be triggered manually. From what I observed
there are no obvious issues with just letting it run normally. And
unlike CPython, it actually returns unused RAM to the system.
Signed-off-by: Vincent Breitmoser <look@my.amazin.horse >
2018-04-10 11:35:34 +02:00
Vincent Breitmoser
f4284d943a
In DomainSpecificString, override __repr__ in addition to __str__
...
For some reason, string interpolation on a DomainSpecificString object
like "%r" % (domainSpecificStringObj) fails under PyPy, because the
default __repr__ implementation wants to iterate over the object. I'm
not sure why that happens, but overriding __repr__ instead of __str__
fixes this problem, and is arguably the more appropriate thing to do
anyways.
2018-04-10 11:35:29 +02:00
Richard van der Hoff
d1e56cfcd1
Fix pep8 error on psycopg2cffi hack
2018-04-10 11:35:29 +02:00
Vincent Breitmoser
89de934981
Use psycopg2cffi module instead of psycopg2 if running on pypy
...
The psycopg2 package isn't available for PyPy. This commit adds a check
if the runtime is PyPy, and if it is uses psycopg2cffi module in favor
of psycopg2. This is almost a drop-in replacement, except for one place
where an additional cast to string is required.
2018-04-10 11:29:52 +02:00
Vincent Breitmoser
9fbe70a7dc
Use sortedcontainers instead of blist
...
This commit drop-in replaces blist with SortedContainers. They are
written in pure python so work with pypy, but perform as good as
native implementations, at least in a couple benchmarks:
http://www.grantjenks.com/docs/sortedcontainers/performance.html
2018-04-10 11:29:51 +02:00
Richard van der Hoff
a3599dda97
Merge pull request #2996 from krombel/allow_auto_join_rooms
...
move handling of auto_join_rooms to RegisterHandler
2018-04-10 01:11:00 +01:00
Richard van der Hoff
87478c5a60
Merge pull request #3061 from NotAFile/add-some-byte-strings
...
Add b prefixes to some strings that are bytes in py3
2018-04-09 23:54:05 +01:00
Richard van der Hoff
c508b2f2f0
Merge pull request #3073 from NotAFile/use-six-reraise
...
Replace old-style raise with six.reraise
2018-04-09 23:53:40 +01:00
Richard van der Hoff
37354b55c9
Merge pull request #2938 from dklug/develop
...
Return 401 for invalid access_token on logout
2018-04-09 23:52:56 +01:00
Richard van der Hoff
0e9aa1d091
Merge pull request #3074 from NotAFile/fix-py3-prints
...
use python3-compatible prints
2018-04-09 23:44:41 +01:00
Richard van der Hoff
8eaa141d8f
Merge pull request #3075 from NotAFile/six-type-checks
...
Replace some type checks with six type checks
2018-04-09 23:40:44 +01:00
Richard van der Hoff
664adb4236
Merge pull request #3016 from silkeh/improve-service-lookups
...
Improve handling of SRV records for federation connections
2018-04-09 23:40:06 +01:00
Richard van der Hoff
aea3a93611
Merge pull request #3069 from krombel/update_prometheus_config
...
update prometheus dashboard to use new metric names
2018-04-09 23:37:18 +01:00
Neil Johnson
41e0611895
remove errant print
2018-04-09 18:44:20 +01:00
Neil Johnson
61b439c904
Fix msec to sec, again
2018-04-09 18:43:48 +01:00
Neil Johnson
87770300d5
Fix msec to sec
2018-04-09 18:38:59 +01:00
Neil Johnson
9a311adfea
v0.27.3-rc2
2018-04-09 17:52:08 +01:00
Neil Johnson
64bc2162ef
Fix psycopg2 interpolation
2018-04-09 17:50:36 +01:00
Richard van der Hoff
d2c6f4d626
Merge pull request #3080 from matrix-org/rav/fix_500_on_rejoin
...
Return a 404 rather than a 500 on rejoining empty rooms
2018-04-09 17:32:36 +01:00
Neil Johnson
5232d3bfb1
version bump v0.27.3-rc2
2018-04-09 17:25:57 +01:00
Neil Johnson
5e785d4d5b
Merge branch 'develop' of https://github.com/matrix-org/synapse into release-v0.27.0
2018-04-09 17:21:34 +01:00
Erik Johnston
6e025a97b4
Handle all events in a room correctly
2018-04-09 16:02:48 +01:00
Neil Johnson
414b2b3bd1
Merge branch 'release-v0.27.0' of https://github.com/matrix-org/synapse into release-v0.27.0
2018-04-09 16:02:08 +01:00
Neil Johnson
b151eb14a2
Update CHANGES.rst
2018-04-09 16:01:59 +01:00
Neil Johnson
64cebbc730
Merge branch 'release-v0.27.0' of https://github.com/matrix-org/synapse into release-v0.27.0
2018-04-09 16:00:51 +01:00
Neil Johnson
d9ae2bc826
bump version to release candidate
2018-04-09 16:00:31 +01:00
Neil Johnson
21d5a2a08e
Update CHANGES.rst
2018-04-09 15:55:41 +01:00
Neil Johnson
c115deed12
Update CHANGES.rst
2018-04-09 15:54:32 +01:00
Neil Johnson
072fb59446
bump version
2018-04-09 13:49:25 +01:00
Neil Johnson
89dda61315
Merge branch 'develop' into release-v0.27.0
2018-04-09 13:48:15 +01:00
Neil Johnson
687f3451bd
0.27.3
2018-04-09 13:44:05 +01:00
Richard van der Hoff
13decdbf96
Revert "Merge pull request #3066 from matrix-org/rav/remove_redundant_metrics"
...
We aren't ready to release this yet, so I'm reverting it for now.
This reverts commit d1679a4ed7 , reversing
changes made to e089100c62 .
2018-04-09 12:59:12 +01:00
Richard van der Hoff
f3ef60662f
Return a 404 rather than a 500 on rejoining empty rooms
...
Filter ourselves out of the server list before checking for an empty remote
host list, to fix 500 error
Fixes #2141
2018-04-09 12:56:22 +01:00
Erik Johnston
e5082494eb
Limit concurrent event sends for a room
2018-04-09 12:07:39 +01:00
Erik Johnston
56b0589865
Use create_and_send_nonmember_event everywhere
2018-04-09 12:04:18 +01:00
Erik Johnston
11974f3787
Send federation events concurrently
2018-04-09 11:47:10 +01:00
Erik Johnston
145d14656b
Handle exceptions in get_hosts_for_room when sending events over federation
2018-04-09 11:47:01 +01:00
kaiyou
a13b7860c6
Merge remote-tracking branch 'upstream/master' into feat-dockerfile
2018-04-08 17:56:44 +02:00
Adrian Tschira
e54c202b81
Replace some type checks with six type checks
...
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-07 01:02:32 +02:00
Adrian Tschira
b0500d3774
use python3-compatible prints
2018-04-06 23:35:27 +02:00
Adrian Tschira
4f40d058cc
Replace old-style raise with six.reraise
...
The old style raise is invalid syntax in python3. As noted in the docs,
this adds one more frame in the traceback, but I think this is
acceptable:
<ipython-input-7-bcc5cba3de3f> in <module>()
16 except:
17 pass
---> 18 six.reraise(*x)
/usr/lib/python3.6/site-packages/six.py in reraise(tp, value, tb)
691 if value.__traceback__ is not tb:
692 raise value.with_traceback(tb)
--> 693 raise value
694 finally:
695 value = None
<ipython-input-7-bcc5cba3de3f> in <module>()
9
10 try:
---> 11 x()
12 except:
13 x = sys.exc_info()
Also note that this uses six, which is not formally a dependency yet,
but is included indirectly since most packages depend on it.
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-06 23:06:24 +02:00
Luke Barnard
135fc5b9cd
Merge pull request #3046 from matrix-org/dbkr/join_group
...
Implement group join API
2018-04-06 16:24:32 +01:00
Luke Barnard
020a501354
de-lint, quote consistency
2018-04-06 16:02:06 +01:00
Luke Barnard
db2fd801f7
Explicitly grab individual columns from group object
2018-04-06 15:57:25 +01:00
Erik Johnston
e8b03cab1b
Merge pull request #3071 from matrix-org/erikj/resp_size_metrics
...
Add response size metrics
2018-04-06 15:49:12 +01:00
Richard van der Hoff
8844f95c32
Merge pull request #3072 from matrix-org/rav/fix_port_script
...
postgres port script: fix state_groups_pkey error
2018-04-06 15:47:40 +01:00
Luke Barnard
7945435587
When exposing group state, return is_openly_joinable
...
as opposed to join_policy, which is really only pertinent to the
synapse implementation of the group server.
By doing this we keep the group server concept extensible by
allowing arbitrarily complex rules for deciding whether a group
is openly joinable.
2018-04-06 15:43:27 +01:00
Luke Barnard
6bd1b7053e
By default, join policy is "invite"
2018-04-06 15:43:27 +01:00
Luke Barnard
b4478e586f
add_user -> _add_user
2018-04-06 15:43:27 +01:00
Luke Barnard
112c2253e2
pep8
2018-04-06 15:43:27 +01:00
Luke Barnard
6850f8aea3
Get group_info from existing call to check_group_is_ours
2018-04-06 15:43:27 +01:00
Luke Barnard
cd087a265d
Don't use redundant inlineCallbacks
2018-04-06 15:43:27 +01:00
Luke Barnard
87c864b698
join_rule -> join_policy
2018-04-06 15:43:27 +01:00
Luke Barnard
ae85c7804e
is_joinable -> join_rule
2018-04-06 15:43:27 +01:00
Luke Barnard
f8d1917fce
Fix federation client set_group_joinable typo
2018-04-06 15:43:27 +01:00
Luke Barnard
6eb3aa94b6
Factor out add_user from accept_invite and join_group
2018-04-06 15:43:27 +01:00
David Baker
edb45aae38
pep8
2018-04-06 15:43:27 +01:00
David Baker
b370fe61c0
Implement group join API
2018-04-06 15:43:27 +01:00
Richard van der Hoff
6a9777ba02
Port script: Set up state_group_id_seq
...
Fixes https://github.com/matrix-org/synapse/issues/3050 .
2018-04-06 15:33:30 +01:00
Richard van der Hoff
01579384cc
Port script: clean up a bit
...
Improve logging and comments. Group all the stuff to do with inspecting tables
together rather than creating the port tables in the middle.
2018-04-06 15:33:30 +01:00
Richard van der Hoff
e01ba5bda3
Port script: avoid nasty errors when setting up
...
We really shouldn't spit out "Failed to create port table", it looks scary.
2018-04-06 15:33:30 +01:00
Erik Johnston
7b824f1475
Add response size metrics
2018-04-06 13:20:11 +01:00
Erik Johnston
35ff941172
Merge pull request #3070 from krombel/group_join_put_instead_post
...
use PUT instead of POST for federating groups/m.join_policy
2018-04-06 12:11:16 +01:00
Krombel
1d71f484d4
use PUT instead of POST for federating groups/m.join_policy
2018-04-06 12:54:09 +02:00
Richard van der Hoff
15e8ed874f
more verbosity in synctl
2018-04-06 09:28:36 +01:00
Krombel
c7ede92d0b
make prometheus config compliant to v0.28
2018-04-05 23:34:01 +02:00
Richard van der Hoff
551422051b
Merge pull request #2886 from turt2live/travis/new-worker-docs
...
Add a blurb explaining the main synapse worker
2018-04-05 17:33:09 +01:00
Richard van der Hoff
c7f0969731
Merge pull request #2986 from jplatte/join_reponse_room_id
...
Add room_id to the response of `rooms/{roomId}/join`
2018-04-05 17:29:06 +01:00
Richard van der Hoff
3449da3bc7
Merge pull request #3068 from matrix-org/rav/fix_cache_invalidation
...
Improve database cache performance
2018-04-05 17:21:44 +01:00
Richard van der Hoff
d1679a4ed7
Merge pull request #3066 from matrix-org/rav/remove_redundant_metrics
...
Remove redundant metrics which were deprecated in 0.27.0.
2018-04-05 17:21:18 +01:00
Richard van der Hoff
01afc563c3
Fix overzealous cache invalidation
...
Fixes an issue where a cache invalidation would invalidate *all* pending
entries, rather than just the entry that we intended to invalidate.
2018-04-05 16:24:04 +01:00
Luke Barnard
e089100c62
Merge pull request #3045 from matrix-org/dbkr/group_joinable
...
Add joinability for groups
2018-04-05 15:57:49 +01:00
Neil Johnson
68b0ee4e8d
Merge pull request #3041 from matrix-org/r30_stats
...
R30 stats
2018-04-05 15:37:37 +01:00
Richard van der Hoff
22284a6f65
Merge pull request #3060 from matrix-org/rav/kill_event_content
...
Remove uses of events.content
2018-04-05 15:02:17 +01:00
Luke Barnard
917380e89d
NON NULL -> NOT NULL
2018-04-05 14:32:12 +01:00
Luke Barnard
104c0bc1d5
Use "/settings/" (plural)
2018-04-05 14:07:16 +01:00
Luke Barnard
700e5e7198
Use DEFAULT join_policy of "invite" in db
2018-04-05 14:01:17 +01:00
Luke Barnard
b214a04ffc
Document set_group_join_policy
2018-04-05 13:29:16 +01:00
Neil Johnson
0e5f479fc0
Review comments
...
Use iteritems over item to loop over dict
formatting
2018-04-05 12:16:46 +01:00
Richard van der Hoff
518f6de088
Remove redundant metrics which were deprecated in 0.27.0.
2018-04-04 19:46:28 +01:00
Jan Christian Grünhage
7d0f712348
Merge pull request #3063 from matrix-org/jcgruenhage/cache_settings_stats
...
phone home cache size configurations
2018-04-04 17:24:40 +01:00
Jan Christian Grünhage
e4570c53dd
phone home cache size configurations
2018-04-04 16:46:58 +01:00
Travis Ralston
88964b987e
Merge remote-tracking branch 'matrix-org/develop' into travis/new-worker-docs
2018-04-04 08:46:56 -06:00
Travis Ralston
204fc98520
Document the additional routes for the event_creator worker
...
Fixes https://github.com/matrix-org/synapse/issues/3018
Signed-off-by: Travis Ralston <travpc@gmail.com >
2018-04-04 08:46:17 -06:00
Travis Ralston
301b339494
Move the mention of the main synapse worker higher up
...
Signed-off-by: Travis Ralston <travpc@gmail.com >
2018-04-04 08:45:51 -06:00
Adrian Tschira
6168351877
Add b prefixes to some strings that are bytes in py3
...
This has no effect on python2
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-04-04 13:48:51 +02:00
Richard van der Hoff
9cd3f06ab7
Merge pull request #3062 from matrix-org/revert-3053-speedup-mxid-check
...
Revert "improve mxid check performance"
2018-04-04 12:09:17 +01:00
Richard van der Hoff
f92963f5db
Revert "improve mxid check performance"
2018-04-04 12:08:29 +01:00
Silke
72251d1b97
Remove address resolution of hosts in SRV records
...
Signed-off-by: Silke Hofstra <silke@slxh.eu >
2018-04-04 12:26:50 +02:00
Richard van der Hoff
725a72ec5a
Merge pull request #3000 from NotAFile/change-except-style
...
Replace old style error catching with 'as' keyword
2018-04-04 10:45:22 +01:00
Richard van der Hoff
a89f9f830c
Merge pull request #3044 from matrix-org/michaelk/performance_stats
...
Add basic performance statistics to phone home
2018-04-04 10:37:25 +01:00
Richard van der Hoff
39ce38b024
Merge pull request #3053 from NotAFile/speedup-mxid-check
...
improve mxid check performance
2018-04-04 10:19:52 +01:00
Richard van der Hoff
a9a74101a4
Document the behaviour of ResponseCache
...
it looks like everything that uses ResponseCache expects to have to
`make_deferred_yieldable` its results. It's debatable whether that is the best
approach, but let's document it for now to avoid further confusion.
2018-04-04 09:06:22 +01:00
Luke Barnard
eb8d8d6f57
Use join_policy API instead of joinable
...
The API is now under
/groups/$group_id/setting/m.join_policy
and expects a JSON blob of the shape
```json
{
"m.join_policy": {
"type": "invite"
}
}
```
where "invite" could alternatively be "open".
2018-04-03 16:16:40 +01:00
Richard van der Hoff
8da39ad98f
Merge pull request #3049 from matrix-org/rav/use_staticjson
...
Use static JSONEncoders
2018-04-03 15:18:32 +01:00
Richard van der Hoff
3ee4ad09eb
Fix json encoding bug in replication
...
json encoders have an encode method, not a dumps method.
2018-04-03 15:09:48 +01:00
Richard van der Hoff
0ca5c4d2af
Merge pull request #3048 from matrix-org/rav/use_simplejson
...
Use simplejson throughout
2018-04-03 14:39:57 +01:00
Adrian Tschira
11597ddea5
improve mxid check performance ~4x
...
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-03-31 02:00:22 +02:00
Richard van der Hoff
2fe3f848b9
Remove uses of events.content
2018-03-29 23:17:12 +01:00
Richard van der Hoff
05630758f2
Use static JSONEncoders
...
using json.dumps with custom options requires us to create a new JSONEncoder on
each call. It's more efficient to create one upfront and reuse it.
2018-03-29 23:13:33 +01:00
Richard van der Hoff
fcfe7f6ad3
Use simplejson throughout
...
Let's use simplejson rather than json, for consistency.
2018-03-29 22:45:52 +01:00
Neil Johnson
b4e37c6f50
pep8
2018-03-29 17:27:39 +01:00
Neil Johnson
9ee44a372d
Remove need for sqlite specific query
2018-03-29 16:45:34 +01:00
Erik Johnston
88cc9cc69e
Merge pull request #3043 from matrix-org/erikj/measure_state_group_creation
...
Measure time it takes to calculate state group ID
2018-03-28 17:40:14 +01:00
Neil Johnson
dc7c020b33
fix pep8 errors
2018-03-28 17:25:15 +01:00
Neil Johnson
16aeb41547
Update README.rst
...
update docker hub url
2018-03-28 16:47:56 +01:00
David Baker
c5de6987c2
This should probably be a PUT
2018-03-28 16:44:11 +01:00
Neil Johnson
241e4e8687
remove twisted deferral cruft
2018-03-28 16:25:53 +01:00
David Baker
929b34963d
OK, smallint it is then
2018-03-28 14:53:55 +01:00
Richard van der Hoff
9a0db062af
Merge pull request #3034 from matrix-org/rav/fix_key_claim_errors
...
Fix error when claiming e2e keys from offline servers
2018-03-28 14:50:38 +01:00
David Baker
a838444a70
Grr. Copy the definition from is_admin
2018-03-28 14:50:30 +01:00
Neil Johnson
4262aba17b
bump schema version
2018-03-28 14:40:03 +01:00
Neil Johnson
86932be2cb
Support multi client R30 for psql
2018-03-28 14:36:53 +01:00
David Baker
32260baa41
pep8
2018-03-28 14:29:42 +01:00
Michael Kaye
33f6195d9a
Handle review comments
2018-03-28 14:25:25 +01:00
David Baker
a164270833
Make column definition that works on both dbs
2018-03-28 14:23:00 +01:00
David Baker
352e1ff9ed
Add schema delta file
2018-03-28 14:07:57 +01:00
David Baker
79452edeee
Add joinability for groups
...
Adds API to set the 'joinable' flag, and corresponding flag in the
table.
2018-03-28 14:03:37 +01:00
Krombel
6152e253d8
Merge branch 'develop' of into allow_auto_join_rooms
2018-03-28 14:45:28 +02:00
Erik Johnston
e9e4cb25fc
Merge pull request #3042 from matrix-org/fix_locally_failing_tests
...
fix tests/storage/test_user_directory.py
2018-03-28 13:10:37 +01:00
Neil Johnson
792d340572
rename stat to future proof
2018-03-28 12:25:02 +01:00
Michael Kaye
4ceaa7433a
As daemonizing will make a new process, defer call to init.
2018-03-28 12:19:01 +01:00
Neil Johnson
788e69098c
Add user_ips last seen index
2018-03-28 12:03:13 +01:00
Neil Johnson
0f890f477e
No need to cast in count_daily_users
2018-03-28 11:49:57 +01:00
Neil Johnson
545001b9e4
Fix search_user_dir multiple sqlite versions do different things
2018-03-28 11:19:45 +01:00
Erik Johnston
01ccc9e6f2
Measure time it takes to calculate state group ID
2018-03-28 11:03:52 +01:00
Neil Johnson
a9cb1a35c8
fix tests/storage/test_user_directory.py
2018-03-28 10:57:27 +01:00
Neil Johnson
a32d2548d9
query and call for r30 stats
2018-03-28 10:39:13 +01:00
Neil Johnson
9187e0762f
count_daily_users failed if db was sqlite due to type failure - presumably this prevcented all sqlite homeservers reporting home
2018-03-28 10:02:32 +01:00
Erik Johnston
f879127aaa
Merge pull request #3029 from matrix-org/erikj/linearize_generate_user_id
...
Linearize calls to _generate_user_id
2018-03-28 10:00:31 +01:00
Erik Johnston
e6d87c93f3
Merge pull request #3030 from matrix-org/erikj/no_ujson
...
Remove last usage of ujson
2018-03-28 10:00:06 +01:00
Erik Johnston
004cc8a328
Merge pull request #3033 from matrix-org/erikj/calculate_state_metrics
...
Add counter metrics for calculating state delta
2018-03-28 09:59:42 +01:00
Michael Kaye
ef520d8d0e
Include coarse CPU and Memory use in stats callbacks.
...
This requires the psutil module, and is still opt-in based on the report_stats
config option.
2018-03-27 17:56:03 +01:00
Richard van der Hoff
a134c572a6
Stringify exceptions for keys/{query,claim}
...
Make sure we stringify any exceptions we return from keys/query and keys/claim,
to avoid a 'not JSON serializable' error later
Fixes #3010
2018-03-27 17:15:06 +01:00
Richard van der Hoff
c2a5cf2fe3
factor out exception handling for keys/claim and keys/query
...
this stuff is badly c&p'ed
2018-03-27 17:11:23 +01:00
Erik Johnston
800cfd5774
Comment
2018-03-27 13:30:39 +01:00
Erik Johnston
152c2ac19e
Fix indent
2018-03-27 13:13:46 +01:00
Erik Johnston
e70287cff3
Comment
2018-03-27 13:13:38 +01:00
Erik Johnston
03a26e28d9
Merge pull request #3017 from matrix-org/erikj/add_cache_control_headers
...
Add Cache-Control headers to all JSON APIs
2018-03-27 13:10:38 +01:00
Erik Johnston
3e0c0660b3
Also do check inside linearizer
2018-03-27 13:01:34 +01:00
Erik Johnston
3f49e131d9
Add counter metrics for calculating state delta
...
This will allow us to measure how often we calculate state deltas in
event persistence that we would have been able to calculate at the same
time we calculated the state for the event.
2018-03-27 10:57:35 +01:00
Erik Johnston
9b8c0fb162
Merge branch 'master' of github.com:matrix-org/synapse into develop
2018-03-26 21:41:55 +01:00
Erik Johnston
691f8492fb
Merge branch 'release-v0.27.0' of github.com:matrix-org/synapse
2018-03-26 16:38:23 +01:00
Erik Johnston
a9d7d98d3f
Bum version and changelog
2018-03-26 16:36:53 +01:00
Erik Johnston
bdbb1eec65
Merge branch 'erikj/simplejson_replication' of github.com:matrix-org/synapse into release-v0.27.0
2018-03-26 16:35:55 +01:00
Erik Johnston
01f72e2fc7
Fix date
2018-03-26 16:21:26 +01:00
Erik Johnston
9187862002
Bump version and changelog
2018-03-26 16:20:24 +01:00
Neil Johnson
aa3587fdd1
Merge branch 'release-v0.27.0' of https://github.com/matrix-org/synapse
2018-03-26 14:51:11 +01:00
Neil Johnson
51406dab96
version bump
2018-03-26 14:48:19 +01:00
Erik Johnston
fecb45e0c3
Remove last usage of ujson
2018-03-26 13:32:29 +01:00
Erik Johnston
44cd6e1358
PEP8
2018-03-26 12:06:48 +01:00
Erik Johnston
8d6dc106d1
Don't use _cursor_to_dict in find_next_generated_user_id_localpart
2018-03-26 12:02:44 +01:00
Erik Johnston
a052aa42e7
Linearize calls to _generate_user_id
2018-03-26 12:02:20 +01:00
Matthew Hodgson
8efe773ef1
fix typo
2018-03-23 21:38:42 +00:00
Matthew Hodgson
b7e7b52452
Merge pull request #3022 from matrix-org/matthew/noresource
...
404 correctly on missing paths via NoResource
2018-03-23 11:10:32 +00:00
Matthew Hodgson
8cbbfaefc1
404 correctly on missing paths via NoResource
...
fixes https://github.com/matrix-org/synapse/issues/2043 and https://github.com/matrix-org/synapse/issues/2029
2018-03-23 10:32:50 +00:00
Erik Johnston
84b5cc69f5
Merge pull request #3006 from matrix-org/erikj/state_iter
...
Use .iter* to avoid copies in StateHandler
2018-03-22 11:51:13 +00:00
Erik Johnston
fde8e8f09f
Fix s/iteriterms/itervalues
2018-03-22 11:42:16 +00:00
Erik Johnston
eb9fc021e3
Merge branch 'release-v0.27.0' of github.com:matrix-org/synapse into develop
2018-03-22 10:19:53 +00:00
Erik Johnston
1c41b05c8c
Add Cache-Control headers to all JSON APIs
...
It is especially important that sync requests don't get cached, as if a
sync returns the same token given then the client will call sync with
the same parameters again. If the previous response was cached it will
get reused, resulting in the client tight looping making the same
request and never making any progress.
In general, clients will expect to get up to date data when requesting
APIs, and so its safer to do a blanket no cache policy than only
whitelisting APIs that we know will break things if they get cached.
2018-03-21 17:46:26 +00:00
Erik Johnston
5bdb57cb66
Merge pull request #3015 from matrix-org/erikj/simplejson_replication
...
Fix replication after switch to simplejson
2018-03-20 15:06:33 +00:00
Neil Johnson
f5aa027c2f
Update CHANGES.rst
...
rearrange ordering of releases to match chronology
2018-03-20 15:06:22 +00:00
Neil Johnson
e66fbcbb02
fix merge conflicts
2018-03-20 14:25:31 +00:00
Erik Johnston
9aa5a0af51
Explicitly use simplejson
2018-03-20 09:58:13 +00:00
Erik Johnston
610accbb7f
Fix replication after switch to simplejson
...
Turns out that simplejson serialises namedtuple's as dictionaries rather
than tuples by default.
2018-03-19 16:12:48 +00:00
Neil Johnson
c384705ee8
Update __init__.py
...
bump version
2018-03-19 15:11:58 +00:00
Neil Johnson
1a3aa957ca
Update CHANGES.rst
2018-03-19 15:11:00 +00:00
Erik Johnston
3f961e638a
Merge pull request #3005 from matrix-org/erikj/fix_cache_size
...
Fix bug where state cache used lots of memory
2018-03-19 11:44:26 +00:00
Erik Johnston
fa72803490
Merge branch 'master' of github.com:matrix-org/synapse into develop
2018-03-19 11:41:01 +00:00
Erik Johnston
9a0d783c11
Add comments
2018-03-19 11:35:53 +00:00
Matthew Hodgson
38f952b9bc
spell out not to massively increase bcrypt rounds
2018-03-19 09:27:36 +00:00
Matthew Hodgson
b2f2282947
make lazy_load_members configurable in filters
2018-03-19 01:15:13 +00:00
Matthew Hodgson
478af0f720
reshuffle todo & comments
2018-03-19 01:00:12 +00:00
Matthew Hodgson
366f730bf6
only get member state IDs for incremental syncs if we're filtering
2018-03-18 21:40:43 +00:00
kaiyou
757f1b5843
Merge remote-tracking branch 'upstream/master' into feat-dockerfile
2018-03-17 16:02:08 +01:00
Matthew Hodgson
0b56290f0b
remove stale import
2018-03-16 01:45:49 +00:00
Matthew Hodgson
fc5397fdf5
remove debug
2018-03-16 01:44:55 +00:00
Matthew Hodgson
4f0493c850
fix tsm search again
2018-03-16 01:43:37 +00:00
Matthew Hodgson
f7dcc404f2
add state_ids for timeline entries
2018-03-16 01:37:53 +00:00
Matthew Hodgson
5b3b3aada8
simplify timeline_start_members
2018-03-16 01:17:34 +00:00
Erik Johnston
bf49d2dca8
Replace some ujson with simplejson to make it work
2018-03-16 00:55:44 +00:00
Matthew Hodgson
3bc5bd2d22
make incr syncs work
2018-03-16 00:52:04 +00:00
Erik Johnston
a8ce159be4
Replace some ujson with simplejson to make it work
2018-03-16 00:27:09 +00:00
Erik Johnston
f609acc109
Merge branch 'hotfixes-v0.26.1' of github.com:matrix-org/synapse
2018-03-16 00:13:51 +00:00
Erik Johnston
0092cf38ae
Newline
2018-03-16 00:11:58 +00:00
Erik Johnston
5b631ff41a
Remove wrong comment
2018-03-16 00:07:08 +00:00
Erik Johnston
ba48755d56
Bump version and changelog
2018-03-15 23:57:26 +00:00
Erik Johnston
926ba76e23
Replace ujson with simplejson
2018-03-15 23:43:31 +00:00
Richard van der Hoff
5a6e54264d
Make 'unexpected logging context' into warnings
...
I think we've now fixed enough of these that the rest can be logged at
warning.
2018-03-15 18:40:38 +00:00
Erik Johnston
9cf519769b
Use .iter* to avoid copies in StateHandler
2018-03-15 17:50:26 +00:00
Erik Johnston
7c7706f42b
Fix bug where state cache used lots of memory
...
The state cache bases its size on the sum of the size of entries. The
size of the entry is calculated once on insertion, so it is important
that the size of entries does not change.
The DictionaryCache modified the entries size, which caused the state
cache to incorrectly think it was smaller than it actually was.
2018-03-15 15:46:54 +00:00
NotAFile
2cc9f76bc3
replace old style error catching with 'as' keyword
...
This is both easier to read and compatible with python3 (not that that
matters)
Signed-off-by: Adrian Tschira <nota@notafile.com >
2018-03-15 16:11:17 +01:00
Erik Johnston
ddb00efc1d
Bump version number
2018-03-15 14:41:30 +00:00
Erik Johnston
2a376579f3
Merge pull request #3003 from matrix-org/rav/fix_contributing
...
CONTRIBUTING.rst: fix CI info
2018-03-15 13:31:59 +00:00
Erik Johnston
873aea7168
Merge pull request #3002 from matrix-org/rav/purge_doc
...
Update purge_history_api.rst
2018-03-15 13:31:54 +00:00
Erik Johnston
bf7ee93cb6
Merge pull request #2997 from turt2live/patch-2
...
Doc: Make the event_creator routes regex a code block
2018-03-15 13:12:44 +00:00
Richard van der Hoff
5ea624b0f5
CONTRIBUTING.rst: fix CI info
2018-03-15 11:48:35 +00:00
Richard van der Hoff
0ad5125814
Update purge_history_api.rst
...
clarify that `purge_history` will not purge state
2018-03-15 11:05:42 +00:00
Richard van der Hoff
068c21ab10
CHANGES.rst: reword metric deprecation
2018-03-15 10:36:31 +00:00
Neil Johnson
b29d1abab6
Update CHANGES.rst
2018-03-15 10:34:15 +00:00
Neil Johnson
7367a4a823
Update CHANGES.rst
2018-03-15 10:33:52 +00:00
Neil Johnson
7d26591048
Update CHANGES.rst
2018-03-15 10:33:24 +00:00
Erik Johnston
2059b8573f
Update CHANGES.rst
2018-03-14 18:11:21 +00:00
Erik Johnston
10fdcf561d
Fix up rst formatting
2018-03-14 17:30:17 +00:00
Neil Johnson
5ccb57d3ff
Update CHANGES.rst
2018-03-14 17:12:58 +00:00
Travis Ralston
c33c1ceddd
OCD: Make the event_creator routes regex a code block
...
All the others are code blocks, so this one should be to (currently it is a blockquote).
Signed-off-by: Travis Ralston <travpc@gmail.com >
2018-03-14 11:09:08 -06:00
Neil Johnson
fb647164f2
Update CHANGES.rst
2018-03-14 16:20:36 +00:00
Neil Johnson
a492b17fe2
Update CHANGES.rst
...
clean formatting
2018-03-14 16:18:09 +00:00
Neil Johnson
cb2c7c0669
Update CHANGES.rst
...
WIP, need to add most recent PRs
2018-03-14 16:09:20 +00:00
Krombel
91ea0202e6
move handling of auto_join_rooms to RegisterHandler
...
Currently the handling of auto_join_rooms only works when a user
registers itself via public register api. Registrations via
registration_shared_secret and ModuleApi do not work
This auto_joins the users in the registration handler which enables
the auto join feature for all 3 registration paths.
This is related to issue #2725
Signed-Off-by: Matthias Kesler <krombel@krombel.de >
2018-03-14 16:45:37 +01:00
Matthew Hodgson
056a6df546
Merge branch 'develop' into matthew/filter_members
2018-03-14 15:38:05 +00:00
Erik Johnston
3959754de3
Merge pull request #2995 from matrix-org/erikj/enable_membership_worker
...
Register membership/state servlets in event_creator
2018-03-14 14:37:33 +00:00
Erik Johnston
4f28018c83
Register membership/state servlets in event_creator
2018-03-14 14:30:06 +00:00
Erik Johnston
57db62e554
Merge pull request #2992 from matrix-org/erikj/implement_member_workre
...
Implement RoomMemberWorkerHandler
2018-03-14 14:29:33 +00:00
Erik Johnston
0011ede3b0
Fix imports
2018-03-14 14:19:23 +00:00
Erik Johnston
62ad701326
s/join/joined/ in notify_user_membership_change
2018-03-14 14:17:43 +00:00
Erik Johnston
3f0f06cb31
Split RoomMemberWorkerHandler to separate file
2018-03-14 11:41:45 +00:00
Erik Johnston
3e839e0548
Merge pull request #2989 from matrix-org/erikj/profile_cache_master
...
Only update remote profile cache on master
2018-03-14 09:42:27 +00:00
Erik Johnston
ebd0127999
Merge pull request #2988 from matrix-org/erikj/split_profile_store
...
Split up ProfileStore
2018-03-14 09:41:06 +00:00
Erik Johnston
cfe75a9fb6
Merge pull request #2991 from matrix-org/erikj/fixup_rm
...
_remote_join and co take a requester
2018-03-14 09:40:57 +00:00
Erik Johnston
f51565e023
Merge pull request #2993 from matrix-org/erikj/is_blocked
...
Add is_blocked to worker store
2018-03-14 09:39:18 +00:00
Matthew Hodgson
9f77001e27
pep8
2018-03-14 00:07:47 +00:00
Matthew Hodgson
4d0cfef6ee
add copyright to nudge CI
2018-03-14 00:02:20 +00:00
Matthew Hodgson
c9d72e4571
oops
2018-03-13 23:46:45 +00:00
Matthew Hodgson
d144ed6ffb
fix bug #2926 (loading all state for a given type from the DB if the state_key is None) ( #2990 )
...
Fixes a regression that had crept in where the caching layer upholds requests for loading state which is filtered by type (but not by state_key), but the DB layer itself would interpret a missing state_key as a request to filter by null state_key rather than returning all state_keys.
2018-03-13 22:36:04 +00:00
Matthew Hodgson
ccca02846d
make it work
2018-03-13 22:31:41 +00:00
Matthew Hodgson
f0f9a0605b
remove comment now #2969 is fixed
2018-03-13 22:12:15 +00:00
Matthew Hodgson
12350e3f9a
merge proper fix to bug 2969
2018-03-13 22:11:58 +00:00
Matthew Hodgson
14a9d2f73d
ensure we always include the members for a given timeline block
2018-03-13 22:03:42 +00:00
Matthew Hodgson
afbf4d3dcc
typoe
2018-03-13 19:48:04 +00:00
Matthew Hodgson
865377a70d
disable optimisation for searching for state groups
...
when type filter includes wildcards on state_key
2018-03-13 19:46:04 +00:00
Erik Johnston
a08726fc42
Add is_blocked to worker store
2018-03-13 18:28:44 +00:00
Erik Johnston
b27320b550
Implement RoomMemberWorkerHandler
2018-03-13 18:26:00 +00:00
Matthew Hodgson
b2aba9e430
build where_clause sanely
2018-03-13 18:13:44 +00:00
Matthew Hodgson
52f7e23c72
PR feedbackz
2018-03-13 18:07:55 +00:00
Matthew Hodgson
1b1c137771
fix bug #2926
2018-03-13 17:52:52 +00:00
Erik Johnston
350331d466
_remote_join and co take a requester
2018-03-13 17:50:39 +00:00
Erik Johnston
1a69c6d590
Merge pull request #2987 from matrix-org/erikj/split_room_member_handler
...
Split RoomMemberHandler into base and master class
2018-03-13 17:40:00 +00:00
Erik Johnston
df8ff682a7
Only update remote profile cache on master
2018-03-13 17:38:21 +00:00
Erik Johnston
3518d0ea8f
Split up ProfileStore
2018-03-13 17:36:50 +00:00
Erik Johnston
d45a114824
Raise, don't return, exception
2018-03-13 17:24:34 +00:00
Erik Johnston
6dbebef141
Add missing param to docstrings
2018-03-13 17:15:32 +00:00
Erik Johnston
16adb11cc0
Correct import order
2018-03-13 16:57:07 +00:00
Erik Johnston
82f16faa78
Move user_*_room distributor stuff to master class
...
I added yields when calling user_left_room, but they shouldn't matter on
the master process as they always return None anyway.
2018-03-13 16:38:15 +00:00
Erik Johnston
b78717b87b
Split RoomMemberHandler into base and master class
...
The intention here is to split the class into the bits that can be done
on workers and the bits that have to be done on the master.
In future there will also be a class that can be run on the worker,
which will delegate work to the master when necessary.
2018-03-13 16:37:41 +00:00
Erik Johnston
95cb401ae0
Merge pull request #2978 from matrix-org/erikj/refactor_replication_layer
...
Remove ReplicationLayer and user Client/Server directly
2018-03-13 15:45:08 +00:00
Erik Johnston
5d8476d8ff
Merge pull request #2981 from matrix-org/erikj/factor_remote_leave
...
Factor out _remote_reject_invite in RoomMember
2018-03-13 15:44:56 +00:00
Jonas Platte
47ce527f45
Add room_id to the response of rooms/{roomId}/join
...
Fixes #2349
2018-03-13 14:48:12 +01:00
Erik Johnston
56e709857c
Merge pull request #2979 from matrix-org/erikj/no_handlers
...
Don't build handlers on workers unnecessarily
2018-03-13 13:46:38 +00:00
Erik Johnston
cb9f8e527c
s/replication_client/federation_client/
2018-03-13 13:26:52 +00:00
Erik Johnston
cea462e285
s/replication_server/federation_server
2018-03-13 13:22:21 +00:00
Erik Johnston
bf8e97bd3c
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/factor_remote_leave
2018-03-13 13:17:08 +00:00
Erik Johnston
ea3442c15c
Add docstring
2018-03-13 13:16:21 +00:00
Erik Johnston
16469a4f15
Merge pull request #2980 from matrix-org/erikj/rm_priv
...
Make RoomMemberHandler functions private that can be
2018-03-13 13:11:11 +00:00
Erik Johnston
c82111a55f
Merge pull request #2982 from matrix-org/erikj/fix_extra_users
...
extra_users is actually a list of UserIDs
2018-03-13 13:11:04 +00:00
Erik Johnston
da87791975
Merge pull request #2983 from matrix-org/erikj/rename_register_3pid
...
Refactor get_or_register_3pid_guest
2018-03-13 13:10:52 +00:00
Erik Johnston
99e9b4f26c
Merge pull request #2984 from matrix-org/erikj/fix_rest_regeix
...
RoomMembershipRestServlet doesn't handle /forget
2018-03-13 13:10:44 +00:00
Erik Johnston
f5160d4a3e
RoomMembershipRestServlet doesn't handle /forget
...
Due to the order we register the REST handlers `/forget` was handled by
the correct handler.
2018-03-13 12:12:55 +00:00
Erik Johnston
8b3573a8b2
Refactor get_or_register_3pid_guest
2018-03-13 12:08:58 +00:00
Richard van der Hoff
299fd740c7
Merge pull request #2975 from matrix-org/rav/measure_persist_events
...
Add Measure block for persist_events
2018-03-13 12:06:25 +00:00
Erik Johnston
9a2d9b4789
Merge pull request #2977 from matrix-org/erikj/replication_move_props
...
Move property setting from ReplicationLayer to base classes
2018-03-13 11:45:25 +00:00
Erik Johnston
141c343e03
Merge pull request #2976 from matrix-org/erikj/replication_registry
...
Split out edu/query registration to a separate class
2018-03-13 11:45:08 +00:00
Erik Johnston
f43b6d6d9b
Fix docstring types
2018-03-13 11:29:35 +00:00
Erik Johnston
0f942f68c1
Factor out _remote_reject_invite in RoomMember
2018-03-13 11:22:45 +00:00
Erik Johnston
d0fcc48f9d
extra_users is actually a list of UserIDs
2018-03-13 11:20:06 +00:00
Erik Johnston
31becf4ac3
Make functions private that can be
2018-03-13 11:15:16 +00:00
Erik Johnston
d023ecb810
Don't build handlers on workers unnecessarily
2018-03-13 11:08:10 +00:00
Erik Johnston
ea7b3c4b1b
Remove unused ReplicationLayer
2018-03-13 11:00:04 +00:00
Erik Johnston
6ea27fafad
Fix tests
2018-03-13 10:55:47 +00:00
Erik Johnston
265b993b8a
Split replication layer into two
2018-03-13 10:55:47 +00:00
Erik Johnston
e05bf34117
Move property setting from ReplicationLayer to FederationBase
2018-03-13 10:51:30 +00:00
Erik Johnston
631a73f7ef
Fix tests
2018-03-13 10:39:19 +00:00
Erik Johnston
c3f79c9da5
Split out edu/query registration to a separate class
2018-03-13 10:24:27 +00:00
Richard van der Hoff
889a2a853a
Add Measure block for persist_events
...
This seems like a useful thing to measure.
2018-03-13 10:01:42 +00:00
Richard van der Hoff
d65ceb4b48
Merge pull request #2962 from matrix-org/rav/purge_history_txns
...
Add transactional API to history purge
2018-03-12 16:32:18 +00:00
Richard van der Hoff
e48c7aac4d
Add transactional API to history purge
...
Make the purge request return quickly, and allow scripts to poll for updates.
2018-03-12 16:22:55 +00:00
Richard van der Hoff
1708412f56
Return an error when doing two purges on a room
...
Queuing up purges doesn't sound like a good thing.
2018-03-12 16:22:54 +00:00
Richard van der Hoff
b984dd0b73
Merge pull request #2961 from matrix-org/rav/run_in_background
...
Factor run_in_background out from preserve_fn
2018-03-12 16:19:13 +00:00
Richard van der Hoff
ba1d08bc4b
Merge pull request #2965 from matrix-org/rav/request_logging
...
Add a metric which increments when a request is received
2018-03-12 09:45:33 +00:00
Matthew Hodgson
fdedcd1f4d
correctly handle None state_keys
...
and fix include_other_types thinko
2018-03-12 01:39:06 +00:00
Matthew Hodgson
97c0496cfa
fix sqlite where clause
2018-03-12 00:27:06 +00:00
Matthew Hodgson
8713365265
typos
2018-03-11 20:10:25 +00:00
Matthew Hodgson
9b334b3f97
WIP experiment in lazyloading room members
2018-03-11 20:01:41 +00:00
Richard van der Hoff
58dd148c4f
Add some docstrings to help figure this out
2018-03-09 18:05:41 +00:00
Richard van der Hoff
88541f9009
Add a metric which increments when a request is received
...
It's useful to know when there are peaks in incoming requests - which isn't
quite the same as there being peaks in outgoing responses, due to the time
taken to handle requests.
2018-03-09 16:30:26 +00:00
Richard van der Hoff
dbe80a286b
refactor JsonResource
...
rephrase the OPTIONS and unrecognised request handling so that they look
similar to the common flow.
2018-03-09 16:22:16 +00:00
Richard van der Hoff
20f40348d4
Factor run_in_background out from preserve_fn
...
It annoys me that we create temporary function objects when there's really no
need for it. Let's factor the gubbins out of preserve_fn and start using it.
2018-03-08 11:50:11 +00:00
Erik Johnston
735fd8719a
Merge pull request #2944 from matrix-org/erikj/fix_sync_race
...
Fix race in sync when joining room
2018-03-07 17:42:26 +00:00
Erik Johnston
a56d54dcb7
Fix up log message
2018-03-07 11:55:31 +00:00
Erik Johnston
02a1296ad6
Fix typo
2018-03-07 11:55:31 +00:00
Erik Johnston
8cb44da4aa
Fix race in sync when joining room
...
The race happens when the user joins a room at the same time as doing a
sync. We fetch the current token and then get the rooms the user is in.
If the join happens after the current token, but before we get the rooms
we end up sending down a partial room entry in the sync.
This is fixed by looking at the stream ordering of the membership
returned by get_rooms_for_user, and handling the case when that stream
ordering is after the current token.
2018-03-07 11:55:31 +00:00
Richard van der Hoff
8ffaacbee3
Merge pull request #2949 from krombel/use_bcrypt_checkpw
...
use bcrypt.checkpw
2018-03-06 11:56:06 +00:00
Richard van der Hoff
b2932107bb
Merge pull request #2946 from matrix-org/rav/timestamp_to_purge
...
Implement purge_history by timestamp
2018-03-06 11:20:23 +00:00
Erik Johnston
7aed50a038
Merge pull request #2948 from matrix-org/erikj/kill_as_sync
...
Remove ability for AS users to call /events and /sync
2018-03-06 11:10:09 +00:00
Erik Johnston
b6c4b851f1
Merge pull request #2947 from matrix-org/erikj/split_directory_store
...
Split Directory store
2018-03-05 18:17:32 +00:00
Krombel
ed9b5eced4
use bcrypt.checkpw
...
in bcrypt 3.1.0 checkpw got introduced (already 2 years ago)
This makes use of that with enhancements which might get introduced
by that
Signed-Off-by: Matthias Kesler <krombel@krombel.de >
2018-03-05 18:02:59 +01:00
Erik Johnston
d4ffe61d4f
Remove ability for AS users to call /events and /sync
...
This functionality has been deprecated for a while as well as being
broken for a while. Instead of fixing it lets just remove it entirely.
See: https://github.com/matrix-org/matrix-doc/issues/1144
2018-03-05 15:44:46 +00:00
Erik Johnston
69ce365b79
Fix cache invalidation on deletion
2018-03-05 15:29:03 +00:00
Erik Johnston
2e223163ff
Split Directory store
2018-03-05 15:11:30 +00:00
Richard van der Hoff
f8bfcd7e0d
Provide a means to pass a timestamp to purge_history
2018-03-05 14:37:23 +00:00
Richard van der Hoff
d032785aa7
Merge pull request #2943 from matrix-org/rav/fix_find_first_stream_ordering_after_ts
...
Test and fix find_first_stream_ordering_after_ts
2018-03-05 12:26:14 +00:00
Richard van der Hoff
2c911d75e8
Fix comment typo
2018-03-05 12:24:49 +00:00
Richard van der Hoff
c818fcab11
Test and fix find_first_stream_ordering_after_ts
...
It seemed to suffer from a bunch of off-by-one errors.
2018-03-05 12:04:02 +00:00
Richard van der Hoff
06a14876e5
Add find_first_stream_ordering_after_ts
...
Expose this as a public function which can be called outside a txn
2018-03-05 11:53:39 +00:00
Erik Johnston
42174946f8
Merge pull request #2934 from matrix-org/erikj/cache_fix
...
Fix bug with delayed cache invalidation stream
2018-03-05 11:33:17 +00:00
Erik Johnston
f394f5574d
Merge pull request #2929 from matrix-org/erikj/split_regististration_store
...
Split registration store
2018-03-05 11:33:07 +00:00
dklug
af7ed8e1ef
Return 401 for invalid access_token on logout
...
Signed-off-by: Duncan Klug <dklug@ucmerced.edu >
2018-03-02 22:01:27 -08:00
Erik Johnston
efb79820b4
Fix bug with delayed cache invalidation stream
...
We poked the notifier before updated the current token for the cache
invalidation stream. This mean that sometimes the update wouldn't be
sent until the next time a cache was invalidated.
2018-03-02 14:45:15 +00:00
Erik Johnston
fafa3e7114
Split registration store
2018-03-02 13:48:27 +00:00
Erik Johnston
6619f047ad
Merge pull request #2933 from matrix-org/erikj/3pid_yield
...
Add missing yield during 3pid signature checks
2018-03-02 11:31:50 +00:00
Erik Johnston
d960d23830
Add missing yield during 3pid signature checks
2018-03-02 11:03:18 +00:00
Erik Johnston
1a6c7cdf54
Merge pull request #2928 from matrix-org/erikj/read_marker_caches
...
Fix typo in getting replication account data processing
2018-03-01 17:56:14 +00:00
Erik Johnston
89b7232ff8
Fix typo in getting replication account data processing
2018-03-01 17:50:30 +00:00
Erik Johnston
1773df0632
Merge pull request #2925 from matrix-org/erikj/split_sig_fed
...
Split out SignatureStore and EventFederationStore
2018-03-01 17:32:58 +00:00
Erik Johnston
65cf454fd1
Remove unused DataStore
2018-03-01 17:27:53 +00:00
Erik Johnston
9e08a93a7b
Merge pull request #2927 from matrix-org/erikj/read_marker_caches
...
Improve caching for read_marker API
2018-03-01 17:12:34 +00:00
Erik Johnston
4b44f05f19
Fewer lies are better
2018-03-01 17:08:17 +00:00
Erik Johnston
a83c514d1f
Improve caching for read_marker API
...
We add a new storage function to get a paritcular type of room account
data. This allows us to prefill the cache when updating that acount
data.
2018-03-01 17:08:17 +00:00
Erik Johnston
33bebb63f3
Add some caches to help read marker API
2018-03-01 17:08:17 +00:00
Erik Johnston
483e8104db
Merge pull request #2926 from matrix-org/erikj/member_handler_move
...
Move RoomMemberHandler out of Handlers
2018-03-01 17:01:25 +00:00
Erik Johnston
2ad4d5b5bb
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/split_sig_fed
2018-03-01 16:59:39 +00:00
Erik Johnston
92789199a9
Merge pull request #2924 from matrix-org/erikj/split_stream_store
...
Split out stream store
2018-03-01 16:56:37 +00:00
Erik Johnston
529c026ac1
Move back to hs.is_mine
2018-03-01 16:49:12 +00:00
Erik Johnston
7c371834cc
Stub out broken function only used for cache
2018-03-01 16:44:13 +00:00
Erik Johnston
64346be26d
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/split_stream_store
2018-03-01 16:26:42 +00:00
Erik Johnston
22518e2833
Merge pull request #2923 from matrix-org/erikj/stream_ago_worker
...
Calculate stream_ordering_month_ago correctly on workers
2018-03-01 16:23:54 +00:00
Erik Johnston
884b26ae41
Remove unused variables
2018-03-01 16:23:48 +00:00
Erik Johnston
1b2af11650
Document abstract class and method better
2018-03-01 16:20:57 +00:00
Erik Johnston
872ff95ed4
Default stream_ordering_*_ago to None
2018-03-01 16:00:05 +00:00
Erik Johnston
22004b524e
Fix comment typo
2018-03-01 15:59:40 +00:00
Erik Johnston
4bc4236faf
Merge pull request #2922 from matrix-org/erikj/split_room_store
...
Split up RoomStore
2018-03-01 15:55:01 +00:00
Richard van der Hoff
2324124a72
Merge pull request #2921 from matrix-org/rav/unyielding_make_deferred_yieldable
...
Rewrite make_deferred_yieldable avoiding inlineCallbacks
2018-03-01 15:39:10 +00:00
Erik Johnston
f793bc3877
Split out stream store
2018-03-01 15:13:08 +00:00
Erik Johnston
784f036306
Move RoomMemberHandler out of Handlers
2018-03-01 14:36:50 +00:00
Erik Johnston
6411f725be
Calculate stream_ordering_month_ago correctly on workers
2018-03-01 14:20:53 +00:00
Erik Johnston
a9a2d66cdd
Split out SignatureStore and EventFederationStore
2018-03-01 14:17:53 +00:00
Erik Johnston
0c8ba5dd1c
Split up RoomStore
2018-03-01 14:01:19 +00:00
Richard van der Hoff
3a75de923b
Rewrite make_deferred_yieldable avoiding inlineCallbacks
...
... because (a) it's actually simpler (b) it might be marginally more
performant?
2018-03-01 12:40:05 +00:00
Erik Johnston
17445e6701
Merge pull request #2920 from matrix-org/erikj/retry_send_event
...
Make repl send_event idempotent and retry on timeouts
2018-03-01 12:14:21 +00:00
Erik Johnston
126b9bf96f
Log in the correct places
2018-03-01 12:05:33 +00:00
Erik Johnston
157298f986
Don't do preserve_fn for every request
2018-03-01 11:59:45 +00:00
Erik Johnston
89f90d808a
Add some logging
2018-03-01 11:59:16 +00:00
Erik Johnston
8ded8ba2c7
Make repl send_event idempotent and retry on timeouts
...
If we treated timeouts as failures on the worker we would attempt to
clean up e.g. push actions while the master might still process the
event.
2018-03-01 11:20:34 +00:00
Erik Johnston
182ff17c83
Merge pull request #2875 from matrix-org/erikj/push_actions_worker
...
Calculate push actions on worker
2018-03-01 11:20:07 +00:00
Erik Johnston
f381d63813
Check event auth on the worker
2018-03-01 10:18:37 +00:00
Erik Johnston
6b8604239f
Correctly send ratelimit and extra_users params
2018-03-01 10:08:39 +00:00
Erik Johnston
f756f961ea
Fixup comments
2018-03-01 10:05:27 +00:00
Erik Johnston
28e973ac11
Calculate push actions on worker
2018-02-28 18:02:30 +00:00
Erik Johnston
9cb3a190bc
Merge pull request #2913 from matrix-org/erikj/store_push
...
Move storage functions for push calculations
2018-02-28 18:02:03 +00:00
Erik Johnston
493e25d554
Move storage functions for push calculations
...
This will allow push actions for an event to be calculated on workers.
2018-02-27 13:58:16 +00:00
Erik Johnston
3594dbc6dc
Merge pull request #2904 from matrix-org/erikj/receipt_cache_invalidation
...
Fix missing invalidations for receipt storage
2018-02-27 11:34:26 +00:00
Erik Johnston
2311189ee4
Merge pull request #2903 from matrix-org/erikj/split_roommember_store
...
Split out RoomMemberStore
2018-02-27 11:32:10 +00:00
Erik Johnston
c57607874c
Merge pull request #2901 from matrix-org/erikj/split_as_stores
...
Split AS stores
2018-02-27 10:07:07 +00:00
Erik Johnston
8956f0147a
Add comment
2018-02-27 10:06:51 +00:00
Erik Johnston
e5b4a208ce
Merge pull request #2892 from matrix-org/erikj/batch_inserts_push_actions
...
Batch inserts into event_push_actions_staging
2018-02-26 14:45:40 +00:00
Erik Johnston
73fe866847
Merge pull request #2894 from matrix-org/erikj/handle_unpersisted_events_push
...
Ensure all push actions are deleted from staging
2018-02-26 14:28:35 +00:00
Erik Johnston
45b5fe9122
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/handle_unpersisted_events_push
2018-02-26 13:49:24 +00:00
Erik Johnston
d62ce972f8
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/split_roommember_store
2018-02-23 11:46:24 +00:00
Erik Johnston
6ae9a3d2a6
Update copyright
2018-02-23 11:44:49 +00:00
Erik Johnston
2ec49826e8
Merge pull request #2900 from matrix-org/erikj/split_event_push_actions
...
Split out EventPushActionWorkerStore
2018-02-23 11:44:30 +00:00
Erik Johnston
a90c60912f
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/split_event_push_actions
2018-02-23 11:26:31 +00:00
Erik Johnston
50e8657867
Merge pull request #2902 from matrix-org/erikj/split_events_store
...
Split out get_events and co into a worker store
2018-02-23 11:23:52 +00:00
Erik Johnston
1cf9e071dd
Merge pull request #2899 from matrix-org/erikj/split_pushers
...
Split PusherStore
2018-02-23 11:23:35 +00:00
Erik Johnston
d0957753bf
Merge pull request #2898 from matrix-org/erikj/split_push_rules_store
...
Split PushRulesStore
2018-02-23 11:23:23 +00:00
Erik Johnston
199dba6c15
Merge pull request #2897 from matrix-org/erikj/split_account_data
...
Split AccountDataStore and TagStore
2018-02-23 11:23:11 +00:00
Erik Johnston
70349872c2
Update copyright
2018-02-23 11:14:35 +00:00
Erik Johnston
eba93b05bf
Split EventsWorkerStore into separate file
2018-02-23 11:01:21 +00:00
Erik Johnston
bf8a36e080
Update copyright
2018-02-23 10:52:10 +00:00
Erik Johnston
5d0f665848
Remove redundant clock
2018-02-23 10:49:58 +00:00
Erik Johnston
3bd760628b
_event_persist_queue shouldn't be in worker store
2018-02-23 10:49:18 +00:00
Erik Johnston
eb9b5eec81
Update copyright
2018-02-23 10:42:39 +00:00
Erik Johnston
c2ecfcc3a4
Update copyright
2018-02-23 10:41:34 +00:00
Erik Johnston
7e6cf89dc2
Update copyright
2018-02-23 10:39:19 +00:00
Erik Johnston
26d37f7a63
Update copyright
2018-02-23 10:33:55 +00:00
Erik Johnston
bb73f55fc6
Use absolute imports
2018-02-23 10:31:16 +00:00
Erik Johnston
faeb369f15
Fix missing invalidations for receipt storage
2018-02-21 15:19:54 +00:00
Erik Johnston
3dec9c66b3
Split out RoomMemberStore
2018-02-21 12:07:26 +00:00
Erik Johnston
46244b2759
Split AS stores
2018-02-21 11:49:34 +00:00
Erik Johnston
27b094f382
Split out get_events and co into a worker store
2018-02-21 11:41:48 +00:00
Erik Johnston
573712da6b
Update comments
2018-02-21 11:29:49 +00:00
Erik Johnston
c96d547f4d
Actually use new param
2018-02-21 11:03:42 +00:00
Erik Johnston
d15d237b0d
Split out EventPushActionWorkerStore
2018-02-21 11:01:13 +00:00
Erik Johnston
27939cbb0e
Merge pull request #2893 from matrix-org/erikj/delete_from_staging_fed
...
Delete from push_actions_staging in federation too
2018-02-21 11:00:06 +00:00
Erik Johnston
6f72765371
Split PusherStore
2018-02-21 10:54:21 +00:00
Erik Johnston
cbaad969f9
Split PushRulesStore
2018-02-21 10:43:31 +00:00
Erik Johnston
ca9b9d9703
Split AccountDataStore and TagStore
2018-02-21 10:15:04 +00:00
Erik Johnston
a2b25de68d
Merge pull request #2896 from matrix-org/erikj/split_receipts_store
...
Split ReceiptsStore
2018-02-20 18:08:20 +00:00
Erik Johnston
8fbb4d0d19
Raise exception in abstract method
2018-02-20 17:59:23 +00:00
Erik Johnston
95e4cffd85
Fix comment
2018-02-20 17:58:40 +00:00
Erik Johnston
e316bbb4c0
Use abstract base class to access stream IDs
2018-02-20 17:43:57 +00:00
Erik Johnston
f5ac4dc2d4
Split ReceiptsStore
2018-02-20 16:28:28 +00:00
Erik Johnston
25634ed152
Fix test
2018-02-20 12:40:44 +00:00
Erik Johnston
24087bffa9
Ensure all push actions are deleted from staging
2018-02-20 12:34:31 +00:00
Erik Johnston
ad0ccf15ea
Refactor _set_push_actions_for_event_and_users_txn to use events_and_contexts
2018-02-20 12:34:28 +00:00
Erik Johnston
e440e28456
Fix unit tests
2018-02-20 11:41:40 +00:00
Erik Johnston
d874d4f2d7
Delete from push_actions_staging in federation too
2018-02-20 11:37:52 +00:00
Erik Johnston
6ff8c87484
Batch inserts into event_push_actions_staging
2018-02-20 11:33:07 +00:00
Erik Johnston
324c3e9399
Merge pull request #2868 from matrix-org/erikj/refactor_media_storage
...
Make store_file use store_into_file
2018-02-20 11:31:24 +00:00
Richard van der Hoff
3fc33bae8b
Merge pull request #2888 from bachp/pynacl-1.2.1
...
Update pynacl dependency to 1.2.1 or higher
2018-02-19 14:37:51 +00:00
Pascal Bach
3acd616979
Update pynacl dependency to 1.2.1 or higher
...
Signed-off-by: Pascal Bach <pascal.bach@nextrem.ch >
2018-02-19 10:45:22 +01:00
Travis Ralston
923d9300ed
Add a blurb explaining the main synapse worker
...
Signed-off-by: Travis Ralston <travpc@gmail.com >
2018-02-17 21:53:46 -07:00
Richard van der Hoff
a71a080cd2
Merge pull request #2882 from matrix-org/rav/fix_purge_tablescan
...
(Really) fix tablescan of event_push_actions on purge
2018-02-16 15:18:47 +00:00
Richard van der Hoff
d1a3325f99
(Really) fix tablescan of event_push_actions on purge
...
commit 278d21b5 added new code to avoid the tablescan, but didn't remove the
old :/
2018-02-16 14:02:31 +00:00
Erik Johnston
bf5ef10a93
Merge pull request #2874 from matrix-org/erikj/creator_push_actions
...
Store push actions in DB staging area instead of context
2018-02-16 11:52:51 +00:00
Erik Johnston
6af025d3c4
Fix typo of double is_highlight
2018-02-16 11:35:31 +00:00
Erik Johnston
012e8e142a
Comments
2018-02-16 11:35:01 +00:00
Erik Johnston
3a061cae26
Fix unit test
2018-02-15 16:31:59 +00:00
Erik Johnston
b96278d6fe
Ensure that we delete staging push actions on errors
2018-02-15 15:47:06 +00:00
Erik Johnston
4810f7effd
Remove context.push_actions
2018-02-15 15:47:06 +00:00
Erik Johnston
c714c61853
Update event_push_actions table from staging table
2018-02-15 15:47:06 +00:00
Erik Johnston
acac21248c
Store push actions in staging area
2018-02-15 15:47:04 +00:00
Erik Johnston
6ed9ff69c2
Merge pull request #2873 from matrix-org/erikj/event_creator_no_state
...
Don't serialize current state over replication
2018-02-15 14:09:42 +00:00
Erik Johnston
106906a65e
Don't serialize current state over replication
2018-02-15 13:53:18 +00:00
Erik Johnston
5fb347fc41
Merge pull request #2872 from matrix-org/erikj/event_worker_dont_log
...
Don't log errors propogated from send_event
2018-02-15 12:31:49 +00:00
Erik Johnston
cd94728e93
Merge pull request #2871 from matrix-org/erikj/event_creator_state
...
Fix state group storage bug in workers
2018-02-15 11:34:01 +00:00
Erik Johnston
fd1601c596
Fix state group storage bug in workers
...
We needed to move `_count_state_group_hops_txn` to the
StateGroupWorkerStore.
2018-02-15 11:04:32 +00:00
Erik Johnston
ef344b10e5
Don't log errors propogated from send_event
2018-02-15 11:03:49 +00:00
Richard van der Hoff
b8d821aa68
Merge pull request #2867 from matrix-org/rav/rework_purge
...
purge_history cleanups
2018-02-15 09:49:07 +00:00
Erik Johnston
92c52df702
Make store_file use store_into_file
2018-02-14 17:55:18 +00:00
Richard van der Hoff
d28ec43e15
Merge pull request #2769 from matrix-org/matthew/hit_the_gin
...
switch back from GIST to GIN indexes
2018-02-14 16:59:03 +00:00
Richard van der Hoff
39bf47319f
purge_history: fix sqlite syntax error
...
apparently sqlite insists on indexes being named
2018-02-14 16:42:19 +00:00
Richard van der Hoff
ac27f6a35e
purge_history: handle sqlite asshattery
...
apparently creating a temporary table commits the transaction. because that's a
useful thing.
2018-02-14 16:41:12 +00:00
Richard van der Hoff
5978dccff0
remove overzealous exception handling
2018-02-14 15:54:09 +00:00
Richard van der Hoff
278d21b5e4
purge_history: fix index use
...
event_push_actions doesn't have an index on event_id, so we need to specify
room_id.
2018-02-14 15:44:51 +00:00
Richard van der Hoff
5fcbf1e07c
Rework event purge to use a temporary table
...
... which should speed things up by reducing the amount of data being shuffled
across the connection
2018-02-14 11:02:22 +00:00
Erik Johnston
c0c9327fe0
Merge pull request #2854 from matrix-org/erikj/event_create_worker
...
Create a worker for event creation
2018-02-13 18:07:10 +00:00
Erik Johnston
059d3a6c8e
Update docs
2018-02-13 17:53:56 +00:00
Richard van der Hoff
d627174da2
Fix log message in purge_history
...
(we don't just remove remote events)
2018-02-13 16:51:21 +00:00
Richard van der Hoff
ddb6a79b68
Merge branch 'matthew/gin_work_mem' into matthew/hit_the_gin
2018-02-13 16:45:36 +00:00
Richard van der Hoff
0b27ae8dc3
move search reindex to schema 47
...
We're up to schema v47 on develop now, so this will have to go in there to have
an effect.
This might cause an error if somebody has already run it in the v46 guise, and
runs it again in the v47 guise, because it will cause a duplicate entry in the
bbackground_updates table. On the other hand, the entry is removed once it is
complete, and it is unlikely that anyone other than matrix.org has run it on
v46. The update itself is harmless to re-run because it deliberately copes with
the index already existing.
2018-02-13 16:44:46 +00:00
Richard van der Hoff
4a6d551704
GIN reindex: Fix syntax errors, improve exception handling
2018-02-13 16:44:46 +00:00
Richard van der Hoff
bfdf7b9237
Merge pull request #2864 from matrix-org/rav/persist_event_caching
...
Use StateResolutionHandler to resolve state in persist_events
2018-02-13 14:45:57 +00:00
Richard van der Hoff
630caf8a70
style nit
2018-02-13 14:29:22 +00:00
Richard van der Hoff
8fd1a32456
Fix typos in purge api & doc
...
* It's supposed to be purge_local_events, not ..._history
* Fix the doc to have valid json
2018-02-13 13:09:39 +00:00
Richard van der Hoff
4d09366656
Merge pull request #2695 from okurz/feature/allow_recent_pysaml
...
Allow use of higher versions of saml2
2018-02-13 12:24:08 +00:00
Richard van der Hoff
a9b712e9dc
Merge branch 'develop' into matthew/gin_work_mem
2018-02-13 12:16:01 +00:00
Erik Johnston
32c7b8e48b
Update workers docs to include http port
2018-02-12 17:21:23 +00:00
Erik Johnston
1026690cd2
Merge pull request #2857 from matrix-org/erikj/upload_store
...
Tell storage providers about new file so they can upload
2018-02-12 13:52:58 +00:00
kaiyou
f44b7c022f
Disable logging to file and rely on the console when using Docker
2018-02-10 23:57:51 +01:00
kaiyou
07f1b71819
Explicitely provide the postgres password to synapse in the Compose example
2018-02-10 23:57:36 +01:00
kaiyou
b815aa0e2d
Remove an accidentally committed test configuration
2018-02-10 21:59:58 +01:00
kaiyou
6f0b1f85f9
Generate macaroon and registration secrets, then store the results to the data dir
2018-02-10 00:05:03 +01:00
Richard van der Hoff
10b34dbb9a
Merge pull request #2858 from matrix-org/rav/purge_updates
...
delete_local_events for purge_room_history
2018-02-09 14:11:00 +00:00
Richard van der Hoff
39a6b35496
purge: move room_depth update to end
...
... to avoid locking the table for too long
2018-02-09 13:07:41 +00:00
Richard van der Hoff
74fcbf741b
delete_local_events for purge_history
...
Add a flag which makes the purger delete local events
2018-02-09 13:07:41 +00:00
Richard van der Hoff
e571aef06d
purge: Move cache invalidation to more appropriate place
...
it was a bit of a non-sequitur there
2018-02-09 13:07:41 +00:00
Richard van der Hoff
61ffaa8137
bump purge logging to info
...
this thing takes ages and the only sign of any progress is the logs, so having
some logs is useful.
2018-02-09 13:07:41 +00:00
Richard van der Hoff
671540dccf
rename delete_old_state -> purge_history
...
(beacause it deletes more than state)
2018-02-09 13:07:41 +00:00
kaiyou
ca70148c05
Fix the path to the log config file
2018-02-09 00:23:19 +01:00
kaiyou
e511979fe6
Make SYNAPSE_MACAROON_SECRET_KEY a mandatory option
2018-02-09 00:13:26 +01:00
kaiyou
a03c382966
Specify the Docker registry for the postgres image
2018-02-08 22:00:43 +01:00
kaiyou
48e2c641b8
Specify the Docker registry in the build tag
2018-02-08 21:58:12 +01:00
kaiyou
d8680c969b
Make it clear that the image has two modes of operation
2018-02-08 21:55:35 +01:00
kaiyou
b9b668e4bb
Update to Alpine 3.7 and switch to libressl
2018-02-08 21:39:36 +01:00
kaiyou
ef1f8d4be6
Enable email server configuration from environment variables
2018-02-08 20:53:12 +01:00
kaiyou
a0af0054ec
Honor the SYNAPSE_REPORT_STATS parameter in the Docker image
2018-02-08 20:46:11 +01:00
kaiyou
914a59cb8c
Disable the Web client in the Docker image
2018-02-08 20:43:45 +01:00
kaiyou
e174c46a29
Use 'synapse' as a default postgres user in Docker examples
2018-02-08 20:42:57 +01:00
kaiyou
b8a4dceb3c
Refactor the start script to better handle mandatory parameters
2018-02-08 20:41:41 +01:00
kaiyou
084afbb6a0
Rename the permissions variable to avoid confusion
2018-02-08 19:50:04 +01:00
kaiyou
58df3a8c5d
Add some documentation about high performance storage
2018-02-08 19:48:53 +01:00
kaiyou
63fd148724
Make it clear that two modes are avaiable in the documentation, improve the compose file
2018-02-08 19:46:11 +01:00
Erik Johnston
5fa571a91b
Tell storage providers about new file so they can upload
2018-02-07 13:35:08 +00:00
Erik Johnston
053255f36c
Merge pull request #2856 from matrix-org/erikj/remove_ratelimit
...
Remove pointless ratelimit check
2018-02-07 11:12:14 +00:00
Erik Johnston
f133228cb3
Add note in docs/workers.rst
2018-02-07 10:34:31 +00:00
Erik Johnston
50fe92cd26
Move presence handling into handle_new_client_event
...
As we want to have it run on the main synapse instance
2018-02-07 10:34:09 +00:00
Erik Johnston
8ec2e638be
Add event_creator worker
2018-02-07 10:32:32 +00:00
Erik Johnston
24dd73028a
Add replication http endpoint for event sending
2018-02-07 10:32:32 +00:00
Erik Johnston
e3624fad5f
Remove pointless ratelimit check
...
The intention was for the check to be called as early as possible in the
request, but actually was called just before the main ratelimit check,
so was fairly pointless.
2018-02-07 10:30:25 +00:00
Erik Johnston
617199d73d
Merge pull request #2847 from matrix-org/erikj/separate_event_creation
...
Split event creation into a separate handler
2018-02-06 17:01:17 +00:00
Erik Johnston
3e1e69ccaf
Update copyright
2018-02-06 16:40:38 +00:00
Erik Johnston
770b2252ca
s/_create_new_client_event/create_new_client_event/
2018-02-06 16:40:30 +00:00
Erik Johnston
3d33eef6fc
Store state groups separately from events ( #2784 )
...
* Split state group persist into seperate storage func
* Add per database engine code for state group id gen
* Move store_state_group to StateReadStore
This allows other workers to use it, and so resolve state.
* Hook up store_state_group
* Fix tests
* Rename _store_mult_state_groups_txn
* Rename StateGroupReadStore
* Remove redundant _have_persisted_state_group_txn
* Update comments
* Comment compute_event_context
* Set start val for state_group_id_seq
... otherwise we try to recreate old state groups
* Update comments
* Don't store state for outliers
* Update comment
* Update docstring as state groups are ints
2018-02-06 14:31:24 +00:00
kaiyou
1ffd9cb936
Support loading application service files from /data/appservices/
2018-02-05 23:13:27 +01:00
kaiyou
107a5c9441
Add the non-tls port to the expose list
2018-02-05 23:02:33 +01:00
kaiyou
ee3b160a2a
Only generate configuration files when necessary
2018-02-05 22:57:35 +01:00
kaiyou
630573a932
Do not copy documentation files to the Docker root folder
2018-02-05 22:57:22 +01:00
kaiyou
f5364b47ec
Point to the 'latest' tag in the Docker documentation
2018-02-05 22:14:40 +01:00
kaiyou
d8c7da5dca
Fix a typo in the Docker README
2018-02-05 22:12:50 +01:00
kaiyou
cf4ef60e28
Document the cache factor environment variable for Docker
2018-02-05 22:10:03 +01:00
kaiyou
cd51931b62
Add dynamic TURN configuration in the Docker image
2018-02-05 21:53:53 +01:00
kaiyou
81010a126e
Add dynamic recaptcha configuration in the Docker image
2018-02-05 21:28:15 +01:00
kaiyou
8db84e9b21
Remove docker related files from the python manifest
2018-02-05 20:08:35 +01:00
Richard van der Hoff
b31bf0bb51
Merge pull request #2849 from matrix-org/rav/clean_up_state_delta
...
Remove redundant return value from _calculate_state_delta
2018-02-05 17:42:20 +01:00
Richard van der Hoff
9a304ef2b0
Merge pull request #2848 from matrix-org/rav/refactor_search_insert
...
Factor out common code for search insert
2018-02-05 17:42:09 +01:00
Richard van der Hoff
ebfe64e3d6
Use StateResolutionHandler to resolve state in persist events
...
... and thus benefit (hopefully) from its cache.
2018-02-05 16:23:26 +00:00
Richard van der Hoff
225dc3b4cb
Flatten _get_new_state_after_events
...
rejig the if statements to simplify the logic and reduce indentation
2018-02-05 16:23:25 +00:00
Richard van der Hoff
9fcbbe8e7d
Check that events being persisted have state_group
2018-02-05 16:23:25 +00:00
Richard van der Hoff
447aed42d2
Add event_map param to resolve_state_groups
2018-02-05 16:23:25 +00:00
Richard van der Hoff
ee6fb4cf85
Remove redundant return value from _calculate_state_delta
...
we already have the state from _get_new_state_after_events, so returning it
from _calculate_state_delta is just confusing.
2018-02-05 16:23:20 +00:00
Richard van der Hoff
3c7b480ba3
Factor out common code for search insert
...
we can reuse the same code as is used for event insert, for doing the
background index population.
2018-02-05 16:12:14 +00:00
Erik Johnston
25c0a020f4
Updates tests
2018-02-05 16:01:48 +00:00
Erik Johnston
3fa362502c
Update places where we create events
2018-02-05 16:01:48 +00:00
Erik Johnston
5ff3d23564
Split event creation into a separate handler
2018-02-05 16:01:48 +00:00
Richard van der Hoff
c46e75d3d8
Move store_event_search_txn to SearchStore
...
... as a precursor to making event storing and doing the bg update share some
code.
2018-02-05 15:43:22 +00:00
Richard van der Hoff
db91e72ade
Merge pull request #2844 from matrix-org/rav/evicted_metrics
...
montoring metrics for number of cache evictions
2018-02-05 16:34:36 +01:00
Richard van der Hoff
bc496df192
report metrics on number of cache evictions
2018-02-05 15:34:01 +00:00
Erik Johnston
a1beca0e25
Fix broken unit test for media storage
2018-02-05 12:44:03 +00:00
Erik Johnston
b5049d2e5c
Add .vscode to gitignore
2018-02-05 12:06:46 +00:00
Erik Johnston
1f881e0746
Merge pull request #2791 from matrix-org/erikj/media_storage_refactor
...
Ensure media is in local cache before thumbnailing
2018-02-05 11:28:52 +00:00
kaiyou
e9021e16c4
Run the server as an unprivileged user
2018-02-04 23:19:08 +01:00
kaiyou
f72c9c1fb6
Fix multiple typos
2018-02-04 16:18:40 +01:00
kaiyou
b8ab78b82c
Add the build cache/ folder to gitignore
2018-02-04 15:41:54 +01:00
kaiyou
9a87b8aaf7
Update sumperdump Docker readme to match this image properties
2018-02-04 15:27:32 +01:00
kaiyou
84a9209ba7
Remove etc/service files from rob's branch
2018-02-04 15:08:43 +01:00
kaiyou
53965334da
Merge remote-tracking branch 'origin/rob/docker' into feat-dockerfile
2018-02-04 15:08:19 +01:00
kaiyou
a207cccb05
Reuse environment variables of the postgres container
2018-02-04 15:04:26 +01:00
kaiyou
1ba2fe114c
Provide an example docker compose file
2018-02-04 12:55:20 +01:00
kaiyou
042757feb2
Install the postgres dependencies
2018-02-04 12:28:42 +01:00
kaiyou
886c2d5019
Support an external postgresql config in the Docker image
2018-02-04 12:20:29 +01:00
kaiyou
f2bf0cda02
Generate shared secrets if not defined in the environment
2018-02-04 11:40:20 +01:00
kaiyou
6d1e28a842
Generate any missing keys before starting synapse
2018-02-04 11:14:06 +01:00
kaiyou
48bc22f89d
Allow for a wheel cache and include missing files in the build
2018-02-04 10:58:07 +01:00
Richard van der Hoff
80b8a28100
Factor out common code for search insert
...
we can reuse the same code as is used for event insert, for doing the
background index population.
2018-02-04 00:23:06 +00:00
Richard van der Hoff
bd25f9cf36
Clean up work_mem handling
...
Add some comments and improve exception handling when twiddling work_mem for
the search update
2018-02-03 23:05:41 +00:00
Richard van der Hoff
4eeae7ad65
Move store_event_search_txn to SearchStore
...
... as a precursor to making event storing and doing the bg update share some
code.
2018-02-03 22:59:45 +00:00
Richard van der Hoff
bb9f0f3cdb
Merge branch 'develop' into matthew/gin_work_mem
2018-02-03 22:40:28 +00:00
kaiyou
d434ae3387
Add template config files for the Docker image
2018-02-03 20:30:08 +01:00
kaiyou
431476fbc4
Initial commit including a Dockerfile for synapse
2018-02-03 20:18:36 +01:00
Richard van der Hoff
6b02fc80d1
Reinstate event_search_postgres_gist handler
...
People may have queued updates for this, so we can't just delete it.
2018-02-02 14:32:51 +00:00
Richard van der Hoff
9c9356512e
Merge pull request #2845 from matrix-org/rav/urlcache_error_handling
...
Handle url_previews with no content-type
2018-02-02 15:27:52 +01:00
Richard van der Hoff
18eae413af
Merge pull request #2842 from matrix-org/rav/state_resolution_handler
...
Factor out resolve_state_groups to a separate handler
2018-02-02 15:27:35 +01:00
Richard van der Hoff
78d6ddba86
Merge pull request #2841 from matrix-org/rav/refactor_calc_state_delta
...
factor _get_new_state_after_events out of _calculate_state_delta
2018-02-02 15:27:15 +01:00
Richard van der Hoff
9dcd667ac2
Merge pull request #2836 from matrix-org/rav/resolve_state_events_docstring
...
Docstring fixes
2018-02-02 15:26:49 +01:00
Richard van der Hoff
33cac3dc29
Merge pull request #2818 from turt2live/travis/admin-list-media
...
Add an admin route to get all the media in a room
2018-02-02 11:41:03 +01:00
Travis Ralston
6e87b34f7b
Merge branch 'develop' into travis/admin-list-media
2018-02-01 18:05:47 -07:00
Richard van der Hoff
d5352cbba8
Handle url_previews with no content-type
...
avoid failing with an exception if the remote server doesn't give us a
Content-Type header.
Also, clean up the exception handling a bit.
2018-02-02 00:53:46 +00:00
Richard van der Hoff
14737ba495
doc arg types for _seperate
2018-02-01 12:41:34 +00:00
Richard van der Hoff
e15d4ea248
More docstring fixes
...
Fix a couple of errors in docstrings
2018-02-01 12:41:34 +00:00
Richard van der Hoff
a18828c129
Fix docstring for StateHandler.resolve_state_groups
...
The return type was a complete lie, so fix it
2018-02-01 12:41:34 +00:00
Richard van der Hoff
6da4c4d3bd
Factor out resolve_state_groups to a separate handler
...
We extract the storage-independent bits of the state group resolution out to a
separate functiom, and stick it in a new handler, in preparation for its use
from the storage layer.
2018-02-01 12:40:04 +00:00
Richard van der Hoff
0cbda53819
Rename resolve_state_groups -> resolve_state_groups_for_events
...
(to make way for a method that actually just does the state group resolution)
2018-02-01 12:40:00 +00:00
Richard van der Hoff
77c0629ebc
Merge pull request #2837 from matrix-org/rav/fix_quarantine_media
...
Fix sql error in quarantine_media
2018-02-01 11:45:58 +01:00
Travis Ralston
e16e45b1b4
pep8
...
Signed-off-by: Travis Ralston <travpc@gmail.com >
2018-01-31 15:30:38 -07:00
Richard van der Hoff
e1e4ec9f9d
factor _get_new_state_after_events out of _calculate_state_delta
...
This reduces the scope of a bunch of variables
2018-01-31 21:32:09 +00:00
Richard van der Hoff
78e7e05188
Merge pull request #2838 from matrix-org/rav/fix_logging_on_dns_fail
...
Remove spurious log argument
2018-01-31 22:18:46 +01:00
Richard van der Hoff
ad48dfe73d
Merge pull request #2835 from matrix-org/rav/remove_event_type_param
...
Remove unused "event_type" param on state.get_current_state_ids
2018-01-31 22:17:57 +01:00
Richard van der Hoff
518a74586c
Merge pull request #2834 from matrix-org/rav/better_persist_event_exception_handling
...
Improve exception handling in persist_event
2018-01-31 22:17:38 +01:00
Richard van der Hoff
d1fe4db882
Merge pull request #2833 from matrix-org/rav/pusher_hacks
...
Logging and metrics for the http pusher
2018-01-31 22:16:59 +01:00
Richard van der Hoff
421d68ca8c
Merge pull request #2817 from matrix-org/rav/http_conn_pool
...
Use a connection pool for the SimpleHttpClient
2018-01-31 22:14:22 +01:00
Richard van der Hoff
326189c25a
Script to move remote media to another media store
2018-01-31 18:45:10 +00:00
Travis Ralston
3af53c183a
Add admin api documentation for list media endpoint
...
Signed-off-by: Travis Ralston <travpc@gmail.com >
2018-01-31 08:15:59 -07:00
Travis Ralston
63c4383927
Documentation and naming
...
Signed-off-by: Travis Ralston <travpc@gmail.com >
2018-01-31 08:07:52 -07:00
Richard van der Hoff
af19f5e9aa
Remove spurious log argument
...
... which would cause scary-looking and unhelpful errors in the log on dns fail
2018-01-30 17:52:03 +00:00
Richard van der Hoff
773f0eed1e
Fix sql error in quarantine_media
2018-01-30 15:02:51 +00:00
Richard van der Hoff
adfc0c9539
docstring for get_current_state_ids
2018-01-29 17:39:55 +00:00
Richard van der Hoff
d413a2ba98
Remove unused "event_type" param on state.get_current_state_ids
...
this param doesn't seem to be used, and is a bit pointless anyway because it
can easily be replicated by the caller. It is also horrible, because it changes
the return type of the method.
2018-01-29 17:06:57 +00:00
Richard van der Hoff
b387ee17b6
Improve exception handling in persist_event
...
1. use `deferred.errback()` instead of `deferred.errback(e)`, which means that
a Failure object will be constructed using the current exception state,
*including* its stack trace - so the stack trace is saved in the Failure,
leading to better exception reports.
2. Set `consumeErrors=True` on the ObservableDeferred, because we know that
there will always be at least one observer - which avoids a spurious "CRITICAL:
unhandled exception in Deferred" error in the logs
2018-01-29 17:05:33 +00:00
Richard van der Hoff
03dd745fe2
Better logging when pushes fail
2018-01-29 15:49:06 +00:00
Richard van der Hoff
e051abd20b
add appid/device_display_name to to pusher logging
2018-01-29 15:04:16 +00:00
Richard van der Hoff
02ba118f81
Increase http conn pool size
2018-01-29 14:30:15 +00:00
Richard van der Hoff
4c65b98e4a
Merge pull request #2831 from matrix-org/rav/fix-userdir-search-again
...
Fix SQL for user search
2018-01-27 22:58:24 +01:00
Richard van der Hoff
d1f3490e75
Add tests for user directory search
2018-01-27 17:21:57 +00:00
Richard van der Hoff
46022025ea
Fix SQL for user search
...
fix some syntax errors for user search when search_all_users is enabled
fixes #2801 , hopefully
2018-01-27 17:21:57 +00:00
Richard van der Hoff
2186d7c06e
Merge pull request #2829 from matrix-org/rav/postgres_in_tests
...
Make it possible to run tests against postgres
2018-01-27 18:20:55 +01:00
Richard van der Hoff
88b9c5cbf0
Make it possible to run tests against postgres
2018-01-27 17:15:24 +00:00
Richard van der Hoff
d7eacc4f87
Create dbpool as normal in tests
...
... instead of creating our own special SQLiteMemoryDbPool, whose purpose was a
bit of a mystery.
For some reason this makes one of the tests run slightly slower, so bump the
sleep(). Sorry.
2018-01-27 17:15:15 +00:00
Richard van der Hoff
b178eca261
Run on_new_connection for unit tests
...
Configure the connectionpool used for unit tests to run the `on_new_connection`
function.
2018-01-27 17:06:04 +00:00
Richard van der Hoff
d8f90c4208
Merge pull request #2828 from matrix-org/rav/kill_memory_datastore
...
Remove unused/bitrotted MemoryDataStore
2018-01-27 17:57:02 +01:00
Richard van der Hoff
4b0f06e99c
Merge pull request #2830 from matrix-org/rav/factor_out_get_conn
...
Factor out get_db_conn to HomeServer base class
2018-01-27 17:56:25 +01:00
Neil Johnson
e98f0f9112
Merge pull request #2827 from matrix-org/fix_server_500_on_public_rooms_call_when_no_rooms_exist
...
Fix server 500 on public rooms call when no rooms exist
2018-01-26 20:22:40 +00:00
Richard van der Hoff
25adde9a04
Factor out get_db_conn to HomeServer base class
...
This function is identical to all subclasses, so we may as well push it up to
the base class to reduce duplication (and make use of it in the tests)
2018-01-26 00:56:49 +00:00
Richard van der Hoff
6e9bf67f18
Remove unused/bitrotted MemoryDataStore
...
This isn't used, and looks thoroughly bitrotted.
2018-01-26 00:35:15 +00:00
Richard van der Hoff
2b91846497
Remove spurious unittest.DEBUG
2018-01-26 00:34:27 +00:00
Neil Johnson
73560237d6
add white space line
2018-01-26 00:15:10 +00:00
Neil Johnson
86c4f49a31
rather than try reconstruct the results object, better to guard against the xrange step argument being 0
2018-01-26 00:12:02 +00:00
Neil Johnson
f632083576
fix return type, should be a dict
2018-01-25 23:52:17 +00:00
Neil Johnson
6c6e197b0a
fix PEP8 violation
2018-01-25 23:47:46 +00:00
Neil Johnson
d02e43b15f
remove white space
2018-01-25 23:29:46 +00:00
Neil Johnson
349c739966
synapse 500s on a call to publicRooms in the case where the number of public rooms is zero, the specific cause is due to xrange trying to use a step value of zero, but if the total room number really is zero then it makes sense to just bail and save the extra processing
2018-01-25 23:28:44 +00:00
Matthew Hodgson
9a72b70630
fix thinko on 3pid whitelisting
2018-01-24 11:07:47 +01:00
Richard van der Hoff
25e2456ee7
Merge pull request #2816 from matrix-org/rav/metrics_comments
...
Add some comments about the reactor tick time metric
2018-01-23 19:39:26 +00:00
Matthew Hodgson
d32385336f
add ?ts massaging for ASes ( #2754 )
...
blindly implement ?ts for AS. untested
2018-01-23 09:59:06 +01:00
Richard van der Hoff
b2da272b77
Merge pull request #2821 from matrix-org/rav/matthew_test_fixes
...
Matthew's fixes to the unit tests
2018-01-22 20:43:56 +00:00
Richard van der Hoff
4528dd2443
Fix logging and add user_id
2018-01-22 20:15:42 +00:00
Richard van der Hoff
93efd7eb04
logging and debug for http pusher
2018-01-22 18:14:10 +00:00
Matthew Hodgson
ab9f844aaf
Add federation_domain_whitelist option ( #2820 )
...
Add federation_domain_whitelist
gives a way to restrict which domains your HS is allowed to federate with.
useful mainly for gracefully preventing a private but internet-connected HS from trying to federate to the wider public Matrix network
2018-01-22 19:11:18 +01:00
Richard van der Hoff
5c431f421c
Matthew's fixes to the unit tests
...
Extracted from https://github.com/matrix-org/synapse/pull/2820
2018-01-22 16:46:16 +00:00
Matthew Hodgson
d84f65255e
Merge pull request #2813 from matrix-org/matthew/registrations_require_3pid
...
add registrations_require_3pid and allow_local_3pids
2018-01-22 13:57:22 +00:00
Travis Ralston
a94d9b6b82
Appease the linter
...
These are ids anyways, not mxc uris.
Signed-off-by: Travis Ralston <travpc@gmail.com >
2018-01-20 22:49:46 -07:00
Travis Ralston
5552ed9a7f
Add an admin route to get all the media in a room
...
This is intended to be used by administrators to monitor the media that is passing through their server, if they wish.
Signed-off-by: Travis Ralston <travpc@gmail.com >
2018-01-20 22:37:53 -07:00
Richard van der Hoff
2c8526cac7
Use a connection pool for the SimpleHttpClient
...
In particular I hope this will help the pusher, which makes many requests to
sygnal, and is currently negotiating SSL for each one.
2018-01-20 00:55:44 +00:00
Richard van der Hoff
87b7d72760
Add some comments about the reactor tick time metric
2018-01-19 23:51:04 +00:00
Matthew Hodgson
49fce04624
fix typo (thanks sytest)
2018-01-19 19:55:38 +00:00
Richard van der Hoff
b0d9e633ee
Merge pull request #2814 from matrix-org/rav/fix_urlcache_thumbs
...
Use the right path for url_preview thumbnails
2018-01-19 18:57:15 +00:00
Richard van der Hoff
ad7ec63d08
Use the right path for url_preview thumbnails
...
This was introduced by #2627 : we were overwriting the original media for url
previews with the thumbnails :/
(fixes https://github.com/vector-im/riot-web/issues/6012 , hopefully)
2018-01-19 18:29:39 +00:00
Matthew Hodgson
62d7d66ae5
oops, check all login types
2018-01-19 18:23:56 +00:00
Matthew Hodgson
8fe253f19b
fix PR nitpicking
2018-01-19 18:23:45 +00:00
Matthew Hodgson
293380bef7
trailing commas
2018-01-19 15:38:53 +00:00
Matthew Hodgson
447f4f0d5f
rewrite based on PR feedback:
...
* [ ] split config options into allowed_local_3pids and registrations_require_3pid
* [ ] simplify and comment logic for picking registration flows
* [ ] fix docstring and move check_3pid_allowed into a new util module
* [ ] use check_3pid_allowed everywhere
@erikjohnston PTAL
2018-01-19 15:33:55 +00:00
Matthew Hodgson
9d332e0f79
fix up v1, and improve errors
2018-01-19 00:53:58 +00:00
Matthew Hodgson
0af58f14ee
fix pep8
2018-01-19 00:33:51 +00:00
Matthew Hodgson
81d037dbd8
mock registrations_require_3pid
2018-01-19 00:28:08 +00:00
Matthew Hodgson
28a6ccb49c
add registrations_require_3pid
...
lets homeservers specify a whitelist for 3PIDs that users are allowed to associate with.
Typically useful for stopping people from registering with non-work emails
2018-01-19 00:19:58 +00:00
Erik Johnston
cd871a3057
Fix storage provider bug introduced when renamed to store_local
2018-01-18 18:37:59 +00:00
Erik Johnston
8ff6726c0d
Merge pull request #2812 from matrix-org/erikj/media_storage_provider_config
...
Make storage providers configurable
2018-01-18 18:33:57 +00:00
Erik Johnston
d69768348f
Fix passing wrong config to provider constructor
2018-01-18 17:14:05 +00:00
Erik Johnston
8e85220373
Remove duplicate directory test
2018-01-18 17:12:35 +00:00
Erik Johnston
3fe2bae857
Missing staticmethod
2018-01-18 17:11:45 +00:00
Erik Johnston
aae77da73f
Fixup comments
2018-01-18 17:11:29 +00:00
Erik Johnston
ce4f66133e
Add unit tests
2018-01-18 16:32:11 +00:00
Erik Johnston
b6dc7044a9
Merge pull request #2804 from matrix-org/erikj/file_consumer
...
Add decent impl of a FileConsumer
2018-01-18 16:31:33 +00:00
Erik Johnston
9a89dae8c5
Fix typo in thumbnail resource causing access times to be incorrect
2018-01-18 15:06:24 +00:00
Erik Johnston
0af5dc63a8
Make storage providers more configurable
2018-01-18 14:07:21 +00:00
Richard van der Hoff
5a4da21d58
Merge pull request #2810 from matrix-org/rav/metrics_fixes
...
Fix bugs in block metrics
2018-01-18 13:35:28 +00:00
Richard van der Hoff
d57765fc8a
Fix bugs in block metrics
...
... which I introduced in #2785
2018-01-18 12:24:42 +00:00
Erik Johnston
2cf6a7bc20
Use better file consumer
2018-01-18 12:00:46 +00:00
Erik Johnston
4a53f3a3e8
Ensure media is in local cache before thumbnailing
2018-01-18 12:00:46 +00:00
Erik Johnston
be0dfcd4a2
Do logcontexts correctly
2018-01-18 11:57:57 +00:00
Erik Johnston
1432f7ccd5
Move test stuff to tests
2018-01-18 11:57:57 +00:00
Erik Johnston
2f18a2647b
Make all fields private
2018-01-18 11:57:54 +00:00
Richard van der Hoff
d6af5512bb
Merge pull request #2809 from matrix-org/rav/metrics_errors
...
better exception logging in callbackmetrics
2018-01-18 11:46:37 +00:00
Richard van der Hoff
ce236f8ac8
better exception logging in callbackmetrics
...
when we fail to render a metric, give a clue as to which metric it was
2018-01-18 11:30:49 +00:00
Erik Johnston
dc519602ac
Ensure we registerProducer isn't called twice
2018-01-18 11:07:17 +00:00
Erik Johnston
17b54389fe
Fix _notify_empty typo
2018-01-18 11:05:34 +00:00
Erik Johnston
28b338ed9b
Move definition of paused_producer to __init__
2018-01-18 11:04:41 +00:00
Erik Johnston
a177325b49
Fix comments
2018-01-18 11:02:43 +00:00
Richard van der Hoff
36da256cc6
Merge pull request #2805 from matrix-org/rav/log_state_res
...
Log room when doing state resolution
2018-01-17 18:05:04 +00:00
Richard van der Hoff
1224612a79
Log room when doing state resolution
...
Mostly because it helps figure out what is prompting the resolution
2018-01-17 17:11:59 +00:00
Erik Johnston
bc67e7d260
Add decent impl of a FileConsumer
...
Twisted core doesn't have a general purpose one, so we need to write one
ourselves.
Features:
- All writing happens in background thread
- Supports both push and pull producers
- Push producers get paused if the consumer falls behind
2018-01-17 16:43:03 +00:00
Erik Johnston
a87006f9c7
Merge pull request #2783 from matrix-org/erikj/media_last_accessed
...
Keep track of last access time for local media
2018-01-17 16:39:02 +00:00
Matthew Hodgson
06db5c4b76
Merge pull request #2803 from matrix-org/matthew/fix-userdir-sql
...
fix SQL when searching all users
2018-01-17 16:27:54 +00:00
Richard van der Hoff
8716eb4920
Merge pull request #2802 from matrix-org/rav/clean_up_resolve_events
...
Split resolve_events into two functions
2018-01-17 16:01:33 +00:00
Matthew Hodgson
2d9ab533f9
fix SQL when searching all users
2018-01-17 15:58:52 +00:00
Richard van der Hoff
390093d45e
Split resolve_events into two functions
...
... so that the return type doesn't depend on the arg types
2018-01-17 15:44:31 +00:00
Erik Johnston
2fb3a28c98
Remove lost comment
2018-01-17 14:59:44 +00:00
Richard van der Hoff
a7e4ff9cca
Merge pull request #2795 from matrix-org/rav/track_db_scheduling
...
Track DB scheduling delay per-request
2018-01-17 14:29:37 +00:00
Richard van der Hoff
f884cfffb9
Merge pull request #2797 from matrix-org/rav/user_id_checking
...
Sanity checking for user ids
2018-01-17 14:29:12 +00:00
Richard van der Hoff
a5213df1f7
Sanity checking for user ids
...
Check the user_id passed to a couple of APIs for validity, to avoid
"IndexError: list index out of range" exception which looks scary and results
in a 500 rather than a more useful error.
Fixes #1432 , among other things
2018-01-17 14:28:54 +00:00
Erik Johnston
3d5a25407c
Merge pull request #2798 from jeremycline/fedora-repo
...
Note that Synapse is available in Fedora
2018-01-17 14:28:17 +00:00
Richard van der Hoff
e8f7541d3f
Merge remote-tracking branch 'origin/develop' into rav/track_db_scheduling
2018-01-17 14:01:57 +00:00
Richard van der Hoff
fb6563b4be
Merge pull request #2793 from matrix-org/rav/db_txn_time_in_millis
...
Track db txn time in millisecs
2018-01-17 13:52:42 +00:00
Richard van der Hoff
1954e867b4
Merge pull request #2796 from matrix-org/rav/fix_closed_connection_errors
...
Fix 'NoneType' object has no attribute 'writeHeaders'
2018-01-17 13:52:24 +00:00
Richard van der Hoff
f23b4078c0
Merge pull request #2794 from matrix-org/rav/rework_run_interaction
...
rework runInteraction in terms of runConnection
2018-01-17 13:50:42 +00:00
Richard van der Hoff
11ab2f56f5
Merge branch 'develop' into rav/fix_closed_connection_errors
2018-01-17 11:25:11 +00:00
Richard van der Hoff
0486a7814a
Merge branch 'develop' into rav/rework_run_interaction
2018-01-17 11:24:38 +00:00
Richard van der Hoff
90c14da992
Merge branch 'develop' into rav/db_txn_time_in_millis
2018-01-17 11:19:55 +00:00
Richard van der Hoff
1067b96364
Merge pull request #2792 from matrix-org/rav/optimise_logging_context
...
Optimise LoggingContext creation and copying
2018-01-17 11:19:28 +00:00
Richard van der Hoff
38506773eb
Merge remote-tracking branch 'origin/develop' into rav/optimise_logging_context
2018-01-17 10:57:13 +00:00
Erik Johnston
300edc2348
Update last access time when thumbnails are viewed
2018-01-17 10:24:43 +00:00
Erik Johnston
05f98a2224
Keep track of last access time for local media
2018-01-17 10:24:43 +00:00
Erik Johnston
3cb2dabaad
Merge pull request #2789 from matrix-org/erikj/fix_thumbnails
...
Fix thumbnailing remote files
2018-01-17 10:22:20 +00:00
Erik Johnston
d728c47142
Add docstring
2018-01-17 10:06:14 +00:00
Jeremy Cline
4102468da9
Note that Synapse is available in Fedora
...
Signed-off-by: Jeremy Cline <jeremy@jcline.org >
2018-01-16 16:14:02 -05:00
Richard van der Hoff
936482d507
Fix 'NoneType' object has no attribute 'writeHeaders'
...
Avoid throwing a (harmless) exception when we try to write an error response to
an http request where the client has disconnected.
This comes up as a CRITICAL error in the logs which tends to mislead people
into thinking there's an actual problem
2018-01-16 17:58:16 +00:00
Richard van der Hoff
3d12d97415
Track DB scheduling delay per-request
...
For each request, track the amount of time spent waiting for a db
connection. This entails adding it to the LoggingContext and we may as well add
metrics for it while we are passing.
2018-01-16 17:23:32 +00:00
Richard van der Hoff
0f5d2cc37c
Merge branch 'rav/db_txn_time_in_millis' into rav/track_db_scheduling
2018-01-16 17:09:15 +00:00
Richard van der Hoff
8615f19d20
rework runInteraction in terms of runConnection
...
... so that we can share the code
2018-01-16 17:08:29 +00:00
Matthew Hodgson
5e97ca7ee6
fix typo
2018-01-16 16:52:35 +00:00
Erik Johnston
d863f68cab
Use local vars
2018-01-16 16:24:15 +00:00
Erik Johnston
6368e5c0ab
Change _generate_thumbnails to take media_type
2018-01-16 16:17:38 +00:00
Erik Johnston
0a90d9ede4
Move setting of file_id up to caller
2018-01-16 16:03:05 +00:00
Richard van der Hoff
6324b65f08
Track db txn time in millisecs
...
... to reduce the amount of floating-point foo we do.
2018-01-16 15:53:18 +00:00
Richard van der Hoff
44a498418c
Optimise LoggingContext creation and copying
...
It turns out that the only thing we use the __dict__ of LoggingContext for is
`request`, and given we create lots of LoggingContexts and then copy them every
time we do a db transaction or log line, using the __dict__ seems a bit
redundant. Let's try to optimise things by making the request attribute
explicit.
2018-01-16 15:49:42 +00:00
Erik Johnston
5dfc83704b
Fix typo
2018-01-16 14:32:56 +00:00
Richard van der Hoff
febdca4b37
Merge pull request #2785 from matrix-org/rav/reorganise_metrics_again
...
Reorganise request and block metrics
2018-01-16 14:10:21 +00:00
Richard van der Hoff
f5f89fda21
Merge pull request #2790 from matrix-org/rav/preserve_event_logcontext_leak
...
Fix a logcontext leak in persist_events
2018-01-16 14:09:13 +00:00
Erik Johnston
307f88dfb6
Fix up log lines
2018-01-16 13:53:52 +00:00
Richard van der Hoff
5b527d7ee1
Merge pull request #2674 from her001/readme-sytest
...
Mention SyTest in the README, after Development
2018-01-16 13:18:17 +00:00
Richard van der Hoff
807e848f0f
Merge pull request #2787 from matrix-org/rav/worker_event_counts
...
Metrics for events processed in appservice and fed sender
2018-01-16 13:14:09 +00:00
Richard van der Hoff
4a31a61ef9
Merge pull request #2786 from matrix-org/rav/rdata_metrics
...
Metrics for number of RDATA commands received
2018-01-16 13:13:53 +00:00
Richard van der Hoff
ee7a1cabd8
document metrics changes
2018-01-16 13:04:01 +00:00
Erik Johnston
9795b9ebb1
Correctly use server_name/file_id when generating/fetching remote thumbnails
2018-01-16 12:02:06 +00:00
Erik Johnston
c5b589f2e8
Log when we respond with 404
2018-01-16 12:01:40 +00:00
Richard van der Hoff
64ddec1bc0
Fix a logcontext leak in persist_events
...
ObserveableDeferred expects its callbacks to be called without any
logcontexts, whereas it turns out we were calling them with the logcontext of
the request which initiated the persistence loop.
It seems wrong that we are attributing work done in the persistence loop to the
request that happened to initiate it, so let's solve this by dropping the
logcontext for it.
(I'm not sure this actually causes any real problems other than messages in the
debug log, but let's clean it up anyway)
2018-01-16 11:47:36 +00:00
Erik Johnston
a4c5e4a645
Fix thumbnailing remote files
2018-01-16 11:37:50 +00:00
Erik Johnston
1159abbdd2
Merge pull request #2767 from matrix-org/erikj/media_storage_refactor
...
Refactor MediaRepository to separate out storage
2018-01-16 10:23:50 +00:00
Richard van der Hoff
a027c2af8d
Metrics for events processed in appservice and fed sender
...
More metrics I wished I'd had
2018-01-15 18:23:24 +00:00
Richard van der Hoff
5c3c32f16f
Metrics for number of RDATA commands received
...
I found myself wishing we had this.
2018-01-15 17:45:55 +00:00
Richard van der Hoff
39f4e29d01
Reorganise request and block metrics
...
In order to circumvent the number of duplicate foo:count metrics increasing
without bounds, it's time for a rearrangement.
The following are all deprecated, and replaced with synapse_util_metrics_block_count:
synapse_util_metrics_block_timer:count
synapse_util_metrics_block_ru_utime:count
synapse_util_metrics_block_ru_stime:count
synapse_util_metrics_block_db_txn_count:count
synapse_util_metrics_block_db_txn_duration:count
The following are all deprecated, and replaced with synapse_http_server_response_count:
synapse_http_server_requests
synapse_http_server_response_time:count
synapse_http_server_response_ru_utime:count
synapse_http_server_response_ru_stime:count
synapse_http_server_response_db_txn_count:count
synapse_http_server_response_db_txn_duration:count
The following are renamed (the old metrics are kept for now, but deprecated):
synapse_util_metrics_block_timer:total ->
synapse_util_metrics_block_time_seconds
synapse_util_metrics_block_ru_utime:total ->
synapse_util_metrics_block_ru_utime_seconds
synapse_util_metrics_block_ru_stime:total ->
synapse_util_metrics_block_ru_stime_seconds
synapse_util_metrics_block_db_txn_count:total ->
synapse_util_metrics_block_db_txn_count
synapse_util_metrics_block_db_txn_duration:total ->
synapse_util_metrics_block_db_txn_duration_seconds
synapse_http_server_response_time:total ->
synapse_http_server_response_time_seconds
synapse_http_server_response_ru_utime:total ->
synapse_http_server_response_ru_utime_seconds
synapse_http_server_response_ru_stime:total ->
synapse_http_server_response_ru_stime_seconds
synapse_http_server_response_db_txn_count:total ->
synapse_http_server_response_db_txn_count
synapse_http_server_response_db_txn_duration:total
synapse_http_server_response_db_txn_duration_seconds
2018-01-15 17:09:44 +00:00
Richard van der Hoff
992018d1c0
mechanism to render metrics with alternative names
2018-01-15 17:04:39 +00:00
Richard van der Hoff
80fa610f9c
Add some comments to metrics classes
2018-01-15 16:52:52 +00:00
Richard van der Hoff
5e16c1dc8c
Merge pull request #2778 from matrix-org/rav/counters_should_be_floats
...
Make Counter render floats
2018-01-15 14:09:53 +00:00
Richard van der Hoff
19d274085f
Make Counter render floats
...
Prometheus handles all metrics as floats, and sometimes we store non-integer
values in them (notably, durations in seconds), so let's render them as floats
too.
(Note that the standard client libraries also treat Counters as floats.)
2018-01-12 23:49:44 +00:00
Richard van der Hoff
0fc2362d37
Merge pull request #2777 from matrix-org/rav/fix_remote_thumbnails
...
Reinstate media download on thumbnail request
2018-01-12 19:12:31 +00:00
Richard van der Hoff
21bf87a146
Reinstate media download on thumbnail request
...
We need to actually download the remote media when we get a request for a
thumbnail.
2018-01-12 15:38:06 +00:00
Erik Johnston
694f1c1b18
Fix up comments
2018-01-12 15:02:46 +00:00
Erik Johnston
e21370ba54
Correctly reraise exception
2018-01-12 14:44:02 +00:00
Erik Johnston
85a4d78213
Make Responder a context manager
2018-01-12 13:32:03 +00:00
Erik Johnston
dcc8eded41
Add missing class var
2018-01-12 13:16:27 +00:00
Erik Johnston
fefeb0ab0e
Merge pull request #2774 from matrix-org/erikj/synctl
...
When using synctl with workers, don't start the main synapse automatically
2018-01-12 12:00:07 +00:00
Erik Johnston
81391fa162
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/media_storage_refactor
2018-01-12 11:28:49 +00:00
Erik Johnston
1e4edd1717
Remove unnecessary condition
2018-01-12 11:28:32 +00:00
Erik Johnston
c6c009603c
Remove unused variables
2018-01-12 11:24:05 +00:00
Erik Johnston
4d88958cf6
Make class var local
2018-01-12 11:23:54 +00:00
Erik Johnston
227c491510
Comments
2018-01-12 11:22:41 +00:00
Erik Johnston
f4d93ae424
Actually make it work
2018-01-12 10:39:27 +00:00
Erik Johnston
f68e4cf690
Refactor
2018-01-12 10:11:12 +00:00
Richard van der Hoff
5f23b6d5ea
Merge pull request #2766 from matrix-org/rav/room_event
...
Add /room/{id}/event/{id} to synapse
2018-01-11 14:47:18 +00:00
Erik Johnston
7cd34512d8
When using synctl with workers, don't start the main synapse automatically
2018-01-11 11:37:39 +00:00
Erik Johnston
07ab948c38
Merge branch 'master' of github.com:matrix-org/synapse into develop
2018-01-11 11:23:40 +00:00
Erik Johnston
825a07a974
Merge pull request #2773 from matrix-org/erikj/hash_bg
...
Do bcrypt hashing in a background thread
2018-01-10 18:11:41 +00:00
Erik Johnston
f8e1ab5fee
Do bcrypt hashing in a background thread
2018-01-10 18:01:28 +00:00
Erik Johnston
b9e4a97922
Merge pull request #2772 from matrix-org/t3chguy/patch-1
...
Fix publicised groups GET API (singular) over federation
2018-01-10 15:15:48 +00:00
Michael Telatynski
5f07f5694c
fix order of operations derp and also use .get to default to {}
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
2018-01-10 15:11:35 +00:00
Michael Telatynski
8c9d5b4873
Fix publicised groups API (singular) over federation
...
which was missing its fed client API, since there is no other API
it might as well reuse the bulk one and unwrap it
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
2018-01-10 15:04:51 +00:00
Richard van der Hoff
c175a5f0f2
Merge pull request #2770 from matrix-org/rav/fix_request_metrics
...
Update http request metrics before calling servlet
2018-01-10 14:53:40 +00:00
Richard van der Hoff
d90e8ea444
Update http request metrics before calling servlet
...
Make sure that we set the servlet name in the metrics object *before* calling
the servlet, in case the servlet throws an exception.
2018-01-09 18:27:35 +00:00
hera
174eacc8ba
oops
2018-01-09 18:14:32 +00:00
Matthew Hodgson
a66f489678
fix GIST->GIN switch
2018-01-09 16:55:51 +00:00
Matthew Hodgson
e79db0a673
switch back from GIST to GIN indexes
2018-01-09 16:37:48 +00:00
Matthew Hodgson
e365ad329f
oops, tweak work_mem when actually storing
2018-01-09 16:30:30 +00:00
Matthew Hodgson
19f9227643
avoid 80s GIN inserts by tweaking work_mem
...
see https://github.com/matrix-org/synapse/issues/2753 for details
2018-01-09 16:25:04 +00:00
Erik Johnston
8f03aa9f61
Add StorageProvider concept
2018-01-09 16:16:12 +00:00
Erik Johnston
2442e9876c
Make PreviewUrlResource use MediaStorage
2018-01-09 16:15:07 +00:00
Erik Johnston
9d30a7691c
Make ThumbnailResource use MediaStorage
2018-01-09 16:15:07 +00:00
Erik Johnston
9e20840e02
Use MediaStorage for remote media
2018-01-09 16:15:07 +00:00
Erik Johnston
dd3092c3a3
Use MediaStorage for local files
2018-01-09 16:15:07 +00:00
Erik Johnston
ada470bccb
Add MediaStorage class
2018-01-09 16:15:07 +00:00
Erik Johnston
1ee787912b
Add some helper classes
2018-01-09 16:15:07 +00:00
Erik Johnston
47ca5eb882
Split out add_file_headers
2018-01-09 16:15:07 +00:00
Erik Johnston
ce3a726fc0
Merge pull request #2764 from matrix-org/erikj/remove_dead_thumbnail_code
...
Remove dead code related to default thumbnails
2018-01-09 16:01:02 +00:00
Erik Johnston
b6c9deffda
Remove dead TODO
2018-01-09 15:53:23 +00:00
Richard van der Hoff
51c9d9ed65
Add /room/{id}/event/{id} to synapse
...
Turns out that there is a valid usecase for retrieving event by id (notably
having received a push), but event ids should be scoped to room, so /event/{id}
is wrong.
2018-01-09 14:39:12 +00:00
Erik Johnston
b30cd5b107
Remove dead code related to default thumbnails
2018-01-09 14:38:33 +00:00
Richard van der Hoff
a767f06e3f
Merge pull request #2765 from matrix-org/rav/fix_room_uts
...
Fix flaky test_rooms UTs
2018-01-09 14:21:03 +00:00
Richard van der Hoff
cb66a2d387
Merge pull request #2763 from matrix-org/rav/fix_config_uts
...
Fix broken config UTs
2018-01-09 12:08:08 +00:00
Richard van der Hoff
aed4e4ecdd
Merge pull request #2762 from matrix-org/rav/fix_logconfig_indenting
...
Make indentation of generated log config consistent
2018-01-09 12:07:56 +00:00
Richard van der Hoff
f8fa5ae4af
enable twisted delayedcall debugging in UTs
2018-01-09 12:06:45 +00:00
Richard van der Hoff
374c4d4ced
Remove dead code
...
pointless function is pointless
2018-01-09 12:06:45 +00:00
Richard van der Hoff
142fb0a7d4
Disable user_directory updates for UTs
...
Fix flakiness in the UTs caused by the user_directory being updated in the
background
2018-01-09 12:06:45 +00:00
Richard van der Hoff
0211464ba2
Fix broken config UTs
...
https://github.com/matrix-org/synapse/pull/2755 broke log-config generation,
which in turn broke the unit tests.
2018-01-09 11:28:33 +00:00
Richard van der Hoff
3a556f1ea0
Make indentation of generated log config consistent
...
(we had a mix of 2- and 4-space indents)
2018-01-09 11:27:19 +00:00
Erik Johnston
e9f7677170
Merge pull request #2761 from turt2live/patch-1
...
Fix templating error with unban permission message
2018-01-08 10:10:49 +00:00
Travis Ralston
eccfc8e928
Fix templating error with unban permission message
...
Fixes https://github.com/matrix-org/synapse/issues/2759
Signed-off-by: Travis Ralston <travpc@gmail.com >
2018-01-07 19:52:58 -07:00
Richard van der Hoff
e6b24663e4
Merge pull request #2755 from matrix-org/richvdh-patch-1
...
Remove 'verbosity'/'log_file' from generated cfg
2018-01-05 14:17:46 +00:00
Richard van der Hoff
840f72356e
Remove 'verbosity'/'log_file' from generated cfg
...
... because these only really exist to confuse people nowadays.
Also bring log config more into line with the generated log config, by making `level_for_storage`
apply to the `synapse.storage.SQL` logger rather than `synapse.storage`.
2018-01-05 12:30:28 +00:00
Erik Johnston
18e3a16e8b
Merge branch 'release-v0.26.0' of github.com:matrix-org/synapse
2018-01-05 10:54:22 +00:00
Erik Johnston
864a6d2977
Bump version and changelog
2018-01-05 10:54:01 +00:00
Richard van der Hoff
6e375f4597
Merge pull request #2744 from matrix-org/rav/login_logging
...
Better logging when login can't find a 3pid
2018-01-05 09:54:39 +00:00
Richard van der Hoff
efdfd5c835
Merge pull request #2745 from matrix-org/rav/assert_params
...
Check missing fields in event_from_pdu_json
2018-01-05 09:52:39 +00:00
Richard van der Hoff
bd91857028
Check missing fields in event_from_pdu_json
...
Return a 400 rather than a 500 when somebody messes up their send_join
2017-12-30 18:40:19 +00:00
Richard van der Hoff
3079f80d4a
Factor out event_from_pdu_json
...
turns out we have two copies of this, and neither needs to be an instance
method
2017-12-30 18:40:19 +00:00
Richard van der Hoff
65abc90fb6
federation_server: clean up imports
2017-12-30 18:40:19 +00:00
Richard van der Hoff
a7b726ad18
federation_client: clean up imports
2017-12-30 18:40:19 +00:00
Richard van der Hoff
75c1b8df01
Better logging when login can't find a 3pid
2017-12-20 19:31:00 +00:00
Richard van der Hoff
3f9f1c50f3
Merge pull request #2683 from seckrv/fix_pwd_auth_prov_typo
...
synapse/config/password_auth_providers: Fixed bracket typo
2017-12-18 22:37:21 +00:00
Richard van der Hoff
48fa4e1e5b
Merge pull request #2435 from silkeh/listen-ipv6-default
...
Adapt the default config to bind on both IPv4 and IPv6 on all platforms
2017-12-18 22:34:50 +00:00
Silke
df0f602796
Implement listen_tcp method in remaining workers
...
Signed-off-by: Silke <silke@slxh.eu >
2017-12-18 20:00:42 +01:00
Silke
26cd3f5690
Remove logger argument and do not catch replication listener
...
Signed-off-by: Silke <silke@slxh.eu >
2017-12-18 20:00:42 +01:00
Matthew Hodgson
3355ce650d
Merge pull request #2737 from Valodim/master
...
mention federation tester more prominently in the readme
2017-12-17 23:05:17 +00:00
Silke Hofstra
ed48ecc58c
Add methods for listening on multiple addresses
...
Add listen_tcp and listen_ssl which implement Twisted's reactor.listenTCP
and reactor.listenSSL for multiple addresses.
Signed-off-by: Silke Hofstra <silke@slxh.eu >
2017-12-17 13:15:48 +01:00
Silke Hofstra
37d1a90025
Allow binds to both :: and 0.0.0.0
...
Binding on 0.0.0.0 when :: is specified in the bind_addresses is now allowed.
This causes a warning explaining the behaviour.
Configuration changed to match.
See #2232
Signed-off-by: Silke Hofstra <silke@slxh.eu >
2017-12-17 13:10:31 +01:00
Willem Mulder
3e59143ba8
Adapt the default config to bind on IPv6.
...
Most deployments are on Linux (or Mac OS), so this would actually bind
on both IPv4 and IPv6.
Resolves #1886 .
Signed-off-by: Willem Mulder <willemmaster@hotmail.com >
2017-12-17 13:07:37 +01:00
Vincent Breitmoser
9419bb5776
mention federation tester more prominently in the readme
2017-12-16 22:09:53 +02:00
Erik Johnston
80573e3900
Fix rc version number
2017-12-13 15:15:33 +00:00
Erik Johnston
069ae2a5d6
Bump changelog and version
2017-12-13 15:11:22 +00:00
Erik Johnston
ba24576f2f
Merge pull request #2717 from matrix-org/erikj/createroom_content
...
Fix wrong avatars when inviting multiple users when creating room
2017-12-07 20:00:34 +00:00
Erik Johnston
d8a6c734fa
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/createroom_content
2017-12-07 14:24:01 +00:00
Erik Johnston
ef045dcd71
Copy dict in update_membership too
2017-12-07 14:17:15 +00:00
Matthew Hodgson
33cb7ef0b7
Merge pull request #2723 from matrix-org/matthew/search-all-local-users
...
Add all local users to the user_directory and optionally search them
2017-12-05 11:09:47 +00:00
Matthew Hodgson
cdc2cb5d11
fix StoreError syntax
2017-12-05 11:09:31 +00:00
Richard van der Hoff
16ec3805e5
Fix error when deleting devices
...
This was introduced in d7ea8c4 / PR #2728
2017-12-05 09:49:22 +00:00
Richard van der Hoff
8529874368
Merge pull request #2729 from matrix-org/rav/custom_ui_auth
...
support custom login types for validating users
2017-12-05 09:43:43 +00:00
Richard van der Hoff
da1010c83a
support custom login types for validating users
...
Wire the custom login type support from password providers into the UI-auth
user-validation flows.
2017-12-05 09:43:30 +00:00
Richard van der Hoff
cc58e177f3
Merge pull request #2728 from matrix-org/rav/validate_user_via_ui_auth
...
Factor out a validate_user_via_ui_auth method
2017-12-05 09:42:46 +00:00
Richard van der Hoff
d7ea8c4800
Factor out a validate_user_via_ui_auth method
...
Collect together all the places that validate a logged-in user via UI auth.
2017-12-05 09:42:30 +00:00
Richard van der Hoff
aa6ecf0984
Merge pull request #2727 from matrix-org/rav/refactor_ui_auth_return
...
Refactor UI auth implementation
2017-12-05 09:40:38 +00:00
Richard van der Hoff
d5f9fb06b0
Refactor UI auth implementation
...
Instead of returning False when auth is incomplete, throw an exception which
can be caught with a wrapper.
2017-12-05 09:40:05 +00:00
Matthew Hodgson
c22e73293a
speed up the rate of initial spam for users
2017-12-04 18:05:28 +00:00
Matthew Hodgson
b11dca2025
better doc
2017-12-04 17:51:33 +00:00
Matthew Hodgson
7b86c1fdcd
try make tests work a bit more...
2017-12-04 17:10:03 +00:00
Richard van der Hoff
58ebdb037c
Merge pull request #2716 from matrix-org/rav/federation_client_post
...
federation_client script: Support for posting content
2017-12-04 17:04:08 +00:00
Matthew Hodgson
95f8a713dc
erik told me to
2017-12-04 16:56:25 +00:00
Matthew Hodgson
74e0cc74ce
fix pep8 and tests
2017-12-04 15:11:38 +00:00
Matthew Hodgson
1bd40ca73e
switch to a simpler 'search_all_users' button as per review feedback
2017-12-04 14:58:39 +00:00
Matthew Hodgson
f397153dfc
Merge branch 'develop' into matthew/search-all-local-users
2017-11-30 01:51:38 +00:00
Matthew Hodgson
5406392f8b
specify default user_directory_include_pattern
2017-11-30 01:45:34 +00:00
Matthew Hodgson
f61e107f63
remove null constraint on user_dir.room_id
2017-11-30 01:43:50 +00:00
Matthew Hodgson
4b1fceb913
fix alternation operator for FTS4 - how did this ever work!?
2017-11-30 01:34:03 +00:00
Matthew Hodgson
a4bb133b68
fix thinkos galore
2017-11-30 01:17:15 +00:00
Matthew Hodgson
cd3697e8b7
kick the user_directory index when new users register
2017-11-29 18:33:34 +00:00
Matthew Hodgson
3241c7aac3
untested WIP but might actually work
2017-11-29 18:27:05 +00:00
Richard van der Hoff
624c46eb06
Merge pull request #2721 from matrix-org/rav/get_user_by_access_token_comments
...
Improve comments on get_user_by_access_token
2017-11-29 17:57:06 +00:00
Richard van der Hoff
7a48a6b63e
Merge pull request #2722 from matrix-org/rav/delete_device_on_logout
...
Delete devices and pushers on logouts etc
2017-11-29 17:56:46 +00:00
Matthew Hodgson
47d99a20d5
Add user_directory_include_pattern config param to expand search results to additional users
...
Initial commit; this doesn't work yet - the LIKE filtering seems too aggressive.
It also needs _do_initial_spam to be aware of prepopulating the whole user_directory_search table with all users...
...and it needs a handle_user_signup() or something to be added so that new signups get incrementally added to the table too.
Committing it here as a WIP
2017-11-29 16:46:45 +00:00
Richard van der Hoff
ad7e570d07
Delete devices in various logout situations
...
Make sure that we delete devices whenever a user is logged out due to any of
the following situations:
* /logout
* /logout_all
* change password
* deactivate account (by the user or by an admin)
* invalidate access token from a dynamic module
Fixes #2672 .
2017-11-29 16:44:35 +00:00
Richard van der Hoff
ae31f8ce45
Move set_password into its own handler
...
Non-functional refactoring to move set_password. This means that we'll be able
to properly deactivate devices and access tokens without introducing a
dependency loop.
2017-11-29 16:44:35 +00:00
Richard van der Hoff
7ca5c68233
Move deactivate_account into its own handler
...
Non-functional refactoring to move deactivate_account. This means that we'll be
able to properly deactivate devices and access tokens without introducing a
dependency loop.
2017-11-29 16:44:35 +00:00
Richard van der Hoff
2c6d63922a
Remove pushers when deleting access tokens
...
Whenever an access token is invalidated, we should remove the associated
pushers.
2017-11-29 16:44:35 +00:00
Richard van der Hoff
97d1a1dc01
Merge pull request #2718 from matrix-org/rav/notify_logcontexts
...
Clear logcontext before starting fed txn queue runner
2017-11-29 16:01:46 +00:00
Richard van der Hoff
8b45de90a4
Merge pull request #2719 from matrix-org/rav/handle_missing_hashes
...
Fix 500 when joining matrix-dev
2017-11-29 16:01:33 +00:00
Richard van der Hoff
7303ed65e1
Fix 500 when joining matrix-dev
...
matrix-dev has an event (`$/6ANj/9QWQyd71N6DpRQPf+SDUu11+HVMeKSpMzBCwM:zemos.net`)
which has no `hashes` member.
Check for missing `hashes` element in events.
2017-11-29 16:00:46 +00:00
Richard van der Hoff
da562bd6a1
Improve comments on get_user_by_access_token
...
because I have to reverse-engineer this every time.
2017-11-29 15:52:41 +00:00
Richard van der Hoff
d4fb4f7c52
Clear logcontext before starting fed txn queue runner
...
These processes take a long time compared to the request, so there is lots of
"Entering|Restoring dead context" in the logs. Let's try to shut it up a bit.
2017-11-28 15:26:14 +00:00
Erik Johnston
dfbc45302e
PEP8
2017-11-28 15:23:26 +00:00
Erik Johnston
c4c1d170af
Fix wrong avatars when inviting multiple users when creating room
...
We reused the `content` dictionary between invite requests, which meant they could end up reusing the profile info for a previous user
2017-11-28 15:19:15 +00:00
Richard van der Hoff
fd04968f32
federation_client script: Support for posting content
2017-11-28 11:59:24 +00:00
Luke Barnard
c2a1194424
Merge pull request #2715 from matrix-org/luke/group-guest-access
...
Allow guest access to group APIs for reading
2017-11-28 11:58:54 +00:00
Luke Barnard
ab1b2d0ff2
Allow guest access to group APIs for reading
2017-11-28 11:23:00 +00:00
Richard van der Hoff
5a4da5bf78
Merge pull request #2697 from matrix-org/rav/fix_urlcache_index_error
...
Fix error on sqlite 3.7
2017-11-27 12:25:48 +00:00
Richard van der Hoff
84b31a3e7a
Merge pull request #2713 from matrix-org/rav/no_upsert_forever
...
Avoid retrying forever on IntegrityError
2017-11-27 12:19:35 +00:00
Richard van der Hoff
df6c72ede3
Merge pull request #2711 from matrix-org/rav/fix_dns_errhandler
...
Fix error handling on dns lookup
2017-11-27 12:19:18 +00:00
Richard van der Hoff
04bb79f139
Merge pull request #2710 from matrix-org/rav/remove_dead_code
...
Tiny code cleanups
2017-11-27 12:15:44 +00:00
Richard van der Hoff
e828a7380a
Merge pull request #2708 from matrix-org/rav/replication_logcontext_leaks
...
Fix some logcontext leaks in replication resource
2017-11-27 12:15:33 +00:00
Richard van der Hoff
7ef22a41a3
Merge pull request #2707 from matrix-org/rav/fix_urlpreview
...
Fix OPTIONS on preview_url
2017-11-27 12:15:14 +00:00
Richard van der Hoff
96387bd26f
Merge pull request #2705 from matrix-org/rav/improve_tracebacks
...
Improve tracebacks on exceptions
2017-11-27 12:07:52 +00:00
Richard van der Hoff
6be01f599b
Improve tracebacks on exceptions
...
Use failure.Failure to recover our failure, which will give us a useful
stacktrace, unlike the rethrown exception.
2017-11-27 12:05:58 +00:00
Richard van der Hoff
63ccaa5873
Avoid retrying forever on IntegrityError
2017-11-27 12:00:07 +00:00
Richard van der Hoff
8b38096a89
Fix error handling on dns lookup
...
pass the right arguments to the errback handler
Fixes "TypeError('eb() takes exactly 2 arguments (1 given)',)"
2017-11-24 16:47:48 +00:00
Richard van der Hoff
795b0849f3
Add a comment which might save some confusion
2017-11-24 00:34:56 +00:00
Richard van der Hoff
7f14f0ae38
Remove dead sync_callback
...
This is never used; let's remove it to stop confusing things.
2017-11-24 00:32:04 +00:00
Richard van der Hoff
0edf085b68
Fix some logcontext leaks in replication resource
...
The @measure_func annotations rely on the wrapped function respecting the
logcontext rules. Add the necessary yields to make this work.
2017-11-23 23:19:43 +00:00
Richard van der Hoff
8132a6b7ac
Fix OPTIONS on preview_url
...
Fixes #2706
2017-11-23 17:52:31 +00:00
Richard van der Hoff
6b48b3e277
fix sql fails
2017-11-22 18:06:24 +00:00
Richard van der Hoff
2908f955d1
Check database in has_completed_background_updates
...
so that the right thing happens on workers.
2017-11-22 18:02:15 +00:00
Richard van der Hoff
79eba878a7
Merge pull request #2701 from matrix-org/rav/one_mediarepo_to_rule_them_all
...
Try to avoid having multiple PreviewUrlResource instances
2017-11-22 16:46:09 +00:00
Richard van der Hoff
68ca864141
Add config option to disable media_repo on main synapse
...
... to stop us doing the cache cleanup jobs on the master.
2017-11-22 16:20:27 +00:00
Richard van der Hoff
e1fd4751de
Build MediaRepositoryResource as a homeserver dependency
...
This avoids the scenario where we have four different PreviewUrlResources
configured on a single app, each of which have their own caches and cache
clearing jobs.
2017-11-22 16:19:49 +00:00
Richard van der Hoff
148c113fbe
Merge pull request #2700 from matrix-org/rav/worker_docs
...
* Improve documentation of workers
Fixes https://github.com/matrix-org/synapse/issues/2554
2017-11-21 18:28:40 +00:00
Richard van der Hoff
a0c6688976
Improve documentation of workers
...
Fixes https://github.com/matrix-org/synapse/issues/2554
2017-11-21 18:28:13 +00:00
Richard van der Hoff
d5a7c56ef9
Merge pull request #2698 from matrix-org/rav/remove_dead_dependencies
...
Clean up dependency list
2017-11-21 17:38:42 +00:00
Richard van der Hoff
0b4aa2dc21
Merge pull request #2689 from matrix-org/rav/unlock_account_data_upsert
...
Avoid locking account_data tables for upserts
2017-11-21 13:39:14 +00:00
Matthew Hodgson
3ab2cfec47
sanity checks
2017-11-21 12:10:20 +00:00
Richard van der Hoff
7298ed7c51
Clean up dependency list
...
remove those that aren't used at all, and replace the ones that don't have
builders with simple getters rather than dynamically-generated methods.
2017-11-21 11:15:41 +00:00
Richard van der Hoff
7098b65cb8
Fix error on sqlite 3.7
...
Create the url_cache index on local_media_repository as a background update, so
that we can detect whether we are on sqlite or not and create a partial or
complete index accordingly.
To avoid running the cleanup job before we have built the index, add a bailout
which will defer the cleanup if the bg updates are still running.
Fixes https://github.com/matrix-org/synapse/issues/2572 .
2017-11-21 11:14:17 +00:00
Oliver Kurz
83d8d4d8cd
Allow use of higher versions of saml2
...
The package was pinned to <4.0 with 07cf96eb because "from saml2 import
config" did not work. This seems to have been fixed in the mean time in the
saml2 package and therefore should not stop to use a more recent version.
Signed-off-by: Oliver Kurz <okurz@suse.de >
2017-11-20 11:14:39 +01:00
Matthew Hodgson
2145ee1976
don't double-invite in sync_room_to_group.pl
2017-11-19 00:48:47 +00:00
Richard van der Hoff
59a7275258
Merge pull request #2688 from matrix-org/rav/unlock_more_upsert
...
Avoid locking for upsert on pushers tables
2017-11-17 13:09:31 +00:00
Richard van der Hoff
d8a05418f9
Merge branch 'master' into develop
2017-11-17 12:13:14 +00:00
Richard van der Hoff
b102e93571
Merge branch 'release-v0.25.1'
2017-11-17 12:03:07 +00:00
Luke Barnard
cdf6fc15b0
Merge pull request #2686 from matrix-org/luke/as-flair
...
Add automagical AS Publicised Group(s)
2017-11-17 10:13:46 +00:00
Richard van der Hoff
74bbeb4373
Bump version in __init__.py
2017-11-17 10:10:53 +00:00
Richard van der Hoff
2187724ad2
Prep changelog for v0.25.1
2017-11-17 10:09:16 +00:00
Jurek
eded7084d2
Fix auth handler #2678
2017-11-17 10:07:27 +00:00
Matthew Hodgson
34c3d0a386
typo
2017-11-17 01:54:02 +00:00
Matthew Hodgson
9d50b6f0ea
quick and dirty room membership<->group membership sync script
2017-11-17 01:54:02 +00:00
Luke Barnard
ab1dc84779
Add extra space before inline comment
2017-11-16 18:22:40 +00:00
Luke Barnard
7fb0e98b03
Extract group_id from the dict for multiple use
2017-11-16 18:18:30 +00:00
Luke Barnard
e836bdf734
Fix tests
2017-11-16 18:14:39 +00:00
Richard van der Hoff
c46139a17e
Avoid locking account_data tables for upserts
2017-11-16 18:08:01 +00:00
Luke Barnard
d8391f0541
Remove unused GROUP_ID_REGEX
2017-11-16 18:05:57 +00:00
Luke Barnard
4e8374856d
Document get_groups_for_user
2017-11-16 18:03:46 +00:00
Luke Barnard
270f9cd23a
Flake8
2017-11-16 18:03:31 +00:00
Luke Barnard
9d83d52027
Use a generator instead of a list
2017-11-16 17:57:34 +00:00
Luke Barnard
5b48eec4a1
Make sure we check AS groups for lookup on bulk
2017-11-16 17:55:15 +00:00
Luke Barnard
b1edf26051
Check group_id belongs to this domain
2017-11-16 17:54:27 +00:00
Richard van der Hoff
06e5bcfc83
Avoid locking for upsert on pushers tables
...
* replace the upsert into deleted_pushers with an insert
* no need to lock for upsert on pusher_throttle
2017-11-16 17:52:23 +00:00
Jurek
624a8bbd67
Fix auth handler #2678
2017-11-16 17:19:02 +00:00
Richard van der Hoff
b26cbbb60e
Revert "Merge pull request #2679 from jkolo/fix_auth_handler"
...
This PR was against master, not develop :(
This reverts commit 203058a027 , reversing
changes made to 552f123bea .
2017-11-16 17:18:11 +00:00
Richard van der Hoff
203058a027
Merge pull request #2679 from jkolo/fix_auth_handler
...
Fix auth handler
2017-11-16 17:09:00 +00:00
Luke Barnard
97bd18af4e
Add automagical AS Publicised Group(s)
...
via registration file "users" namespace:
```YAML
...
namespaces:
users:
- exclusive: true
regex: '.*luke.*'
group_id: '+all_the_lukes:hsdomain'
...
```
This is part of giving App Services their own groups for matching users. With this, ghost users will be given the appeareance that they are in a group and that they have publicised the fact, but _only_ from the perspective of the `get_publicised_groups_for_user` API.
2017-11-16 16:44:55 +00:00
Richard van der Hoff
ba05f28ae7
Merge pull request #2684 from matrix-org/rav/unlock_upsert
...
Start work on avoiding table locks for upserts
2017-11-16 16:27:29 +00:00
Richard van der Hoff
77a1227870
Fix broken ref to IntegrityError
2017-11-16 16:03:38 +00:00
Richard van der Hoff
7ab2b69e18
Avoid locking pushers table on upsert
...
Now that _simple_upsert will retry on IntegrityError, we don't need to lock the
table.
2017-11-16 15:32:01 +00:00
Richard van der Hoff
10aaa1bc15
_simple_upsert: retry on IntegrityError
...
wrap the call to _simple_upsert_txn in a loop so that we retry on an
integrityerror: this means we can avoid locking the table provided there is an
unique index.
2017-11-16 15:30:15 +00:00
Richard van der Hoff
cdc9e50a5d
Cleanup in _simple_upsert_txn
...
Bail out early to reduce indentation
2017-11-16 15:29:10 +00:00
Richard von Seck
6f05de0e5e
synapse/config/password_auth_providers: Fixed bracket typo
...
Signed-off-by: Richard von Seck <richard.von-seck@gmx.net >
2017-11-16 15:59:38 +01:00
Jurek
56e2a4333e
Fix auth handler #2678
2017-11-15 22:49:43 +01:00
Richard van der Hoff
f959c01600
Merge pull request #2661 from matrix-org/rav/statereadstore
...
Pull out bits of StateStore to a mixin
2017-11-15 17:23:01 +00:00
Richard van der Hoff
117a8c0d35
Merge pull request #2677 from matrix-org/rav/spec_r0.3.0
...
Declare support for r0.3.0
2017-11-15 17:10:45 +00:00
Richard van der Hoff
30d2730ee2
Declare support for r0.3.0
2017-11-15 16:24:22 +00:00
Erik Johnston
aa812feb41
Merge branch 'master' of github.com:matrix-org/synapse into develop
2017-11-15 11:35:34 +00:00
Erik Johnston
552f123bea
Merge branch 'release-v0.25.0' of github.com:matrix-org/synapse
2017-11-15 11:32:24 +00:00
Erik Johnston
5d0cbf763f
Bump changelog
2017-11-15 11:29:32 +00:00
Richard van der Hoff
1b83c09c03
Merge pull request #2675 from matrix-org/rav/remove_broken_logcontext_funcs
...
Remove preserve_context_over_{fn, deferred}
2017-11-15 11:13:53 +00:00
David Baker
7190a550dc
Merge pull request #2650 from matrix-org/dbkr/push_include_content_option
...
Rename redact_content option to include_content
2017-11-15 10:47:38 +00:00
Richard van der Hoff
b2cd6accf5
Remove __PreservingContextDeferred too
2017-11-14 23:00:10 +00:00
Andrew Conrad
053ecae4db
Mention SyTest in the README, after Development
...
Signed-off-by: Andrew Conrad <aconrad103@gmail.com >
2017-11-14 15:11:35 -06:00
Richard van der Hoff
038c994724
Merge pull request #2648 from krombel/update_prometheus
...
update prometheus-config to new format
2017-11-14 19:14:32 +00:00
Krombel
c161472575
Make clear that the config has changed since prometheus v2
...
This restores the config that is usable for prometheus pre v2.0.0
The new config only works for Prometheus v2+
2017-11-14 19:59:26 +01:00
Richard van der Hoff
008aa2fc6d
Merge pull request #2671 from matrix-org/rav/room_list_fixes
...
Reshuffle room list request code
2017-11-14 18:11:02 +00:00
Richard van der Hoff
6f30fd9235
Merge pull request #2673 from matrix-org/erikj/fix_port_script_groups
...
Add new boolean columns to port script
2017-11-14 16:03:41 +00:00
Erik Johnston
9ecf621404
Less s's
2017-11-14 15:55:15 +00:00
Erik Johnston
22db751d1e
Add new boolean columns to port script
2017-11-14 15:48:50 +00:00
Erik Johnston
03feb7a34d
Bump version and changelog
2017-11-14 14:51:25 +00:00
Richard van der Hoff
35a4b63240
Pull out bits of StateStore to a mixin
...
... so that we don't need to secretly gut-wrench it for use in the slaved
stores. I haven't done the other stores yet, but we should. I'm tired of the
workers breaking every time we tweak the stores because I forgot to gut-wrench
the right method.
fixes https://github.com/matrix-org/synapse/issues/2655 .
2017-11-14 11:43:58 +00:00
Richard van der Hoff
4dd1bfa8c1
Revert "Revert "move _state_group_cache to statestore""
...
We're going to fix this properly on this branch, so that the _state_group_cache
can end up in StateGroupReadStore.
This reverts commit ab335edb02 .
2017-11-14 11:43:58 +00:00
Richard van der Hoff
6caa379ba1
Merge pull request #2658 from matrix-org/rav/store_heirarchy_init
...
Make __init__ consistent across Store hierarchy
2017-11-14 11:43:12 +00:00
Richard van der Hoff
7e6fa29cb5
Remove preserve_context_over_{fn, deferred}
...
Both of these functions ae known to leak logcontexts. Replace the remaining
calls to them and kill them off.
2017-11-14 11:22:42 +00:00
Richard van der Hoff
44a1bfd6a6
Reshuffle room list request code
...
I'm not entirely sure if this will actually help anything, but it simplifies
the code and might give further clues about why room list search requests are
blowing out the get_current_state_ids caches.
2017-11-14 10:29:58 +00:00
Richard van der Hoff
1fc66c7460
Add a load of logging to the room_list handler
...
So we can see what it gets up to.
2017-11-14 10:23:47 +00:00
Richard van der Hoff
7bd6c87eca
Merge pull request #2668 from turt2live/travis/whoami
...
Add a route for determining who you are
2017-11-14 09:54:21 +00:00
Travis Ralston
812c191939
Remove redundent call
...
Signed-off-by: Travis Ralston <travpc@gmail.com >
2017-11-13 12:44:21 -07:00
Richard van der Hoff
c741ba59c9
Merge pull request #2669 from matrix-org/rav/cache_urlpreview_failure
...
Cache failures in url_preview handler
2017-11-13 18:36:24 +00:00
Richard van der Hoff
781c15a6a3
Merge pull request #2663 from matrix-org/rav/invalid_request_utf8
...
Fix 500 on invalid utf-8 in request
2017-11-13 18:35:24 +00:00
David Baker
45ab288e07
Print instead of logging
...
because we had to wait until the logger was set up
2017-11-13 18:32:08 +00:00
Richard van der Hoff
8b33ac8f6c
Merge branch 'develop' into rav/invalid_request_utf8
2017-11-13 11:56:22 +00:00
Richard van der Hoff
63ef607f1f
Fix tests for Store.__init__ update
...
Fix the test to pass the right number of args to the Store constructors
2017-11-13 10:46:08 +00:00
Richard van der Hoff
6cfee09be9
Make __init__ consitstent across Store heirarchy
...
Add db_conn parameters to the `__init__` methods of the *Store classes, so that
they are all consistent, which makes the multiple inheritance work correctly
(and so that we can later extract mixins which can be used in the slavedstores)
2017-11-13 10:46:07 +00:00
Erik Johnston
ab335edb02
Revert "move _state_group_cache to statestore"
...
This reverts commit f5cf3638e9 .
2017-11-13 10:05:33 +00:00
Erik Johnston
bfbf1e1f1a
Up cache size of get_global_account_data_by_type_for_user
2017-11-13 09:52:11 +00:00
Travis Ralston
2d314b771f
Add a route for determining who you are
...
Useful for applications which may have an access token, but no idea as to who owns it.
Signed-off-by: Travis Ralston <travpc@gmail.com >
2017-11-12 23:39:38 -07:00
Richard van der Hoff
5d15abb120
Bit more logging
2017-11-10 16:58:04 +00:00
Richard van der Hoff
46790f50cf
Cache failures in url_preview handler
...
Reshuffle the caching logic in the url_preview handler so that failures are
cached (and to generally simplify things and fix the logcontext leaks).
2017-11-10 16:50:50 +00:00
Richard van der Hoff
4d0414c714
Merge pull request #2662 from matrix-org/rav/fix_mxids_again
...
Downcase userid on registration
2017-11-10 13:57:34 +00:00
Richard van der Hoff
e508145c9b
Add some more comments appservice user registration
...
Explain why we don't validate userids registered via app services
2017-11-10 12:39:45 +00:00
Richard van der Hoff
e0ebd1e4bd
Downcase userids for shared-secret registration
2017-11-10 12:39:05 +00:00
Richard van der Hoff
f90649eb2b
Fix 500 on invalid utf-8 in request
...
If somebody sends us a request where the the body is invalid utf-8, we should
return a 400 rather than a 500. (json.loads throws a UnicodeError in this
situation)
We might as well catch all Exceptions here: it seems very unlikely that we
would get a request that *isn't caused by invalid json.
2017-11-10 09:15:39 +00:00
Richard van der Hoff
9b599bc18d
Downcase userid on registration
...
Force username to lowercase before attempting to register
https://github.com/matrix-org/synapse/issues/2660
2017-11-09 22:20:01 +00:00
Richard van der Hoff
9b803ccc98
Revert "Allow upper-case characters in mxids"
...
This reverts commit b70b646903 .
2017-11-09 21:57:24 +00:00
Richard van der Hoff
1282086f58
Merge pull request #2659 from matrix-org/rav/apparently_we_dont_follow_our_own_spec_now
...
Allow upper-case characters in mxids
2017-11-09 20:06:47 +00:00
Richard van der Hoff
b70b646903
Allow upper-case characters in mxids
...
Because we're never going to be able to fix this :'(
2017-11-09 19:36:13 +00:00
Erik Johnston
2dce6b15c3
Fix typo
2017-11-09 15:56:16 +00:00
Erik Johnston
4e2b2508af
Register group servlet
2017-11-09 15:49:42 +00:00
Luke Barnard
0ea5310290
Merge pull request #2657 from matrix-org/erikj/group_visibility_namespace
...
Namespace visibility options for groups
2017-11-09 15:41:51 +00:00
Erik Johnston
13735843c7
Namespace visibility options for groups
2017-11-09 15:27:18 +00:00
Richard van der Hoff
618c7b816a
Merge pull request #2656 from matrix-org/rav/fix_deactivate
...
Fix 'NoneType' not iterable in /deactivate
2017-11-09 15:20:35 +00:00
Erik Johnston
0fcb5a8ce5
Merge pull request #2651 from matrix-org/erikj/update_group_room_settings
...
Change so that update group room visibility isn't an upsert
2017-11-09 15:20:24 +00:00
Richard van der Hoff
889102315e
Fix 'NoneType' not iterable in /deactivate
...
make sure we actually return a value from user_delete_access_tokens
2017-11-09 15:15:33 +00:00
David Baker
b2a788e902
Make the commented config have the default
2017-11-09 10:11:42 +00:00
Erik Johnston
82e4bfb53d
Add brackets
2017-11-09 10:06:42 +00:00
Erik Johnston
e8814410ef
Have an explicit API to update room config
2017-11-08 16:13:27 +00:00
Erik Johnston
94ff2cda73
Revert "Modify group room association API to allow modification of is_public"
2017-11-08 15:43:34 +00:00
Erik Johnston
d305987b40
Merge pull request #2631 from xyzz/fix_appservice_event_backlog
...
Fix appservices being backlogged and not receiving new events due to a bug in notify_interested_services
2017-11-08 11:54:10 +00:00
Erik Johnston
167eb01d83
Merge pull request #2637 from spantaleev/avoid-noop-media-deletes
...
Avoid no-op media deletes
2017-11-08 11:53:27 +00:00
David Baker
ad408beb66
better comments
2017-11-08 11:50:08 +00:00
David Baker
1b870937ae
Log if any of the old config flags are set
2017-11-08 11:46:24 +00:00
David Baker
2a98ba0ed3
Rename redact_content option to include_content
...
The redact_content option never worked because it read the wrong config
section. The PR introducing it
(https://github.com/matrix-org/synapse/pull/2301 ) had feedback suggesting the
name be changed to not re-use the term 'redact' but this wasn't
incorporated.
This reanmes the option to give it a less confusing name, and also
means that people who've set the redact_content option won't suddenly
see a behaviour change when upgrading synapse, but instead can set
include_content if they want to.
This PR also updates the wording of the config comment to clarify
that this has no effect on event_id_only push.
Includes https://github.com/matrix-org/synapse/pull/2422
2017-11-08 10:35:30 +00:00
Richard van der Hoff
02a9a93bde
Merge pull request #2649 from matrix-org/rav/fix_delta_on_state_res
...
Fix bug in state group storage
2017-11-08 09:22:13 +00:00
Richard van der Hoff
e148438e97
s/items/iteritems/
2017-11-08 09:21:41 +00:00
Ilya Zhuravlev
d46386d57e
Remove useless assignment in notify_interested_services
2017-11-07 22:23:22 +03:00
Matthew Hodgson
228ccf1fe3
Merge pull request #2643 from matrix-org/matthew/user_dir_typos
...
Fix various embarrassing typos around user_directory and add some doc.
2017-11-07 17:31:11 +00:00
Richard van der Hoff
780dbb378f
Update deltas when doing auth resolution
...
Fixes a bug where the persisted state groups were different to those actually
being used after auth resolution.
2017-11-07 16:43:00 +00:00
Richard van der Hoff
1ca4288135
factor out _update_context_for_auth_events
...
This is duplicated, so let's factor it out before fixing it
2017-11-07 16:43:00 +00:00
Richard van der Hoff
f5cf3638e9
move _state_group_cache to statestore
...
this is internal to statestore, so let's keep it there.
2017-11-07 16:43:00 +00:00
Erik Johnston
5ef5e14ecc
Merge pull request #2636 from farialima/me-master
...
Fix for #2635 : correctly update rooms avatar/display name when modified by admin
2017-11-07 13:49:27 +00:00
Erik Johnston
76c9af193c
Revert "Merge branch 'master' of github.com:matrix-org/synapse into develop"
...
This reverts commit f9b255cd62 , reversing
changes made to 1bd654dabd .
2017-11-07 13:32:35 +00:00
Erik Johnston
f9b255cd62
Merge branch 'master' of github.com:matrix-org/synapse into develop
2017-11-07 13:31:03 +00:00
Krombel
44ad6dd4bf
update prometheus-config to new format
2017-11-07 13:35:35 +01:00
Luke Barnard
1bd654dabd
Merge pull request #2647 from matrix-org/luke/get-group-users-is-privileged
...
Return whether a user is an admin within a group
2017-11-07 12:05:11 +00:00
Luke Barnard
38b265cb51
Remember to pick is_admin out of the db
2017-11-07 11:24:04 +00:00
Luke Barnard
5561c09091
Return whether a user is an admin within a group
2017-11-07 11:18:45 +00:00
Matthew Hodgson
3db5ff69b2
Merge pull request #2576 from maximevaillancourt/exclude-noscript-url-preview
...
Ignore <noscript> tags when generating URL preview descriptions
2017-11-07 11:09:22 +00:00
Richard van der Hoff
ec12e7eada
Merge pull request #2646 from matrix-org/rav/logging_for_limiter
...
Logging and logcontext fixes for Limiter
2017-11-07 10:47:00 +00:00
Matthew Hodgson
631fa4a1b7
create new indexes before dropping old ones to keep safetynet in place
2017-11-07 10:41:55 +00:00
Richard van der Hoff
bf993db11c
Logging and logcontext fixes for Limiter
...
Add some logging to the Limiter in a similar spirit to the Linearizer, to help
debug issues.
Also fix a logcontext leak.
Also refactor slightly to avoid throwing exceptions.
2017-11-07 00:48:57 +00:00
Matthew Hodgson
4ad883398f
s/users_in_pubic_room/users_in_public_rooms/g
2017-11-04 19:39:40 +00:00
Matthew Hodgson
d802e8ca6a
s/users_in_pubic_room/users_in_public_rooms/g
2017-11-04 19:38:13 +00:00
Matthew Hodgson
a100700630
fix copyright....
2017-11-04 19:35:49 +00:00
Matthew Hodgson
b6b075fd49
s/popualte/populate/
2017-11-04 19:35:33 +00:00
Matthew Hodgson
d1622e080f
s/intial/initial/
2017-11-04 19:35:14 +00:00
Matthew Hodgson
2ac6deafb7
simplify instructions for regenerating user_dir
2017-11-04 19:34:59 +00:00
Slavi Pantaleev
805196fbeb
Avoid no-op media deletes
...
If there are no media entries to delete,
avoid creating transactions, prepared statements
and unnecessary log entries.
Signed-off-by: Slavi Pantaleev <slavi@devture.com >
2017-11-04 09:50:15 +02:00
Francois Granade
f103b91ffa
removed unused import flagged by flake8a
2017-11-03 18:45:49 +01:00
Francois Granade
fa4f337b49
Fix for issue 2635: correctly update rooms avatar/display name when modified by admin
2017-11-03 18:25:04 +01:00
Ilya Zhuravlev
8a4a0ddea6
Fix appservice tests to account for new behavior of notify_interested_services
2017-11-02 23:19:57 +03:00
Ilya Zhuravlev
45fbe4ff67
Fix appservices being backlogged and not receiving new events due to a bug in notify_interested_services
2017-11-02 22:49:43 +03:00
David Baker
f851bc8182
Merge pull request #2630 from matrix-org/luke/fix-rooms-in-group
...
Make the get_rooms_in_group API more sane
2017-11-02 17:23:17 +00:00
David Baker
9e09a1800b
Merge pull request #2629 from matrix-org/rav/register_inhibit_login
...
support inhibit_login in /register
2017-11-02 16:51:35 +00:00
Luke Barnard
a34c586a89
Make the get_rooms_in_group API more sane
...
Return entries with is_public = True when they're public and is_public = False otherwise.
2017-11-02 16:42:30 +00:00
Richard van der Hoff
6c3a02072b
support inhibit_login in /register
...
Allow things to pass inhibit_login when registering to ... inhibit logins.
2017-11-02 16:31:07 +00:00
David Baker
4a6754baf2
Merge pull request #2628 from matrix-org/rav/module_api_hooks
...
Add more hooks to ModuleApi
2017-11-02 15:37:14 +00:00
David Baker
4b36897cd9
Merge remote-tracking branch 'origin/develop' into rav/module_api_hooks
2017-11-02 15:19:17 +00:00
David Baker
d4553818a0
Merge pull request #2627 from matrix-org/rav/custom_rest_endpoints
...
Add a hook for custom rest endpoints
2017-11-02 15:18:37 +00:00
David Baker
6b6f03ae05
Merge pull request #2626 from matrix-org/rav/refactor_module_api
...
Factor _AccountHandler proxy out to ModuleApi
2017-11-02 15:15:30 +00:00
David Baker
77e3757fa9
Merge pull request #2625 from matrix-org/rav/named_resource_refactor
...
Factor out _configure_named_resource
2017-11-02 15:11:30 +00:00
Richard van der Hoff
6b60f7dca0
Add more hooks to ModuleApi
...
add `get_user_by_req` and `invalidate_access_token`
2017-11-02 14:37:39 +00:00
Richard van der Hoff
fcdfc911ee
Add a hook for custom rest endpoints
...
Let the user specify custom modules which can be used for implementing extra
endpoints.
2017-11-02 14:36:55 +00:00
Richard van der Hoff
1189be43a2
Factor _AccountHandler proxy out to ModuleApi
...
We're going to need to use this from places that aren't password auth, so let's
move it to a proper class.
2017-11-02 14:36:11 +00:00
Richard van der Hoff
6650a07ede
Factor out _configure_named_resource
...
This was a bit of a code vomit, so let's factor it out to preserve some sanity
2017-11-02 14:33:37 +00:00
David Baker
b19d9e2174
Merge pull request #2624 from matrix-org/rav/password_provider_notify_logout
...
Notify auth providers on logout
2017-11-02 10:55:17 +00:00
David Baker
1f080a6c97
Merge pull request #2623 from matrix-org/rav/callbacks_for_auth_providers
...
Allow password_auth_providers to return a callback
2017-11-02 10:49:03 +00:00
David Baker
04897c9dc1
Merge pull request #2622 from matrix-org/rav/db_access_for_auth_providers
...
Let auth providers get to the database
2017-11-02 10:41:25 +00:00
Richard van der Hoff
979eed4362
Fix user-interactive password auth
...
this got broken in the previous commit
2017-11-01 17:03:20 +00:00
Richard van der Hoff
bc8a5c0330
Notify auth providers on logout
...
Provide a hook by which auth providers can be notified of logouts.
2017-11-01 16:51:51 +00:00
Richard van der Hoff
4c8f94ac94
Allow password_auth_providers to return a callback
...
... so that they have a way to record access tokens.
2017-11-01 16:51:03 +00:00
Richard van der Hoff
846a94fbc9
Merge pull request #2620 from matrix-org/rav/auth_non_password
...
Let password auth providers handle arbitrary login types
2017-11-01 16:45:33 +00:00
Richard van der Hoff
3cd6b22c7b
Let password auth providers handle arbitrary login types
...
Provide a hook where password auth providers can say they know about other
login types, and get passed the relevant parameters
2017-11-01 16:43:57 +00:00
David Baker
c9b9ef575b
Merge pull request #2621 from matrix-org/rav/refactor_accesstoken_delete
...
Move access token deletion into auth handler
2017-11-01 16:26:06 +00:00
Matthew Hodgson
275826f234
Merge pull request #2617 from matrix-org/matthew/auto-displayname
...
automatically set default displayname on register
2017-11-01 16:21:16 +00:00
David Baker
4f0488b307
Merge remote-tracking branch 'origin/develop' into rav/refactor_accesstoken_delete
2017-11-01 16:20:19 +00:00
David Baker
e5e930aec3
Merge pull request #2615 from matrix-org/rav/break_auth_device_dep
...
Break dependency of auth_handler on device_handler
2017-11-01 16:06:31 +00:00
David Baker
fbbacb284e
Merge pull request #2613 from matrix-org/rav/kill_refresh_tokens
...
Remove the last vestiges of refresh_tokens
2017-11-01 15:57:35 +00:00
Matthew Hodgson
9f7a555b4e
switch to setting default displayname in the storage layer
...
to avoid clobbering guest user displaynames on registration
2017-11-01 15:51:30 +00:00
Richard van der Hoff
dd13310fb8
Move access token deletion into auth handler
...
Also move duplicated deactivation code into the auth handler.
I want to add some hooks when we deactivate an access token, so let's bring it
all in here so that there's somewhere to put it.
2017-11-01 15:46:22 +00:00
David Baker
691cc4e036
Merge pull request #2618 from matrix-org/dbkr/log_login_requests
...
Log login requests
2017-11-01 14:11:28 +00:00
David Baker
0bb253f37b
Apparently this is python
2017-11-01 14:02:52 +00:00
David Baker
59e7e62c4b
Log login requests
...
Carefully though, to avoid logging passwords
2017-11-01 13:58:01 +00:00
Matthew Hodgson
f8420d6279
automatically set default displayname on register
...
to avoid leaking ugly MXIDs and cluttering up the timeline with
displayname changes as well as membership joins for autojoin rooms
(e.g. the status autojoin rooms), automatically set the displayname
to match the localpart of the mxid upon registration.
2017-11-01 13:15:41 +00:00
Luke Barnard
99354b430e
Merge pull request #2612 from matrix-org/luke/groups-room-relationship-is-public
...
Modify group room association API to allow modification of is_public
2017-11-01 11:08:36 +00:00
Richard van der Hoff
74c56f794c
Break dependency of auth_handler on device_handler
...
I'm going to need to make the device_handler depend on the auth_handler, so I
need to break this dependency to avoid a cycle.
It turns out that the auth_handler was only using the device_handler in one
place which was an edge case which we can more elegantly handle by throwing an
error rather than fixing it up.
2017-11-01 10:27:06 +00:00
Richard van der Hoff
02237ce725
Fix tests for refresh_token removal
2017-11-01 10:19:42 +00:00
Luke Barnard
318a249c8b
Leave is_public as required argument of update_room_group_association
2017-11-01 09:36:01 +00:00
Luke Barnard
207fabbc6a
Update docs for updating room group association
2017-11-01 09:35:15 +00:00
Richard van der Hoff
356bcafc44
Remove the last vestiges of refresh_tokens
2017-10-31 20:35:58 +00:00
Richard van der Hoff
3e0aaad190
Let auth providers get to the database
...
Somewhat open to abuse, but also somewhat unavoidable :/
2017-10-31 17:22:29 +00:00
Richard van der Hoff
a72e4e3e28
Merge pull request #2610 from matrix-org/rav/schema_for_pw_providers
...
DB schema interface for password auth providers
2017-10-31 17:20:47 +00:00
Luke Barnard
13b3d7b4a0
Flake8
2017-10-31 17:20:11 +00:00
Richard van der Hoff
e025aec028
Merge pull request #2611 from matrix-org/dbkr/port_script_drop_nuls
...
Make the port script drop NUL values in all tables
2017-10-31 17:16:08 +00:00
Luke Barnard
20fe347906
Modify group room association API to allow modification of is_public
...
also includes renamings to make things more consistent.
2017-10-31 17:04:28 +00:00
David Baker
9d419f48e6
Make the port script drop NUL values in all tables
...
Postgres doesn't support NULs in strings so it makes the script
throw an exception and stop if any values contain \0. Drop them
with appropriate warning.
2017-10-31 16:58:49 +00:00
Richard van der Hoff
9ded00f221
fix tests
2017-10-31 14:21:13 +00:00
Richard van der Hoff
1650eb5847
DB schema interface for password auth providers
...
Provide an interface by which password auth providers can register db schema
files to be run at startup
2017-10-31 14:01:53 +00:00
David Baker
c31a7c3ff6
Merge pull request #2609 from matrix-org/rav/refactor_login
...
Refactor some logic from LoginRestServlet into AuthHandler
2017-10-31 13:51:36 +00:00
Richard van der Hoff
b8e54fbc08
Merge pull request #2607 from matrix-org/rav/cleanup_ldap_hacks
...
Clean up backwards-compat hacks for ldap
2017-10-31 13:41:12 +00:00
David Baker
a1f8b0fd64
Merge pull request #2608 from matrix-org/rav/password_provider_doc
...
Start some documentation on password providers
2017-10-31 13:40:10 +00:00
Richard van der Hoff
1b65ae00ac
Refactor some logic from LoginRestServlet into AuthHandler
...
I'm going to need some more flexibility in handling login types in password
auth providers, so as a first step, move some stuff from LoginRestServlet into
AuthHandler.
In particular, we pass everything other than SAML, JWT and token logins down to
the AuthHandler, which now has responsibility for checking the login type and
fishing the password out of the login dictionary, as well as qualifying the
user_id if need be. Ideally SAML, JWT and token would go that way too, but
there's no real need for it right now and I'm trying to minimise impact.
This commit *should* be non-functional.
2017-10-31 10:48:41 +00:00
Richard van der Hoff
ebda45de4c
Start some documentation on password providers
...
Document the existing interface, before I start adding new stuff.
2017-10-31 10:47:52 +00:00
Richard van der Hoff
ffc574a6f9
Clean up backwards-compat hacks for ldap
...
try to make the backwards-compat flows follow the same code paths as the modern
impl.
This commit should be non-functional.
2017-10-31 10:47:02 +00:00
Richard van der Hoff
e2f4190209
Merge pull request #2605 from matrix-org/luke/fix-group-creation-error-wording
...
Fix wording on group creation error
2017-10-30 16:06:42 +00:00
Luke Barnard
9bc17fc5fb
Fix wording on group creation error
2017-10-30 15:17:23 +00:00
Matthew Hodgson
208a6647f1
fix typo
2017-10-29 20:54:20 +00:00
Matthew Hodgson
e51c2bcaef
move url_previews to MD as RST does my head in
2017-10-29 20:47:17 +00:00
Erik Johnston
71a1bd53b2
Merge pull request #2599 from matrix-org/erikj/groups_invite
...
Fix typo when checking if user is invited to group
2017-10-27 17:34:54 +01:00
Erik Johnston
d0abb4e8e6
Fix typo when checking if user is invited to group
2017-10-27 16:57:19 +01:00
Erik Johnston
977078f06d
Fix bad merge
2017-10-27 15:10:50 +01:00
Erik Johnston
6980c4557e
Merge branch 'erikj/attestation_jitter' of github.com:matrix-org/synapse into develop
2017-10-27 15:09:05 +01:00
Erik Johnston
632baf799e
Merge pull request #2598 from matrix-org/revert-2596-erikj/attestation_jitter
...
Revert "Add jitter to validity period of attestations"
2017-10-27 15:08:29 +01:00
Erik Johnston
af92f5b00f
Revert "Add jitter to validity period of attestations"
2017-10-27 15:07:21 +01:00
Erik Johnston
4ab8abbc2b
Merge branch 'erikj/attestation_local_fix' of github.com:matrix-org/synapse into develop
2017-10-27 15:07:08 +01:00
Erik Johnston
b1e62d4a57
Merge pull request #2596 from matrix-org/erikj/attestation_jitter
...
Add jitter to validity period of attestations
2017-10-27 14:20:25 +01:00
Erik Johnston
6af3656deb
Merge pull request #2595 from matrix-org/erikj/attestation_commnet
...
Add comment about attestations
2017-10-27 14:20:19 +01:00
Richard van der Hoff
4d83632009
Merge pull request #2591 from matrix-org/rav/device_delete_auth
...
Device deletion: check UI auth matches access token
2017-10-27 12:30:10 +01:00
Richard van der Hoff
110b373e9c
Merge pull request #2589 from matrix-org/rav/as_deactivate_account
...
Allow ASes to deactivate their own users
2017-10-27 12:29:32 +01:00
Erik Johnston
ca571b0ec3
Add jitter to validity period of attestations
...
This helps ensure that the renewals of attestations are spread out more
evenly.
2017-10-27 11:57:27 +01:00
Luke Barnard
d8c26162a1
Merge pull request #2582 from matrix-org/luke/group-is-public
...
Add is_public to groups table to allow for private groups
2017-10-27 11:41:13 +01:00
Erik Johnston
c067088747
Add comment about attestations
2017-10-27 11:35:41 +01:00
Luke Barnard
5451cc7792
Request is_public from database
2017-10-27 11:27:43 +01:00
Luke Barnard
124314672f
group is dict
2017-10-27 11:08:19 +01:00
Luke Barnard
6362298fa5
Create groups with is_public = True
2017-10-27 11:04:20 +01:00
Richard van der Hoff
8b56977b6f
Merge pull request #2586 from matrix-org/rav/frontend_proxy_auth_header
...
Front-end proxy: pass through auth header
2017-10-27 11:01:50 +01:00
Richard van der Hoff
173567a7f2
Docstring for post_urlencoded_get_json
2017-10-27 10:59:50 +01:00
Luke Barnard
c7d9f25d22
Fix create_group to pass requester_user_id
2017-10-27 10:57:20 +01:00
Erik Johnston
e27b76d117
Import logger
2017-10-27 10:54:02 +01:00
Richard van der Hoff
8854c039f2
Merge pull request #2585 from matrix-org/rav/unstable_to_r0
...
Support /keys/upload on /r0 as well as /unstable
2017-10-27 10:53:48 +01:00
Richard van der Hoff
14f581abc2
Merge pull request #2584 from matrix-org/rav/fix_httpclient_logcontexts
...
Fix logcontext leaks in httpclient
2017-10-27 10:53:29 +01:00
Luke Barnard
2ca46c7afc
Correct logic for checking private group membership
2017-10-27 10:48:01 +01:00
Erik Johnston
82d8c1bacb
Fixup
2017-10-27 10:30:21 +01:00
Erik Johnston
2fd9831f7c
Merge pull request #2574 from matrix-org/erikj/room_list_fixes
...
Add logging and fix log contexts for publicRooms
2017-10-27 10:01:23 +01:00
Erik Johnston
195abfe7a5
Remove incorrect attestations
2017-10-27 09:58:13 +01:00
Erik Johnston
d8dde19f04
Log if we try to do attestations for our own user and group
2017-10-27 09:55:01 +01:00
Erik Johnston
585972b51a
Don't generate group attestations for local users
2017-10-27 09:46:56 +01:00
Richard van der Hoff
7a6546228b
Device deletion: check UI auth matches access token
...
(otherwise there's no point in the UI auth)
2017-10-27 00:04:31 +01:00
Matthew Hodgson
92f680889d
spell out need for libxml2 for lxml to work
2017-10-27 00:02:29 +01:00
Richard van der Hoff
785bd7fd75
Allow ASes to deactivate their own users
2017-10-27 00:01:00 +01:00
Richard van der Hoff
c89e6aadff
Merge pull request #2581 from matrix-org/rav/fix_init_with_no_logfile
...
Fix error when running synapse with no logfile
2017-10-26 22:16:57 +01:00
Richard van der Hoff
54a2525133
Front-end proxy: pass through auth header
...
So that access-token-in-an-auth-header works.
2017-10-26 18:19:01 +01:00
Richard van der Hoff
0a5866bec9
Support /keys/upload on /r0 as well as /unstable
...
(So that we can stop riot relying on it in /unstable)
2017-10-26 18:18:23 +01:00
Richard van der Hoff
0d8e3ad48b
Fix logcontext leaks in httpclient
...
`preserve_context_over_fn` is borked
2017-10-26 18:17:10 +01:00
Richard van der Hoff
12ef02dc3d
SimpleHTTPClient: add support for headers
...
Sometimes we need to pass headers into these methods
2017-10-26 17:59:50 +01:00
Luke Barnard
69e8a05f35
Make it work
2017-10-26 17:55:58 +01:00
Luke Barnard
007cd48af6
Recreate groups table instead of adding column
...
Adding a column with non-constant default not possible in sqlite3
2017-10-26 17:55:22 +01:00
Luke Barnard
713e60b9b6
Awful hack to get default true
2017-10-26 17:38:14 +01:00
Luke Barnard
e86cefcb6f
Add groups table to BOOLEAN_COLUMNS in synapse_port_db
2017-10-26 17:24:54 +01:00
Luke Barnard
cfa4e658e0
Bump schema version to 46
2017-10-26 17:23:49 +01:00
Luke Barnard
595fe67f01
delint
2017-10-26 17:20:24 +01:00
Luke Barnard
9b2feef9eb
Add is_public to groups table to allow for private groups
...
Prevent group API access to non-members for private groups
Also make all the group code paths consistent with `requester_user_id` always being the User ID of the requesting user.
2017-10-26 16:51:32 +01:00
Richard van der Hoff
f7f90e0c8d
Fix error when running synapse with no logfile
...
Fixes 'UnboundLocalError: local variable 'sighup' referenced before assignment'
2017-10-26 16:45:20 +01:00
Richard van der Hoff
1dd0f53b21
Merge pull request #2579 from krombel/move_unstable_to_r0
...
register some /unstable endpoints in /r0 as well
2017-10-26 16:10:43 +01:00
Krombel
8299b323ee
add release endpoints for /thirdparty
2017-10-26 16:58:20 +02:00
Krombel
9b436c8b4c
register some /unstable endpoints in /r0 as well
2017-10-26 15:22:50 +02:00
Richard van der Hoff
5b38fdab31
Merge pull request #2578 from matrix-org/rav/code_style_imports
...
Code_style updates
2017-10-26 11:55:59 +01:00
Richard van der Hoff
1eb300e1fc
Document import rules
2017-10-26 11:55:41 +01:00
Richard van der Hoff
f7f6bfaae4
code_style: more formatting
2017-10-26 11:55:41 +01:00
Erik Johnston
4ea882ede4
Merge pull request #2577 from matrix-org/erikj/fix_port
...
Fix port script
2017-10-26 11:54:12 +01:00
Erik Johnston
566e21eac8
Update room_list.py
2017-10-26 11:39:54 +01:00
Richard van der Hoff
351cc35342
code_style.rst: a couple of tidyups
2017-10-26 10:29:26 +01:00
Erik Johnston
37d766aedd
Fix port script
...
We changed _simple_update_one_txn to use _simple_update_txn but didn't
yank it out in the port script.
Fixes #2565
2017-10-26 10:01:03 +01:00
Maxime Vaillancourt
5287e57c86
Ignore noscript tags when generating URL previews
2017-10-25 20:44:34 -04:00
Erik Johnston
2a7e9faeec
Do logcontexts outside ResponseCache
2017-10-25 15:21:08 +01:00
Erik Johnston
1ad1ba9e6a
Merge branch 'master' of github.com:matrix-org/synapse into develop
2017-10-25 10:27:23 +01:00
Erik Johnston
33a9026cdf
Add logging and fix log contexts for publicRooms
2017-10-25 10:26:06 +01:00
Matthew Hodgson
efd0f5a3c5
tip for generating tls_fingerprints
2017-10-24 18:49:49 +01:00
Erik Johnston
f009df23ec
Merge branch 'release-v0.24.1' of github.com:matrix-org/synapse
2017-10-24 15:02:25 +01:00
Erik Johnston
6ba4fabdb9
Bump version and changelog
2017-10-24 14:15:27 +01:00
Erik Johnston
9e2c22c97f
Merge pull request #2567 from matrix-org/erikj/group_fed_update_profile
...
Correctly wire in update group profile over federation
2017-10-24 09:21:47 +01:00
Erik Johnston
39dc52157d
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/group_fed_update_profile
2017-10-24 09:16:20 +01:00
Richard van der Hoff
0d437698b2
Merge pull request #2568 from matrix-org/rav/pep8
...
PEP8 fixes
2017-10-23 17:39:31 +01:00
Richard van der Hoff
0be99858f3
fix vars named l
...
E741 says "do not use variables named ‘l’, ‘O’, or ‘I’".
2017-10-23 15:56:38 +01:00
Richard van der Hoff
eaaabc6c4f
replace 'except:' with 'except Exception:'
...
what could possibly go wrong
2017-10-23 15:52:32 +01:00
Erik Johnston
ce6d4914f4
Correctly wire in update group profile over federation
2017-10-23 15:21:24 +01:00
Richard van der Hoff
ecf198aab8
Merge pull request #2566 from matrix-org/rav/media_logcontext_leak
...
Fix a logcontext leak in the media repo
2017-10-23 14:47:49 +01:00
Richard van der Hoff
3267b81b81
Merge pull request #2561 from matrix-org/rav/id_checking
...
Updates to ID checking
2017-10-23 14:39:20 +01:00
Richard van der Hoff
d03cfc4258
Fix a logcontext leak in the media repo
2017-10-23 14:34:27 +01:00
Erik Johnston
1de557975f
Merge branch 'master' of github.com:matrix-org/synapse into develop
2017-10-23 13:18:12 +01:00
Erik Johnston
ffba978077
Merge branch 'release-v0.24.0' of github.com:matrix-org/synapse
2017-10-23 13:13:53 +01:00
Erik Johnston
13e16cf302
Bump version and changelog
2017-10-23 13:13:31 +01:00
Richard van der Hoff
bd0d84bf92
Merge pull request #2560 from matrix-org/rav/kill_pointless_method
...
Remove pointless create() method
2017-10-23 11:06:57 +01:00
Richard van der Hoff
1135193dfd
Validate group ids when parsing
...
May as well do it whenever we parse a Group ID. We check the sigil and basic
structure here so it makes sense to check the grammar in the same place.
2017-10-21 00:30:39 +01:00
Richard van der Hoff
29812c628b
Allow = in mxids and groupids
...
... because the spec says we should.
2017-10-20 23:42:53 +01:00
Richard van der Hoff
58fbbe0f1d
Disallow capital letters in userids
...
Factor out a common function for checking user ids and group ids, which forbids
capitals.
2017-10-20 23:37:22 +01:00
Richard van der Hoff
631d7b87b5
Remove pointless create() method
...
It just calls the constructor, so we may as well kill it rather than having
random codepaths.
2017-10-20 22:14:55 +01:00
Erik Johnston
6070647774
Correctly bump version
2017-10-19 16:40:20 +01:00
Erik Johnston
d6237859f6
Update changelog
2017-10-19 14:19:52 +01:00
Erik Johnston
0ef0aeceac
Bump version and changelog
2017-10-19 13:48:33 +01:00
Erik Johnston
b4a6b7f720
Merge pull request #2559 from matrix-org/erikj/group_id_validation
...
Add config to enable group creation
2017-10-19 13:45:09 +01:00
Erik Johnston
c7d46510d7
Flake8
2017-10-19 13:36:06 +01:00
Erik Johnston
ffd3f1a783
Add missing file...
2017-10-19 12:17:30 +01:00
Erik Johnston
29bafe2f7e
Add config to enable group creation
2017-10-19 12:13:44 +01:00
Erik Johnston
287dd1ee2c
Merge pull request #2558 from matrix-org/erikj/group_id_validation
...
Enforce sensible group IDs
2017-10-19 12:13:31 +01:00
Erik Johnston
513c23bfd9
Enforce sensible group IDs
2017-10-19 12:01:01 +01:00
Erik Johnston
011d03a0f6
Fix typo
2017-10-19 11:22:48 +01:00
Erik Johnston
9ab859f27b
Fix typo in group attestation handling
2017-10-19 10:55:52 +01:00
Erik Johnston
f4f65ef93e
Merge pull request #2557 from matrix-org/erikj/media_tumbnails
...
Fix typo in thumbnail generation
2017-10-19 10:38:52 +01:00
Erik Johnston
bd5718d0ad
Fix typo in thumbnail generation
2017-10-19 10:27:18 +01:00
Erik Johnston
161a862ffb
Fix typo
2017-10-19 10:17:43 +01:00
Richard van der Hoff
69994c385a
Merge pull request #2553 from matrix-org/rav/fix_500_on_event_send
...
Fix 500 error when we get an error handling a PDU
2017-10-18 11:25:44 +01:00
Richard van der Hoff
b5dbbac308
Merge pull request #2552 from matrix-org/rav/fix_500_on_dodgy_powerlevels
...
Fix 500 error when fields missing from power_levels event
2017-10-17 20:53:30 +01:00
Richard van der Hoff
582bd19ee9
Fix 500 error when we get an error handling a PDU
...
FederationServer doesn't have a send_failure (and nor does its subclass,
ReplicationLayer), so this was failing.
I'm not really sure what the idea behind send_failure is, given (a) we don't do
anything at the other end with it except log it, and (b) we also send back the
failure via the transaction response. I suspect there's a whole lot of dead
code around it, but for now I'm just removing the broken bit.
2017-10-17 20:52:40 +01:00
Richard van der Hoff
74f99f227c
Doc some more dynamic Homeserver methods
2017-10-17 20:51:29 +01:00
Richard van der Hoff
c2bd177ea0
Fix 500 error when fields missing from power_levels event
...
If the users or events keys were missing from a power_levels event, then
we would throw 500s when trying to auth them.
2017-10-17 17:05:42 +01:00
Erik Johnston
fe6e9f580b
Merge pull request #2550 from krombel/fix_thumbnail_2548
...
fix thumbnailing (#2548 )
2017-10-17 15:35:18 +01:00
Richard van der Hoff
7216c76654
Improve error handling for missing files ( #2551 )
...
`os.path.exists` doesn't allow us to distinguish between permissions errors and
the path actually not existing, which repeatedly confuses people. It also means
that we try to overwrite existing key files, which is super-confusing. (cf
issues #2455 , #2379 ). Use os.stat instead.
Also, don't recomemnd the the use of --generate-config, which screws everything
up if you're using debian (cf #2455 ).
2017-10-17 14:46:17 +01:00
Richard van der Hoff
dbdfd8967d
Merge pull request #2546 from matrix-org/rav/remove_dead_event_injector
...
Remove dead class
2017-10-17 13:21:22 +01:00
Richard van der Hoff
b8e40d146f
Merge pull request #2547 from matrix-org/rav/test_make_deferred_yieldable
...
Add some tests for make_deferred_yieldable
2017-10-17 13:21:09 +01:00
Richard van der Hoff
4cc8bb0767
Merge pull request #2549 from matrix-org/rav/event_persist_logcontexts
...
Fix logcontext handling for persist_events
2017-10-17 13:20:35 +01:00
David Baker
4e242b3e20
Merge pull request #2545 from matrix-org/dbkr/auto_join_rooms
...
Add config option to auto-join new users to rooms
2017-10-17 11:45:49 +01:00
Krombel
a6245478c8
fix thumbnailing ( #2548 )
...
in commit 0e28281a the code for thumbnailing got refactored and the
renaming of this variables was not done correctly.
Signed-Off-by: Matthias Kesler <krombel@krombel.de >
2017-10-17 12:45:33 +02:00
Richard van der Hoff
2e9f5ea31a
Fix logcontext handling for persist_events
...
* don't use preserve_context_over_deferred, which is known broken.
* remove a redundant preserve_fn.
* add/improve some comments
2017-10-17 10:59:30 +01:00
Richard van der Hoff
a6ad8148b9
Fix name of test_logcontext
...
The file under test is logcontext.py, not log_context.py
2017-10-17 10:53:34 +01:00
Richard van der Hoff
5b5f35ccc0
Add some tests for make_deferred_yieldable
2017-10-17 10:52:31 +01:00
Richard van der Hoff
9b714abf35
Remove dead class
...
This isn't used anywhere.
2017-10-17 10:43:36 +01:00
David Baker
33122c5a1b
Fix test
2017-10-17 10:39:50 +01:00
David Baker
a9c2e930ac
pep8
2017-10-17 10:13:13 +01:00
David Baker
c05e6015cc
Add config option to auto-join new users to rooms
...
New users who register on the server will be dumped into all rooms in
auto_join_rooms in the config.
2017-10-16 17:57:27 +01:00
Luke Barnard
e0a75e0c25
Merge pull request #2544 from matrix-org/luke/groups-invited-users
...
Implement GET /groups/$groupId/invited_users
2017-10-16 17:33:33 +02:00
Luke Barnard
85f5674e44
Delint
2017-10-16 15:52:17 +01:00
Luke Barnard
c43e8a9736
Make it work. Warn about lack of user profile
2017-10-16 15:50:39 +01:00
Luke Barnard
a3ac4f6b0a
_create_rererouter for get_invited_users_in_group
2017-10-16 15:41:03 +01:00
Luke Barnard
5dfd0350c7
Merge branch 'develop' into luke/groups-invited-users
2017-10-16 15:34:36 +01:00
Luke Barnard
ca96d609e4
Merge pull request #2543 from matrix-org/luke/fix-on-group-invite-no-profile
...
Log a warning when no profile for invited member
2017-10-16 16:33:53 +02:00
Luke Barnard
2c5972f87f
Implement GET /groups/$groupId/invited_users
2017-10-16 15:31:11 +01:00
Luke Barnard
6079d0027a
Log a warning when no profile for invited member
...
And return empty profile
2017-10-16 14:20:45 +01:00
David Baker
99a6c9dbf2
Merge pull request #2542 from matrix-org/dbkr/room_notif_no_glob
...
Omit the *s for @room notifications
2017-10-16 13:46:17 +01:00
David Baker
9342bcfce0
Omit the *s for @room notifications
...
They're just redundant
2017-10-16 13:38:10 +01:00
Richard van der Hoff
e504816977
Merge pull request #2540 from 4nd3r/patch-1
...
make it absolutely clear that purge doesn't remove everything
2017-10-16 10:43:22 +01:00
Ander Punnar
b2e02084b8
make it absolutely clear that Purge History API does not remove all traces of events and message contents
...
because this topic pops up too often
#890 #1621 #1730 #2260 #2315 and so on
2017-10-14 13:25:42 +03:00
Erik Johnston
db3d84f46c
Merge pull request #2538 from matrix-org/erikj/media_backup
...
Basic implementation of backup media store
2017-10-13 16:11:31 +01:00
Erik Johnston
1b6b0b1e66
Add try/finally block to close t_byte_source
2017-10-13 15:34:08 +01:00
Erik Johnston
6b725cf56a
Remove old comment
2017-10-13 15:23:41 +01:00
Matthew Hodgson
64665b57d0
oops
2017-10-13 14:26:07 +01:00
Erik Johnston
2b24416e90
Don't reuse source but instead copy from primary media store to backup
2017-10-13 14:11:34 +01:00
Erik Johnston
b92a8e6e4a
PEP8
2017-10-13 13:58:57 +01:00
Matthew Hodgson
931fc43cc8
fix copyright to companies which actually exist(ed)
2017-10-13 13:54:31 +01:00
Erik Johnston
31aa7bd8d1
Move type into key
2017-10-13 13:47:38 +01:00
Erik Johnston
ad1911bbf4
Comment
2017-10-13 13:47:05 +01:00
Erik Johnston
c021c39cbd
Remove spurious addition
2017-10-13 13:46:53 +01:00
Erik Johnston
1f43d22397
Don't needlessly rename variable
2017-10-13 11:42:07 +01:00
Erik Johnston
a675bd08bd
Add paths back in...
2017-10-13 11:41:06 +01:00
Erik Johnston
4d7e1dde70
Remove unnecessary diff
2017-10-13 11:36:32 +01:00
Erik Johnston
ae5d18617a
Make things be absolute paths again
2017-10-13 11:35:44 +01:00
Erik Johnston
9732ec6797
s/write_to_file/write_to_file_and_backup/
2017-10-13 11:34:41 +01:00
Erik Johnston
0e28281a02
Fix up
2017-10-13 11:33:49 +01:00
Erik Johnston
505371414f
Fix up thumbnailing function
2017-10-13 11:23:53 +01:00
Erik Johnston
e3428d26ca
Fix typo
2017-10-13 10:39:59 +01:00
Erik Johnston
35332298ef
Fix up comments
2017-10-13 10:39:32 +01:00
Erik Johnston
64db043a71
Move makedirs to thread
2017-10-13 10:25:01 +01:00
Erik Johnston
b60859d6cc
Use make_deferred_yieldable
2017-10-13 10:24:19 +01:00
Erik Johnston
d76621a47b
Fix comments
2017-10-12 18:16:25 +01:00
Erik Johnston
4ae85ae121
Don't close prematurely..
2017-10-12 17:57:31 +01:00
Erik Johnston
cc505b4b5e
getvalue closes buffer
2017-10-12 17:52:30 +01:00
Erik Johnston
1259a76047
Get len before close
2017-10-12 17:39:23 +01:00
Erik Johnston
802ca12d05
Don't close file prematurely
2017-10-12 17:37:21 +01:00
Erik Johnston
e283b555b1
Copy everything to backup
2017-10-12 17:31:24 +01:00
Erik Johnston
b77a13812c
Typo
2017-10-12 15:32:32 +01:00
Erik Johnston
6dfde6d485
Remove dead code
2017-10-12 15:30:26 +01:00
Erik Johnston
c8eeef6947
Fix typos
2017-10-12 15:28:24 +01:00
Erik Johnston
67cb89fbdf
Fix typo
2017-10-12 15:23:41 +01:00
Erik Johnston
bf4fb1fb40
Basic implementation of backup media store
2017-10-12 15:20:59 +01:00
hera
f807f7f804
log when we get an exception handling replication updates
2017-10-12 11:51:24 +01:00
David Baker
b8d8ed1ba9
Merge pull request #2531 from matrix-org/dbkr/spamcheck_error_messages
...
Allow error strings from spam checker
2017-10-12 10:31:03 +01:00
Richard van der Hoff
cc794d60e7
Merge pull request #2532 from matrix-org/rav/fix_linearizer
...
Fix stackoverflow and logcontexts from linearizer
2017-10-11 17:29:32 +01:00
Richard van der Hoff
8dd0c85ac5
Merge pull request #2529 from matrix-org/rav/fix_transaction_failure_handling
...
log pdu_failures from incoming transactions
2017-10-11 17:29:14 +01:00
Richard van der Hoff
76fa695241
Merge pull request #2515 from matrix-org/rav/fix_receipt_logcontext
...
A logformatter which includes the stack when the exception was caught when
logging exceptions.
2017-10-11 17:28:01 +01:00
Richard van der Hoff
f30c4ed2bc
logformatter: fix AttributeError
...
make sure we have the relevant fields before we try to log them.
2017-10-11 17:26:17 +01:00
Erik Johnston
b752507b48
Fix fetching remote summaries
2017-10-11 16:59:18 +01:00
Erik Johnston
af94ba9d02
Merge pull request #2533 from matrix-org/erikj/fix_group_repl
...
Fix group stream replication
2017-10-11 16:01:57 +01:00
Erik Johnston
818b08d0e4
peeeeeeeeep8888888888888888888888888888
2017-10-11 15:54:00 +01:00
Erik Johnston
ea18996f54
Fix group stream replication
...
The stream update functions expect the storage function to return a list
of tuples.
2017-10-11 15:44:39 +01:00
Richard van der Hoff
68fd82e840
Merge pull request #2530 from matrix-org/rav/fix_receipt_logcontext
...
fix a logcontext leak in read receipt handling
2017-10-11 15:08:53 +01:00
Richard van der Hoff
4fad8efbfb
Fix stackoverflow and logcontexts from linearizer
...
1. make it not blow out the stack when there are more than 50 things waiting
for a lock. Fixes https://github.com/matrix-org/synapse/issues/2505 .
2. Make it not mess up the log contexts.
2017-10-11 15:05:05 +01:00
David Baker
b78bae2d51
fix isinstance
2017-10-11 14:49:09 +01:00
Erik Johnston
271f5601f3
Fix typo in invite to group
2017-10-11 14:45:33 +01:00
David Baker
c3b7a45e84
Allow error strings from spam checker
2017-10-11 14:39:22 +01:00
Richard van der Hoff
c3e190ce67
fix a logcontext leak in read receipt handling
2017-10-11 14:37:20 +01:00
Richard van der Hoff
b75d443caf
log pdu_failures from incoming transactions
...
... even if we have no EDUs.
This appears to have been introduced in
476899295f .
2017-10-11 14:36:13 +01:00
Erik Johnston
27e727a146
Fix typo
2017-10-11 14:32:40 +01:00
Erik Johnston
4ce4379235
Fix attestations to check correct server name
2017-10-11 14:11:43 +01:00
Erik Johnston
c2c47550f9
Fix schema delta versions
2017-10-11 13:23:15 +01:00
Erik Johnston
535cc49f27
Merge pull request #2466 from matrix-org/erikj/groups_merged
...
Initial Group Implementation
2017-10-11 13:20:07 +01:00
Erik Johnston
dfbf73408c
Merge pull request #2501 from matrix-org/dbkr/channel_notifications
...
Support for channel notifications
2017-10-11 13:19:29 +01:00
Erik Johnston
bc7f3eb32f
Merge pull request #2483 from jeremycline/unfreeze-ujson-dump
...
Unfreeze event before serializing with ujson
2017-10-11 13:18:52 +01:00
Erik Johnston
ec954f47fb
Validate room ids
2017-10-11 13:15:44 +01:00
David Baker
81a5e0073c
pep8
2017-10-10 15:53:34 +01:00
David Baker
ab1bc9bf5f
Don't KeyError if no power_levels event
2017-10-10 15:34:05 +01:00
David Baker
0f1eb3e914
Use notification levels in power_levels
...
Rather than making the condition directly require a specific power
level. This way the level require to notify a room can be configured
per room.
2017-10-10 15:23:00 +01:00
Erik Johnston
84e27a592d
Merge pull request #2490 from matrix-org/erikj/drop_left_room_events
...
Ignore incoming events for rooms that we have left
2017-10-10 11:58:32 +01:00
David Baker
c9f034b4ac
There was already a constant for this
...
also update copyright
2017-10-10 11:47:10 +01:00
David Baker
a9f9d68631
More optimisation
2017-10-10 11:38:31 +01:00
David Baker
707374d5dc
What year is it!? Who's the president!?
2017-10-10 11:21:41 +01:00
David Baker
89fa00ddff
Merge branch 'develop' into dbkr/channel_notifications
2017-10-10 11:20:17 +01:00
Richard van der Hoff
79bea15830
Merge pull request #2520 from matrix-org/rav/process_incoming_rooms_in_parallel
...
fed server: process PDUs for different rooms in parallel
2017-10-10 10:26:21 +01:00
Richard van der Hoff
426f8b0f66
Merge pull request #2518 from matrix-org/rav/linearize_incoming_transactions
...
Fed server: use a linearizer for ongoing transactions
2017-10-10 10:20:51 +01:00
Richard van der Hoff
6a6cc27aee
fed server: process PDUs for different rooms in parallel
...
With luck, this will give a real-time improvement when there are many rooms and
the server ends up calling out to fetch missing events.
2017-10-09 18:30:31 +01:00
Richard van der Hoff
4c7c4d4061
Fed server: use a linearizer for ongoing transactions
...
We don't want to process the same transaction multiple times concurrently, so
use a linearizer.
2017-10-09 18:30:10 +01:00
Richard van der Hoff
4d24becf7f
Merge pull request #2517 from matrix-org/rav/fed_server_refactor
...
fed server: refactor on_incoming_transaction
2017-10-09 18:19:23 +01:00
Richard van der Hoff
ba5b9b80a5
fed server: refactor on_incoming_transaction
...
Move as much as possible to after the have_responded check, and reduce the
number of times we iterate over the pdu list.
2017-10-09 18:10:53 +01:00
Richard van der Hoff
c7b0678356
Merge pull request #2516 from matrix-org/rav/fix_fed_server_origin_check
...
Fed server: Move origin-check code to _handle_received_pdu
2017-10-09 18:09:43 +01:00
Richard van der Hoff
a6e3222fe5
Fed server: Move origin-check code to _handle_received_pdu
...
The response-building code expects there to be an entry in the `results` list
for each entry in the pdu_list, so the early `continue` was messing this
up. That doesn't really matter, because all that the federation client does is
log any errors, but it's pretty poor form.
2017-10-09 17:53:32 +01:00
Richard van der Hoff
3cc852d339
Fancy logformatter to format exceptions better
...
This is a bit of an experimental change at this point; the idea is to see if it
helps us track down where our stack overflows are coming from by logging the
stack when the exception was caught and turned into a Failure. (We'll also need
edf2704420 ).
If we deploy this, we'll be able to enable it via the log config yaml.
2017-10-09 17:44:42 +01:00
Richard van der Hoff
0eeaa25694
Merge pull request #2508 from matrix-org/rav/federation_queue_logcontexts
...
Fix up logcontext handling in (federation) TransactionQueue
2017-10-09 17:43:48 +01:00
Richard van der Hoff
aa3fac8057
Merge pull request #2507 from matrix-org/rav/execute_concurrently_log_contexts
...
Fix logcontext handling for concurrently_execute
2017-10-09 17:43:32 +01:00
Richard van der Hoff
c1c81ee2a4
Merge pull request #2506 from matrix-org/rav/unhandled_failure
...
Fix up deferred handling in federation.py
2017-10-09 17:43:10 +01:00
Erik Johnston
e8496efe84
Fix up comment
2017-10-09 15:17:34 +01:00
Richard van der Hoff
01bbacf3c4
Fix up logcontext handling in (federation) TransactionQueue
...
Avoid using preserve_context_over_function, which has problems with respect to
logcontexts.
2017-10-06 22:39:25 +01:00
Richard van der Hoff
148428ce76
Fix logcontext handling for concurrently_execute
...
Avoid preserve_context_over_deferred, which is broken.
2017-10-06 22:24:28 +01:00
Richard van der Hoff
c8f568ddf9
Fix up deferred handling in federation.py
...
* Avoid preserve_context_over_deferred, which is broken
* set consumeErrors=True on defer.gatherResults, to avoid spurious "unhandled
failure" erros
2017-10-06 22:14:24 +01:00
Richard van der Hoff
3ddda939d3
some comments in the state res code
2017-10-05 14:58:17 +01:00
David Baker
5de926d66f
Merge pull request #2502 from matrix-org/dbkr/allow_dms_to_admins
...
Spam checking: add the invitee to user_may_invite
2017-10-05 14:14:13 +01:00
David Baker
f878e6f8af
Spam checking: add the invitee to user_may_invite
2017-10-05 14:02:28 +01:00
David Baker
269af961e9
Make be faster
2017-10-05 13:27:12 +01:00
David Baker
ed80c6b6cc
Add fastpath optimisation
2017-10-05 13:20:22 +01:00
David Baker
e433393c4f
pep8
2017-10-05 13:08:02 +01:00
David Baker
985ce80375
They're called rooms
2017-10-05 13:03:44 +01:00
David Baker
b9b9714fd5
Get rule type right
2017-10-05 13:02:19 +01:00
David Baker
fa969cfdde
Support for channel notifications
...
Add condition type to check the sender's power level and add a base
rule using it for @channel notifications.
2017-10-05 12:39:18 +01:00
David Baker
44f8e383f3
Merge pull request #2500 from matrix-org/dbkr/fix_word_boundary_mentions
...
Fix notif kws that start/end with non-word chars
2017-10-05 12:27:59 +01:00
David Baker
0c8da8b519
Use better method for word boundary searching
...
From ebc95667b8
2017-10-05 11:57:43 +01:00
Erik Johnston
eaaa837e00
Don't corrupt cache
2017-10-05 11:43:22 +01:00
David Baker
cbe3c3fdd4
pep8
2017-10-05 11:43:10 +01:00
David Baker
6748f0a579
Fix notif kws that start/end with non-word chars
...
Only prepend / append word bounary characters if the search
expression starts or ends with a word character, otherwise they
don't work because there's no word bounary between whitespace and
a non-word char.
2017-10-05 11:33:30 +01:00
David Baker
93b0cf7a99
Merge pull request #2495 from matrix-org/dbkr/spam_check_room_creation
...
Add room creation checks to spam checker
2017-10-04 14:49:20 +01:00
David Baker
d8ce68b09b
spam check room publishing
2017-10-04 14:29:33 +01:00
David Baker
78d4ced829
un-double indent
2017-10-04 12:44:27 +01:00
David Baker
197c14dbcf
Add room creation checks to spam checker
...
Lets the spam checker deny attempts to create rooms and add aliases
to them.
2017-10-04 10:47:54 +01:00
David Baker
5f20a91fa1
Merge pull request #2492 from matrix-org/dbkr/spam_check_invites
...
Allow spam checker to reject invites too
2017-10-03 18:10:23 +01:00
David Baker
1e2ac54351
s/roomid/room_id/
2017-10-03 17:41:38 +01:00
David Baker
1e375468de
pass room id too
2017-10-03 17:13:14 +01:00
David Baker
c2c188b699
Federation was passing strings anyway
...
so pass string everywhere
2017-10-03 15:46:19 +01:00
David Baker
c46a0d7eb4
this shouldn't be debug
2017-10-03 15:20:14 +01:00
David Baker
bd769a81e1
better logging
2017-10-03 15:16:40 +01:00
David Baker
537088e7dc
Actually write warpper function
2017-10-03 14:28:12 +01:00
David Baker
41fd9989a2
Skip spam check for admin users
2017-10-03 14:17:44 +01:00
Erik Johnston
11d62f43c9
Invalidate cache
2017-10-03 14:12:28 +01:00
Erik Johnston
e4ab96021e
Update comments
2017-10-03 14:10:41 +01:00
David Baker
2a7ed700d5
Fix param name & lint
2017-10-03 14:04:10 +01:00
David Baker
84716d267c
Allow spam checker to reject invites too
2017-10-03 13:56:43 +01:00
Richard van der Hoff
e4779be97a
Merge pull request #2491 from matrix-org/rav/port_db_fixes
...
Drop search values with nul characters
2017-10-03 13:49:05 +01:00
Erik Johnston
f2da6df568
Remove spurious line feed
2017-10-03 11:31:06 +01:00
Erik Johnston
30848c0fcd
Ignore incoming events for rooms that we have left
...
When synapse receives an event for a room its not in over federation, it
double checks with the remote server to see if it is in fact in the
room. This is done so that if the server has forgotten about the room
(usually as a result of the database being dropped) it can recover from
it.
However, in the presence of state resets in large rooms, this can cause
a lot of work for servers that have legitimately left. As a hacky
solution that supports both cases we drop incoming events for rooms that
we have explicitly left.
This means that we no longer support the case of servers having
forgotten that they've rejoined a room, but that is sufficiently rare
that we're not going to support it for now.
2017-10-03 11:18:21 +01:00
Erik Johnston
e585c83209
Merge branch 'master' of github.com:matrix-org/synapse into develop
2017-10-02 18:11:24 +01:00
Erik Johnston
6c1bb1601e
Bump version and changelog
2017-10-02 18:05:17 +01:00
Erik Johnston
ea87cb1ba5
Make 'affinity' package optional
2017-10-02 18:03:59 +01:00
Erik Johnston
3fed5bb25f
Move quit_with_error
2017-10-02 17:59:34 +01:00
David Baker
27955056e0
Merge branch 'develop' into erikj/groups_merged
2017-10-02 16:20:41 +01:00
Erik Johnston
90d70af269
Merge branch 'master' of github.com:matrix-org/synapse into develop
2017-10-02 16:20:23 +01:00
Erik Johnston
b23cb8fba8
Merge branch 'release-v0.23.0' of github.com:matrix-org/synapse
2017-10-02 13:52:03 +01:00
Richard van der Hoff
7fc1aad195
Drop search values with nul characters
...
https://github.com/matrix-org/synapse/issues/2187 contains a report of a port
failing due to nul characters somewhere in the search table. Let's try dropping
the offending rows.
2017-10-02 00:53:32 +01:00
Jeremy Cline
cafb8de132
Unfreeze event before serializing with ujson
...
In newer versions of https://github.com/esnme/ultrajson , ujson does not
serialize frozendicts (introduced in esnme/ultrajson@53f85b1 ). Although
the PyPI version is still 1.35, Fedora ships with a build from commit
esnme/ultrajson@2f1d487 . This causes the serialization to fail if the
distribution-provided package is used.
This runs the event through the unfreeze utility before serializing it.
Thanks to @ignatenkobrain for tracking down the root cause.
fixes #2351
Signed-off-by: Jeremy Cline <jeremy@jcline.org >
2017-09-30 11:22:37 -04:00
Richard van der Hoff
d5325d7ef1
Merge pull request #2480 from matrix-org/rav/federation_client_logging
...
Improve logging of failures in matrixfederationclient
2017-09-29 17:32:53 +01:00
Robert Swain
24d162814b
docker: s/matrix-org/matrixdotorg/g
2017-09-29 11:40:15 +02:00
Erik Johnston
d5694ac5fa
Only log if we've removed media
2017-09-28 16:08:08 +01:00
Richard van der Hoff
e43de3ae4b
Improve logging of failures in matrixfederationclient
...
* don't log exception types twice
* not all exceptions have a meaningful 'message'. Use the repr rather than
attempting to build a string ourselves.
2017-09-28 15:38:09 +01:00
Richard van der Hoff
75e67b9ee4
Handle SERVFAILs when doing AAAA lookups for federation ( #2477 )
...
... to cope with people with broken dnssec setups, mostly
2017-09-28 15:24:00 +01:00
Erik Johnston
768f00dedb
Up the limits on number of url cache entries to delete at one time
2017-09-28 14:27:27 +01:00
Erik Johnston
4dc07e93a8
Add old indices
2017-09-28 14:10:33 +01:00
Erik Johnston
7cc483aa0e
Clear up expired url cache every 10s
2017-09-28 13:56:53 +01:00
Erik Johnston
e1e7d76cf1
Actually assign result to variable
2017-09-28 13:55:29 +01:00
Erik Johnston
93247a424a
Only pull out local media that were for url cache
2017-09-28 13:48:14 +01:00
Erik Johnston
5f501ec7e2
Fix typo in url cache expiry timer
2017-09-28 12:59:01 +01:00
Erik Johnston
761d255fdf
Merge pull request #2479 from matrix-org/erikj/expire_url_cache_thumbnails
...
Support new and old style media id formats
2017-09-28 12:58:13 +01:00
Erik Johnston
ace8079086
Support new and old style media id formats
2017-09-28 12:52:51 +01:00
Erik Johnston
7a44c01d89
Fix typo
2017-09-28 12:46:04 +01:00
Erik Johnston
c9bc4b7031
Merge pull request #2478 from matrix-org/erikj/expire_url_cache_thumbnails
...
Delete expired url cache data
2017-09-28 12:42:33 +01:00
Erik Johnston
ae79764fe5
Change expires column to expires_ts
2017-09-28 12:37:53 +01:00
Erik Johnston
77f1d24de3
More brackets
2017-09-28 12:23:15 +01:00
Erik Johnston
9ccb4226ba
Delete expired url cache data
2017-09-28 12:18:06 +01:00
Robert Swain
95e02b856b
docker: Initial Dockerfile and docker-compose.yaml
2017-09-28 12:12:47 +02:00
Erik Johnston
bf86a41ef1
Merge pull request #2476 from matrix-org/erikj/joined_members_auth
...
Fix /joined_members to work with AS users
2017-09-28 10:44:44 +01:00
Erik Johnston
8090fd4664
Fix /joined_members to work with AS users
2017-09-28 10:09:32 +01:00
Erik Johnston
3a743f649c
Merge pull request #2475 from matrix-org/erikj/joined_members_auth
...
Fix bug where /joined_members didn't check user was in room
2017-09-27 16:42:23 +01:00
Erik Johnston
adec03395d
Fix bug where /joined_members didn't check user was in room
2017-09-27 15:14:39 +01:00
David Baker
74e494b010
Merge pull request #2474 from matrix-org/dbkr/spam_check_module
...
Make the spam checker a module
2017-09-27 11:31:00 +01:00
David Baker
ef3a5ae787
Don't test is spam_checker not None
...
Sometimes it's a Mock object which is not none but is still not
what we're after
2017-09-27 11:24:19 +01:00
David Baker
8c06dd6071
Remove unintentional debugging
2017-09-27 10:31:14 +01:00
David Baker
60c78666ab
pep8
2017-09-27 10:26:13 +01:00
David Baker
1786b0e768
Forgot the new file again :(
2017-09-27 10:22:54 +01:00
David Baker
8ad5f34908
pep8
2017-09-26 19:21:41 +01:00
David Baker
6cd5fcd536
Make the spam checker a module
2017-09-26 19:20:23 +01:00
David Baker
ccc67d445b
Merge pull request #2473 from matrix-org/dbkr/factor_out_module_loading
...
Factor out module loading to a separate place
2017-09-26 18:12:17 +01:00
David Baker
9fd086e506
unnecessary parens
2017-09-26 17:59:46 +01:00
David Baker
0b03a97708
Add module_loader.py
2017-09-26 17:56:41 +01:00
David Baker
4824a33c31
Factor out module loading to a separate place
...
So it can be reused
2017-09-26 17:51:26 +01:00
Erik Johnston
1e5fcfd14a
Merge pull request #2472 from matrix-org/erikj/groups_rooms
...
Add remove room from group API
2017-09-26 16:05:46 +01:00
Erik Johnston
17b8e2bd02
Add remove room API
2017-09-26 15:52:41 +01:00
Erik Johnston
a8e2a3df32
Add unique index to group_rooms table
2017-09-26 15:39:21 +01:00
Erik Johnston
0d7c7fd907
Merge pull request #2471 from matrix-org/erikj/group_summary_publicised
...
Add is_publicised to group summary
2017-09-26 11:33:21 +01:00
Erik Johnston
95298783bb
Add is_publicised to group summary
2017-09-26 11:04:37 +01:00
Richard van der Hoff
b4fd710e1a
Merge pull request #2464 from rnbdsh/patch-4
...
Remove non-existing files, add stop, use synctl
2017-09-25 09:33:22 +01:00
rnbdsh
b68b0ede7a
Start traditionally, stop synctl
...
Starting with synctl lead to "no config file found"
Stopping also leads to some (code=exited, status=1/FAILURE), but at least now we can stop the service.
2017-09-24 04:55:19 +02:00
rnbdsh
68f737702b
Remove non-existing files, add stop, use synctl
...
Non-existing files, when running the suggested from https://github.com/matrix-org/synapse#configuring-synapse
/etc/synapse/log_config.yaml so the --log-config leads to an error
/etc/sysconfig/synapse The environment-file or even the /etc/sysconfig does not exist in arch linux
Also instead of calling python2 we use synctl, as this seems to be the proper way to start it, and it gives us a more useful error in the systemctl status. And we now allow stop (and therefore restart).
2017-09-24 04:26:23 +02:00
Erik Johnston
e1dec2f1a7
Remove user from group summary when the leave the group
2017-09-21 16:09:57 +01:00
Erik Johnston
bb746a9de1
Revert: Keep room_id's in group summary
2017-09-21 15:57:22 +01:00
Erik Johnston
ae8d4bb0f0
Keep room_id's in group summary
2017-09-21 15:55:18 +01:00
Erik Johnston
197d82dc07
Correctly return next token
2017-09-20 11:12:11 +01:00
Erik Johnston
069ae2df12
Fix initial sync
2017-09-20 10:52:12 +01:00
Erik Johnston
47d9848dc4
Merge pull request #2454 from matrix-org/erikj/groups_sync_creator
...
Ensure that creator of group sees group down /sync
2017-09-19 11:21:26 +01:00
Erik Johnston
93e504d04e
Ensure that creator of group sees group down /sync
2017-09-19 11:08:16 +01:00
Erik Johnston
b5feaa5a49
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/groups_merged
2017-09-19 11:07:45 +01:00
Erik Johnston
7f0d0ba3bc
Merge pull request #2430 from matrix-org/erikj/groups_profile_cache
...
Add user profiles to summary from group server
2017-08-25 16:48:58 +01:00
Erik Johnston
4a9b1cf253
Add user profiles to summary from group server
2017-08-25 16:23:58 +01:00
Erik Johnston
6d8799af1a
Merge pull request #2429 from matrix-org/erikj/groups_profile_cache
...
Add a remote user profile cache
2017-08-25 15:52:42 +01:00
Erik Johnston
258409ef61
Fix typos and reinherit
2017-08-25 14:45:20 +01:00
Erik Johnston
bf81f3cf2c
Split out profile handler to fix tests
2017-08-25 14:34:56 +01:00
Erik Johnston
27ebc5c8f2
Add remote profile cache
2017-08-25 11:25:47 +01:00
Erik Johnston
97c544f91f
Add _simple_update
2017-08-25 11:11:37 +01:00
Erik Johnston
2800983f3e
Merge pull request #2410 from matrix-org/erikj/groups_publicise
...
Add ability to publicise group membership
2017-08-21 16:51:56 +01:00
Erik Johnston
8b50fe5330
Use BOOLEAN rather than TEXT type
2017-08-21 16:37:29 +01:00
Erik Johnston
73b4e18c62
Merge pull request #2426 from matrix-org/erikj/groups_fix_sync
...
Groups: Fix mising json.load in initial sync
2017-08-21 16:37:14 +01:00
Erik Johnston
175a01f56c
Groups: Fix mising json.load in initial sync
2017-08-21 14:45:56 +01:00
Erik Johnston
ba3ff7918b
Fixup
2017-08-11 13:42:42 +01:00
Erik Johnston
ef8e578677
Add bulk group publicised lookup API
2017-08-09 13:36:22 +01:00
Erik Johnston
b880ff190a
Allow update group publicity
2017-08-08 14:19:41 +01:00
Erik Johnston
05e21285aa
Store whether the user wants to publicise their membership of a group
2017-08-08 13:01:46 +01:00
Erik Johnston
a1e67bcb97
Remove stale TODO comments
2017-08-04 10:07:10 +01:00
Erik Johnston
ebbaae5526
Merge pull request #2382 from matrix-org/erikj/group_privilege
...
Include users membership in group in summary API
2017-07-24 18:09:12 +01:00
Erik Johnston
966a70f1fa
Update comment
2017-07-24 17:49:39 +01:00
Erik Johnston
629cdfb124
Use join rather than joined, etc.
2017-07-24 14:54:05 +01:00
Erik Johnston
ed666d3969
Fix all the typos
2017-07-24 14:05:09 +01:00
Erik Johnston
b76ef6ccb8
Include users membership in group in summary API
2017-07-24 13:55:39 +01:00
Erik Johnston
851aeae7c7
Check users/rooms are in group before adding to summary
2017-07-24 13:40:56 +01:00
Erik Johnston
d5e32c843f
Correctly add joins to correct segment
2017-07-24 13:31:26 +01:00
Erik Johnston
96917d5552
Merge pull request #2378 from matrix-org/erikj/group_sync_support
...
Add groups to sync stream
2017-07-21 11:05:39 +01:00
Erik Johnston
0401604222
Merge pull request #2377 from matrix-org/erikj/group_profile_update
...
Add update group profile API
2017-07-20 17:53:39 +01:00
Erik Johnston
b238cf7f6b
Remove spurious content param
2017-07-20 17:49:55 +01:00
Erik Johnston
960dae3340
Add notifier
2017-07-20 17:14:44 +01:00
Erik Johnston
2cc998fed8
Fix replication. And notify
2017-07-20 17:13:18 +01:00
Erik Johnston
139fe30f47
Remember to cast to bool
2017-07-20 16:47:35 +01:00
Erik Johnston
4d793626ff
Fix bug in generating current token
2017-07-20 16:42:44 +01:00
Erik Johnston
c544188ee3
Add groups to sync stream
2017-07-20 16:36:42 +01:00
Erik Johnston
0ab153d201
Check values are strings
2017-07-20 16:24:18 +01:00
Erik Johnston
8209b5f033
Fix a storage desc
2017-07-20 16:22:22 +01:00
Erik Johnston
b3bf6a1218
Merge pull request #2374 from matrix-org/erikj/group_server_local
...
Add local group server support
2017-07-20 13:15:42 +01:00
Erik Johnston
57826d645b
Fix typo
2017-07-20 13:15:22 +01:00
Erik Johnston
6f443a74cf
Add update group profile API
2017-07-20 09:46:33 +01:00
Erik Johnston
14a34f12d7
Comments
2017-07-18 17:28:42 +01:00
Erik Johnston
3431ec55dc
Comments
2017-07-18 17:23:50 +01:00
Erik Johnston
6027b1992f
Fix permissions
2017-07-18 16:51:25 +01:00
Erik Johnston
e884ff31d8
Add DELETE
2017-07-18 16:41:44 +01:00
Erik Johnston
05c13f6c22
Add 'args' param to post_json
2017-07-18 16:40:21 +01:00
Erik Johnston
94ecd871a0
Fix typos
2017-07-18 16:38:54 +01:00
Erik Johnston
12ed4ee48e
Correctly parse query params
2017-07-18 15:33:09 +01:00
Erik Johnston
332839f6ea
Update federation client pokes
2017-07-18 14:45:37 +01:00
Erik Johnston
e5ea6dd021
Add client apis
2017-07-18 14:37:06 +01:00
Erik Johnston
cccfcfa7b9
Comments
2017-07-18 10:35:18 +01:00
Erik Johnston
68f34e85ce
Use transport client directly
2017-07-18 10:29:57 +01:00
Erik Johnston
3e703eb04e
Comment
2017-07-18 10:17:25 +01:00
Erik Johnston
508460f240
Remove sync stuff
2017-07-18 09:55:46 +01:00
Erik Johnston
6e9f147faa
Add GroupID type
2017-07-18 09:47:25 +01:00
Erik Johnston
4540730111
Remove unused tables
2017-07-18 09:38:15 +01:00
Erik Johnston
e96ee95a7e
Remove sync stuff
2017-07-18 09:38:08 +01:00
Erik Johnston
2f9eafdd36
Add local group server support
2017-07-17 12:03:49 +01:00
Erik Johnston
b3de67234e
Merge pull request #2363 from matrix-org/erikj/group_server_summary
...
Add group summary APIs
2017-07-17 11:54:14 +01:00
Erik Johnston
cb3aee8219
Ensure category and role ids are non-null
2017-07-14 14:06:55 +01:00
Erik Johnston
85fda57208
Add DEFAULT_ROLE_ID
2017-07-14 14:03:54 +01:00
Erik Johnston
4b203bdba5
Correctly increment orders
2017-07-14 14:02:31 +01:00
Erik Johnston
3b0470dba5
Remove unused functions
2017-07-13 13:54:01 +01:00
Erik Johnston
8575e3160f
Comments
2017-07-13 13:52:41 +01:00
Erik Johnston
a78cda4baf
Remove TODO
2017-07-13 11:17:07 +01:00
Erik Johnston
7a39da8cc6
Add summary APIs to federation
2017-07-13 11:13:19 +01:00
Erik Johnston
5bbb53580a
raise NotImplementedError
2017-07-13 10:25:29 +01:00
Erik Johnston
26451a09eb
Comments
2017-07-12 14:47:18 +01:00
Erik Johnston
8d55877c9e
Simplify checking if admin
2017-07-12 11:43:39 +01:00
Erik Johnston
a62406aaa5
Add group summary APIs
2017-07-12 11:36:15 +01:00
Erik Johnston
28e8c46f29
Merge pull request #2352 from matrix-org/erikj/group_server_split
...
Initial Group Server
2017-07-12 10:26:29 +01:00
Erik Johnston
6d586dc05c
Comment
2017-07-12 09:58:37 +01:00
Erik Johnston
410b4e14a1
Move comment
2017-07-11 15:44:18 +01:00
Erik Johnston
fe4e885f54
Add federation API for adding room to group
2017-07-11 14:35:07 +01:00
Erik Johnston
bbb739d24a
Comment
2017-07-11 14:31:36 +01:00
Erik Johnston
26752df503
Typo
2017-07-11 14:29:03 +01:00
Erik Johnston
e52c391cd4
Rename column to attestation_json
2017-07-11 14:25:46 +01:00
Erik Johnston
0aac30d53b
Comments
2017-07-11 14:23:50 +01:00
Erik Johnston
6322fbbd41
Comment
2017-07-11 11:52:03 +01:00
Erik Johnston
8ba89f1050
Remove u/ requirement
2017-07-11 11:45:32 +01:00
Erik Johnston
429925a5e9
Lift out visibility parsing
2017-07-11 11:44:08 +01:00
Erik Johnston
83936293eb
Comments
2017-07-11 11:42:25 +01:00
Erik Johnston
b8ca494ee9
Initial group server implementation
2017-07-10 15:44:15 +01:00