From 5a2e5e11dfb9e73cb5a68efb10ba038c8bfb10fc Mon Sep 17 00:00:00 2001 From: akwizgran Date: Fri, 24 Apr 2015 18:20:03 +0000 Subject: [PATCH] Blog signature must cover the client ID --- BlogClient.markdown | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/BlogClient.markdown b/BlogClient.markdown index 45277e8..511dff0 100644 --- a/BlogClient.markdown +++ b/BlogClient.markdown @@ -7,17 +7,19 @@ BlogClient uses the following client identifer: Each blog has its own channel, and there is a single invitation channel shared by all blogs. The [channel descriptor](BSP#channel-identifiers) for the invitation channel is an empty [BDF list](BDF). -The channel descriptor for a blog channel is a list with two elements: `name` (string) and `public_key` (raw). +The channel descriptor for a blog channel is a list with three elements: `title` (string) and `public_key` (raw). ### Message types -**0: INVITATION** - The content is a list with three elements: `name` (string), `public_key` (raw), and `note` (string or null). The channel identifier can be calculated from `name` and `public_key`, as described above. `note` is an optional note from the inviter to the invitee. +**0: INVITATION** - The content is a list with three elements: `title` (string), `public_key` (raw), and `note` (string or null). The channel identifier can be calculated from `title` and `public_key`, as described above. `note` is an optional note from the inviter to the invitee. **1: RESPONSE** - The content is a 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 list with one element: `invitation_id` (raw), which is the identifier of an invitation created by either peer. -**3: POST** - The content is a list with two elements: `content` (list) and `signature` (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 follow-up. 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 list with two elements: `content` (list) and `signature` (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 follow-up. 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). `signature` is a signature over a list with three elements: `channel_id` (raw), `timestamp` (int), and `content` (list). `channel_id` and `timestamp` are taken from the [message header](BSP#message-format). `content` is described above.