Andrew Morgan
9d9bd2bb81
Merge commit '631dd06f2' into anoa/dinsic_release_1_31_0
2021-04-22 16:22:43 +01:00
Andrew Morgan
527049b71a
Merge commit '233c8b9fc' into anoa/dinsic_release_1_31_0
2021-04-22 16:22:21 +01:00
Andrew Morgan
77f011b8fd
Merge commit '98a64b7f7' into anoa/dinsic_release_1_31_0
2021-04-22 16:21:11 +01:00
Andrew Morgan
bae39a4777
Merge commit '3dd6ba135' into anoa/dinsic_release_1_31_0
2021-04-21 16:17:14 +01:00
Andrew Morgan
64150ac9ba
Merge commit 'a03d71dc9' into anoa/dinsic_release_1_31_0
2021-04-21 16:16:41 +01:00
Andrew Morgan
4c970214af
Merge commit '23d701864' into anoa/dinsic_release_1_31_0
2021-04-21 16:16:22 +01:00
Andrew Morgan
c7cd7b4545
Merge commit '0312266ee' into anoa/dinsic_release_1_31_0
2021-04-21 16:16:10 +01:00
Andrew Morgan
1ca3f40437
Merge commit '1c9a85056' into anoa/dinsic_release_1_31_0
2021-04-21 15:35:26 +01:00
Andrew Morgan
744f456324
Merge commit '9999eb2d0' into anoa/dinsic_release_1_31_0
2021-04-21 15:35:15 +01:00
Andrew Morgan
82b462401f
Merge commit '4218473f9' into anoa/dinsic_release_1_31_0
2021-04-21 15:34:28 +01:00
Andrew Morgan
52620bdb83
Merge commit '28877fade' into anoa/dinsic_release_1_31_0
2021-04-21 15:09:52 +01:00
Andrew Morgan
995136eb38
Merge commit 'a7a913918' into anoa/dinsic_release_1_31_0
2021-04-20 17:42:58 +01:00
Andrew Morgan
ed6742cb30
Merge commit 'c9c1c9d82' into anoa/dinsic_release_1_31_0
2021-04-20 16:59:59 +01:00
Andrew Morgan
83c1c8a56b
Merge commit 'ff5c4da12' into anoa/dinsic_release_1_31_0
2021-04-20 16:41:22 +01:00
Andrew Morgan
59766708cf
Fix old-style uses of self.make_request in dinum test code
2021-04-16 15:46:03 +01:00
Andrew Morgan
ec2cab331d
Merge commit 'bd30cfe86' into anoa/dinsic_release_1_31_0
2021-04-16 15:45:40 +01:00
Andrew Morgan
7fd80c73cc
Merge commit '8388a7fb3' into anoa/dinsic_release_1_31_0
2021-04-16 15:06:31 +01:00
Andrew Morgan
394e6d2c72
Merge commit '01333681b' into anoa/dinsic_release_1_31_0
2021-04-16 15:06:19 +01:00
Andrew Morgan
22927d6ee8
lint
2021-04-16 15:06:06 +01:00
Andrew Morgan
cf1e0196bb
Merge commit 'f14428b25' into anoa/dinsic_release_1_31_0
2021-04-16 15:02:53 +01:00
Andrew Morgan
eb19dc5578
Merge commit 'c64002e1c' into anoa/dinsic_release_1_31_0
2021-04-16 14:26:36 +01:00
Andrew Morgan
8011007148
Merge commit '6ff34e00d' into anoa/dinsic_release_1_31_0
2021-04-16 14:26:27 +01:00
Andrew Morgan
93db8f1992
Merge commit 'cf7d3c90d' into dinsic
2021-04-16 12:33:45 +01:00
Andrew Morgan
0060eb332c
Port "Allow providing credentials to HTTPS_PROXY ( #9657 )" from mainline ( #95 )
...
* Allow providing credentials to HTTPS_PROXY (#9657 )
Addresses https://github.com/matrix-org/synapse-dinsic/issues/70
This PR causes `ProxyAgent` to attempt to extract credentials from an `HTTPS_PROXY` env var. If credentials are found, a `Proxy-Authorization` header ([details](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Proxy-Authorization )) is sent to the proxy server to authenticate against it. The headers are *not* passed to the remote server.
Also added some type hints.
* lint
2021-03-23 15:35:38 +01:00
Andrew Morgan
0da5273f71
Stabilise all knock-related unstable identifiers that would be in state ( #96 )
2021-03-23 13:44:34 +00:00
Andrew Morgan
232b324c38
Port "Add support for no_proxy and case insensitive env variables" from mainline to dinsic ( #93 )
...
This PR is simply porting https://github.com/matrix-org/synapse/pull/9372 to dinsic.
I also had to bring in https://github.com/matrix-org/synapse/pull/8821 and https://github.com/matrix-org/synapse/pull/9084 for this code to work properly - a sign that we should merge mainline into dinsic again soon.
2021-03-22 17:48:42 +00:00
Andrew Morgan
7a61b0e752
Change knock room version to v7 ( #88 )
2021-03-18 17:26:13 +00:00
Andrew Morgan
8f97c6c2da
Add a config option to prioritise local users in user directory search results ( #84 )
...
* Add a config option to prioritise local users in user directory search results (#9383 )
This PR adds a homeserver config option, `user_directory.prefer_local_users`, that when enabled will show local users higher in user directory search results than remote users. This option is off by default.
Note that turning this on doesn't necessarily mean that remote users will always be put below local users, but they should be assuming all other ranking factors (search query match, profile information present etc) are identical.
This is useful for, say, University networks that are openly federating, but want to prioritise local students and staff in the user directory over other random users.
* Don't mix simple and english psql query types
2021-02-19 12:11:02 +00:00
Andrew Morgan
79a213ecec
Send a ver query parameter for make_knock ( #83 )
...
This informs the remote server of the room versions we support. If the room we're trying to
knock on has a version that is not one of our supported room versions, the remote server
will return an unsupported room version error.
Noticed in https://github.com/matrix-org/matrix-doc/pull/2403#discussion_r577042144
Ported from https://github.com/matrix-org/synapse/pull/6739
2021-02-17 15:29:36 +00:00
Andrew Morgan
6bf58d8194
Add knocking support ( #81 )
...
Implement knocking as defined by https://github.com/matrix-org/matrix-doc/pull/2403
This is the base knocking stuff, taken from https://github.com/matrix-org/synapse/pull/6739
and does not include any public room directory changes.
While knocking hasn't merged yet on mainline due to waiting on getting Complement
into Synapse's CI, the code has been well-tested.
2021-02-09 19:07:00 +00:00
Mathieu Velten
d2953b3562
Add a parameter to enable/disable freeze feature ( #78 )
2021-01-21 15:17:40 +01:00
Andrew Morgan
e97045613c
Ensure we read account validity templates from custom template dir if provided ( #77 )
2021-01-19 10:07:15 +00:00
Erik Johnston
7036e24e98
Add background update for add chain cover index ( #9029 )
2021-01-14 15:18:27 +00:00
Richard van der Hoff
21a296cd5a
Split OidcProvider out of OidcHandler ( #9107 )
...
The idea here is that we will have an instance of OidcProvider for each
configured IdP, with OidcHandler just doing the marshalling of them.
For now it's still hardcoded with a single provider.
2021-01-14 13:29:17 +00:00
Richard van der Hoff
233c8b9fce
Add a test for UI-Auth-via-SSO ( #9082 )
...
* Add complete test for UI-Auth-via-SSO.
* review comments
2021-01-13 20:21:55 +00:00
Patrick Cloke
98a64b7f7f
Add basic domain validation for DomainSpecificString.is_valid. ( #9071 )
...
This checks that the domain given to `DomainSpecificString.is_valid` (e.g.
`UserID`, `RoomAlias`, etc.) is of a valid form. Previously some validation
was done on the localpart (e.g. the sigil), but not the domain portion.
2021-01-13 07:05:16 -05:00
Erik Johnston
aa4d8c1f9a
Merge branch 'master' into develop
2021-01-13 10:36:55 +00:00
Richard van der Hoff
bc4bf7b384
Preparatory refactors of OidcHandler ( #9067 )
...
Some light refactoring of OidcHandler, in preparation for bigger things:
* remove inheritance from deprecated BaseHandler
* add an object to hold the things that go into a session cookie
* factor out a separate class for manipulating said cookies
2021-01-13 10:26:12 +00:00
Dirk Klimpel
7a2e9b549d
Remove user's avatar URL and displayname when deactivated. ( #8932 )
...
This only applies if the user's data is to be erased.
2021-01-12 16:30:15 -05:00
Marcus
e385c8b473
Don't apply the IP range blacklist to proxy connections ( #9084 )
...
It is expected that the proxy would be on a private IP address so the
configured proxy should be connected to regardless of the IP range
blacklist.
2021-01-12 12:20:30 -05:00
Patrick Cloke
723b19748a
Handle bad JSON data being returned from the federation API. ( #9070 )
2021-01-12 11:07:01 -05:00
Richard van der Hoff
2ec8ca5e60
Remove SynapseRequest.get_user_agent ( #9069 )
...
SynapseRequest is in danger of becoming a bit of a dumping-ground for "useful stuff relating to Requests",
which isn't really its intention (its purpose is to override render, finished and connectionLost to set up the
LoggingContext and write the right entries to the request log).
Putting utility functions inside SynapseRequest means that lots of our code ends up requiring a
SynapseRequest when there is nothing synapse-specific about the Request at all, and any old
twisted.web.iweb.IRequest will do. This increases code coupling and makes testing more difficult.
In short: move get_user_agent out to a utility function.
2021-01-12 12:34:16 +00:00
David Teller
b161528fcc
Also support remote users on the joined_rooms admin API. ( #8948 )
...
For remote users, only the rooms which the server knows about are returned.
Local users have all of their joined rooms returned.
2021-01-11 14:32:17 -05:00
Dirk Klimpel
42d3a28d8b
Removes unnecessary declarations in the tests for the admin API. ( #9063 )
2021-01-11 11:15:54 -05:00
Erik Johnston
1315a2e8be
Use a chain cover index to efficiently calculate auth chain difference ( #8868 )
2021-01-11 16:09:22 +00:00
Richard van der Hoff
12f79da587
Merge pull request #9036 from matrix-org/rav/multi_idp/tests
...
Add tests for the IdP picker
2021-01-08 14:24:41 +00:00
Richard van der Hoff
d32870ffa5
Fix validate_config on nested objects ( #9054 )
2021-01-08 14:23:04 +00:00
Richard van der Hoff
8a910f97a4
Add some tests for the IDP picker flow
2021-01-07 14:56:42 +00:00
Richard van der Hoff
bbd04441ed
Fix type hints in test_login.py
2021-01-07 14:56:42 +00:00
Patrick Cloke
23d701864f
Improve the performance of calculating ignored users in large rooms ( #9024 )
...
This allows for efficiently finding which users ignore a particular
user.
Co-authored-by: Erik Johnston <erik@matrix.org >
2021-01-07 13:03:38 +00:00