1
0
Commit Graph

22887 Commits

Author SHA1 Message Date
Andrew Morgan
73589e86ef Use room version, not "hub_server" field when adding/validating "origin"
As other events sent in a LM room that are not on behalf of
participating servers will not have this field.
2023-07-22 22:29:20 +01:00
Andrew Morgan
ebb76e6917 If we are acting on a PDU, keep the "lpdu" hash intact.
To match the logic defined by section 9.1.1 of draft-ralston-mimi-linearized-matrix-03.
2023-07-20 17:26:57 +01:00
Andrew Morgan
98ff8d6f30 Fix a couple type hints. 2023-07-20 17:13:15 +01:00
Andrew Morgan
cbf930edf8 Do not add origin field to LPDUs.
Synapse has a bad habit of adding `origin` to the top-level of event content.

The Linearized Matrix spec does not include `origin`, and in fact cannot as that will cause the content hashes and signatures computed by the participant server to differ from Synapse's own results.

So, we perform a hack here to drop `origin` from any event derived from an LPDU event. Other DAG homeserver implementations might be sad however.
2023-07-20 17:12:49 +01:00
Travis Ralston
565b9f983d Fix https://github.com/matrix-org/synapse/issues/15962
Not breaking anything in LM, but might as well while we're here.
2023-07-19 15:49:11 -06:00
Travis Ralston
1e77a62c1d Fix(?) MSC2176 implementation
Pending resolution of https://matrix.to/#/!NasysSDfxKxZBzJJoE:matrix.org/$yCZra9xATiCfKehho6N52m_22ag9TD_tMoqX3GXEwL0?via=matrix.org&via=libera.chat&via=element.io
2023-07-19 15:48:32 -06:00
Patrick Cloke
c50cb6e391 Add note 2023-07-18 12:13:43 -04:00
Patrick Cloke
e0164d9a21 Linting. 2023-07-18 11:57:05 -04:00
Patrick Cloke
36cd55f6a0 Sort auth/state. 2023-07-18 11:56:49 -04:00
Patrick Cloke
98c864bd46 Do not return depth. 2023-07-18 11:56:16 -04:00
Patrick Cloke
b04530ebd3 Fix accepting an invite. 2023-07-18 11:41:50 -04:00
Patrick Cloke
ab75a7d2ac Fix creating events from LPDUs. 2023-07-18 10:12:55 -04:00
Patrick Cloke
3fc09bb13a Remove unsigned and depth in more places. 2023-07-18 09:50:05 -04:00
Patrick Cloke
dcd3d5cdc6 Provide templated LPDUs for make_{join,leave,knock} requests. 2023-07-17 11:05:44 -04:00
Patrick Cloke
547a7076b4 Accept LPDUs in transactions and fan them back out. 2023-07-17 11:05:44 -04:00
Patrick Cloke
c74a073389 Convert new-style EDUs to old-style EDUs. 2023-07-17 11:05:44 -04:00
Patrick Cloke
b90edc168e Implement new device endpoint. 2023-07-17 11:05:44 -04:00
Patrick Cloke
48193d339f Implement new send endpoint. 2023-07-17 11:05:44 -04:00
Patrick Cloke
ae26625694 Implement new invite endpoint. 2023-07-17 11:05:44 -04:00
Patrick Cloke
a2d697b745 Implement new send_{join,leave,knock} endpoints. 2023-07-17 11:05:44 -04:00
Patrick Cloke
23cd415b9e Implement new event and backfill endpoints. 2023-07-17 11:05:43 -04:00
Patrick Cloke
b38ba4a8b1 Handle LPDU content hash. 2023-07-17 11:05:43 -04:00
Patrick Cloke
2c7001679e Ignore non-state events sent in state. 2023-07-17 11:05:43 -04:00
Patrick Cloke
c02f115306 Linearized Matrix events do not have a depth. 2023-07-17 11:05:43 -04:00
Patrick Cloke
ddd3d43049 Remove references to m.room.hub events. 2023-07-17 11:05:43 -04:00
Patrick Cloke
cf26b9f897 Update for v2. 2023-07-17 11:05:43 -04:00
Patrick Cloke
24647487a0 Revert "Initial routing of events." 2023-07-17 11:05:43 -04:00
Patrick Cloke
b33bea983c Initial routing of events. 2023-07-17 11:05:43 -04:00
Patrick Cloke
a93540b60d Disable TLS over federation. 2023-07-17 11:05:43 -04:00
Patrick Cloke
123b63a443 Initial cut at signature verification. 2023-07-17 11:05:43 -04:00
dependabot[bot]
c692283751 Bump anyhow from 1.0.71 to 1.0.72 (#15949)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-17 13:20:34 +01:00
dependabot[bot]
43ee5d5bac Bump pyo3-log from 0.8.2 to 0.8.3 (#15951)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-17 10:46:26 +01:00
dependabot[bot]
1768dd3c27 Bump serde_json from 1.0.100 to 1.0.103 (#15950)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-17 10:45:46 +01:00
dependabot[bot]
0d522b58a6 Bump jsonschema from 4.17.3 to 4.18.3 (#15948)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-17 10:39:51 +01:00
dependabot[bot]
b0e66721a5 Bump typing-extensions from 4.5.0 to 4.7.1 (#15947)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-17 10:33:47 +01:00
dependabot[bot]
6396527015 Bump pydantic from 1.10.10 to 1.10.11 (#15946)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-17 10:30:46 +01:00
dependabot[bot]
d2f46ae370 Bump prometheus-client from 0.17.0 to 0.17.1 (#15945)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-17 10:30:10 +01:00
Andrew Morgan
85e0541db1 Pin the rust version in flake.nix, and bump to 1.70.0 to fix installing ruff (#15940) 2023-07-17 09:36:12 +01:00
dependabot[bot]
cba2df20b5 Bump cryptography from 41.0.1 to 41.0.2 (#15943)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-15 21:37:59 +01:00
Will Hunt
8d3656b994 Document that you cannot login as yourself on /_synapse/admin/v1/users/<user_id>/login (#15938) 2023-07-14 08:32:13 -04:00
Patrick Cloke
20ae617d14 Stop accepting 'user' parameter for application service registration. (#15928)
This is unspecced, but has existed for a very long time.
2023-07-13 07:23:56 -04:00
dependabot[bot]
2cacd0849a Bump types-pillow from 9.5.0.4 to 10.0.0.1 (#15932)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-13 11:21:28 +01:00
Patrick Cloke
204b66c203 Remove unneeded __init__. (#15926)
Remove an __init__ which only calls super() without changing the
input arguments.
2023-07-12 14:30:05 +00:00
Patrick Cloke
5bdf01fccd Fix running with an empty experimental features section. (#15925) 2023-07-12 12:39:25 +00:00
Erik Johnston
36c6b92bfc Fix push for invites received over federation (#15820) 2023-07-12 11:02:11 +00:00
Mathieu Velten
8eb7bb975e Mark get_user_in_directory private since only used in tests (#15884) 2023-07-12 11:09:13 +02:00
Eric Eastwood
3bdb9b07fd Make it more obvious which Python version runs on a given Linux distribution (#15909)
Make it more obvious which Python version runs on a given Linux distribution so when we end up dropping support for a given Python version, we can more easily find the reference to the Python version and remove any references for the distribution. We don't want to be running tests or building packages on a distribution that no longer has a supported Python version.

This way, we can avoid another situation like when we dropped support for Python 3.7 but forgot to drop the Debian Buster references everywhere (https://github.com/matrix-org/synapse/pull/15893)
2023-07-11 17:15:06 -05:00
Eric Eastwood
0371a354cf Better clarify how to run a worker instance (pass both configs) (#15921)
Previously, if you just followed the instructions per the docs, you just ran into an error:

```sh
$ poetry run synapse_worker --config-path homeserver_generic_worker1.yaml

Missing mandatory `server_name` config option.
```
2023-07-11 17:13:54 -05:00
Eric Eastwood
ae391db777 Better warning in logs when we fail to fetch an alias (#15922)
**Before:**
```
Error retrieving alias
```

**After:**
```
Error retrieving alias #foo:bar -> 401 Unauthorized
```

*Spawning from creating the [manual testing strategy for the outbound federation proxy](https://github.com/matrix-org/synapse/pull/15773).*
2023-07-11 17:12:41 -05:00
Eric Eastwood
d7fc87d973 Bump Unix sockets intro version (#15924)
https://github.com/matrix-org/synapse/pull/15708 didn't quite make the cut for `1.88.0` this morning.
2023-07-11 15:32:50 -05:00