From 4c5082e1c6967867bb9f4dfbde20dde5bc39cb52 Mon Sep 17 00:00:00 2001 From: akwizgran Date: Fri, 24 Apr 2015 18:26:29 +0000 Subject: [PATCH] Blog signature must cover the client ID --- ForumClient.markdown | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ForumClient.markdown b/ForumClient.markdown index 45d4afb..72b8f6b 100644 --- a/ForumClient.markdown +++ b/ForumClient.markdown @@ -7,20 +7,22 @@ ForumClient uses the following client identifer: Each forum has its own channel, and there is a single invitation channel shared by all forums. The [channel descriptor](BSP#channel-identifiers) for the invitation channel is an empty [BDF list](BDF). -The channel descriptor for a forum channel is a list with two elements: `name` (string) and `salt` (raw). The salt is HASH_LEN random bytes to prevent collisions between forums with the same name. +The channel descriptor for a forum channel is a list with two elements: `title` (string) and `salt` (raw). The salt is HASH_LEN random bytes to prevent collisions between forums with the same name. ### Message types -**0: INVITATION** - The content is a BDF list with three elements: `name` (string), `salt` (raw), and `note` (string or null). The channel identifier can be calculated from `name` and `salt`, as described above. `note` is an optional note from the inviter to the invitee. +**0: INVITATION** - The content is a BDF list with three elements: `title` (string), `salt` (raw), and `note` (string or null). The channel identifier can be calculated from `title` and `salt`, as described above. `note` is an optional note from the inviter to the invitee. **1: RESPONSE** - The content is a BDF list with three elements: `invitation_id` (raw), `decision` (boolean), and `note` (string or null). `invitation_id` is the identifier of an invitation created by the opposite peer. `decision` indicates whether the invitee wishes to subscribe. `note` is an optional note from the invitee to the inviter. **2: DEPARTURE** - The content is a BDF list with one element: `invitation_id` (raw), which is the identifier of an invitation created by either peer. -**3: POST** - The content is a BDF list with two elements: `content` (list) and `author` (list or null), and `signature` (raw or null). `content` is a list with three elements: `parent_id` (raw or null), `body` (string), and `attachments` (dictionary or null). `parent_id` is the identifier of a post to which this is a response. Each key in `attachments` is the name of an attachment, and the value is a list with two elements: `mime_type` (string) and `message_id` (raw). +**3: POST** - The content is a BDF list with three elements: `author` (list or null), `content` (list), and `signature` (raw or null). If `author` is null, the post is anonymous and `signature` must also be null. Otherwise `author` is a list with two elements: `name` (string) and `public_key` (raw). +`content` is a list with three elements: `parent_id` (raw or null), `body` (string), and `attachments` (dictionary or null). `parent_id` is the identifier of a post to which this is a response. Each key in `attachments` is the name of an attachment, and the value is a list with two elements: `mime_type` (string) and `message_id` (raw). + If `signature` is null, the post is anonymous and `author` must also be null. Otherwise `signature` is a signature over a list with four elements: `channel_id` (raw), `timestamp` (int), `author` (list), and `content` (list). `channel_id` and `timestamp` are taken from the [message header](BSP#message-format). `author` and `content` are described above. **4: ATTACHMENT** - The content is raw data.