From 7c5e991f78976502fdfecc788d99b09bb299c640 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Wed, 4 May 2022 15:02:20 +0100 Subject: [PATCH 1/3] Attempt to define a valid event Resolves #1044. Well, maybe. --- content/server-server-api.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/server-server-api.md b/content/server-server-api.md index cb9fb640f..938cf825c 100644 --- a/content/server-server-api.md +++ b/content/server-server-api.md @@ -355,7 +355,9 @@ specification](/rooms). Whenever a server receives an event from a remote server, the receiving server must ensure that the event: -1. Is a valid event, otherwise it is dropped. +1. Is a valid event, otherwise it is dropped. For an event to be valid, it + must contain a `room_id`, and it must comply with the event format of + that room version. 2. Passes signature checks, otherwise it is dropped. 3. Passes hash checks, otherwise it is redacted before being processed further. From f477e9e105abaee4721bcc614d45dce62e8607d3 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Wed, 4 May 2022 15:23:22 +0100 Subject: [PATCH 2/3] Changelog --- changelogs/server_server/newsfragments/1045.clarification | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelogs/server_server/newsfragments/1045.clarification diff --git a/changelogs/server_server/newsfragments/1045.clarification b/changelogs/server_server/newsfragments/1045.clarification new file mode 100644 index 000000000..7b8055692 --- /dev/null +++ b/changelogs/server_server/newsfragments/1045.clarification @@ -0,0 +1 @@ +Expand a little on what it means for a PDU to be valid when discussing checks on PDUs. From 3fb806d281065e99a2f67a776feb347e30ffd475 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Tue, 10 May 2022 20:49:12 +0100 Subject: [PATCH 3/3] link to /rooms, thanks Travis Co-authored-by: Travis Ralston --- content/server-server-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/server-server-api.md b/content/server-server-api.md index 938cf825c..60bc57e63 100644 --- a/content/server-server-api.md +++ b/content/server-server-api.md @@ -357,7 +357,7 @@ server must ensure that the event: 1. Is a valid event, otherwise it is dropped. For an event to be valid, it must contain a `room_id`, and it must comply with the event format of - that room version. + that [room version](/rooms). 2. Passes signature checks, otherwise it is dropped. 3. Passes hash checks, otherwise it is redacted before being processed further.