0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-06-03 03:09:02 +02:00
synapse/synapse
Kegan Dougal 259442fa4c
bugfix: make msc3967 idempotent (#16943)
MSC3967 was updated recently to make it more robust to network failures:

> there is an existing cross-signing master key and it exactly matches
the cross-signing master key provided in the request body. If there are
any additional keys provided in the request (self signing key, user
signing key) they MUST also match the existing keys stored on the
server. In other words, the request contains no new keys. If there are
new keys, UIA MUST be performed.


https://github.com/matrix-org/matrix-spec-proposals/blob/hughns/device-signing-upload-uia/proposals/3967-device-signing-upload-uia.md#proposal

This covers the case where the 200 OK is lost in transit so the client
retries the upload, only to then get UIA'd.

Complement tests: https://github.com/matrix-org/complement/pull/713 -
passing example
https://github.com/element-hq/synapse/actions/runs/7976948122/job/21778795094?pr=16943#step:7:8820

### Pull Request Checklist

<!-- Please read
https://element-hq.github.io/synapse/latest/development/contributing_guide.html
before submitting your pull request -->

* [x] Pull request is based on the develop branch
* [x] Pull request includes a [changelog
file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog).
The entry should:
- Be a short description of your change which makes sense to users.
"Fixed a bug that prevented receiving messages from other servers."
instead of "Moved X method from `EventStore` to `EventWorkerStore`.".
  - Use markdown where necessary, mostly for `code blocks`.
  - End with either a period (.) or an exclamation mark (!).
  - Start with a capital letter.
- Feel free to credit yourself, by adding a sentence "Contributed by
@github_username." or "Contributed by [Your Name]." to the end of the
entry.
* [x] [Code
style](https://element-hq.github.io/synapse/latest/code_style.html) is
correct
(run the
[linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))

---------

Co-authored-by: reivilibre <oliverw@matrix.org>
2024-04-15 10:57:56 +00:00
..
_scripts Add support for moving /push_rules off of main process (#17037) 2024-03-28 15:44:07 +00:00
api Improve event validation (#16908) 2024-03-19 17:52:53 +00:00
app Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
appservice Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
config Stabilize support for MSC4010: push rules & account data. (#17022) 2024-04-09 17:11:50 +01:00
crypto Only do one concurrent fetch per server in keyring (#16894) 2024-02-09 10:51:11 +00:00
events Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
federation Ensure that pending to-device events are sent over federation at startup (#16925) 2024-03-22 13:24:11 +00:00
handlers bugfix: make msc3967 idempotent (#16943) 2024-04-15 10:57:56 +00:00
http Fix mypy on latest Twisted release (#17036) 2024-04-11 16:03:45 +01:00
logging Bump mypy from 1.5.1 to 1.8.0 (#16901) 2024-03-13 17:05:57 +00:00
media Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
metrics Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
module_api Bump mypy from 1.5.1 to 1.8.0 (#16901) 2024-03-13 17:05:57 +00:00
push Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
replication Fixups to new push stream (#17038) 2024-03-28 16:29:23 +00:00
res Use oEmbed for YouTube Shorts (#15025) 2023-05-03 12:54:42 -04:00
rest bugfix: make msc3967 idempotent (#16943) 2024-04-15 10:57:56 +00:00
server_notices Merge remote-tracking branch 'gitlab/clokep/license-license' into new_develop 2023-12-13 15:11:56 +00:00
spam_checker_api Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
state Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
static Update link to the clients webpage, fix #15825 (#15874) 2023-07-06 17:28:09 +02:00
storage Use receipts event_stream_ordering instead of joins (#17032) 2024-04-12 09:28:44 +01:00
streams Bump mypy from 1.5.1 to 1.8.0 (#16901) 2024-03-13 17:05:57 +00:00
synapse_rust Bump ruff from 0.1.14 to 0.3.2 (#16994) 2024-03-13 17:06:23 +00:00
types Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
util Ensure that pending to-device events are sent over federation at startup (#16925) 2024-03-22 13:24:11 +00:00
__init__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
_pydantic_compat.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
event_auth.py Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
notifier.py Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
py.typed Mark Module API error imports as re-exported and mark Synapse as containing type annotations (#11054) 2021-10-13 08:42:41 +01:00
server.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
visibility.py Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00