From 0908b7b3b9849137af3f514bd816b05683aa9781 Mon Sep 17 00:00:00 2001 From: akwizgran Date: Fri, 24 Apr 2015 15:50:02 +0000 Subject: [PATCH] Blog signature must cover timestamp --- BlogClient.markdown | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/BlogClient.markdown b/BlogClient.markdown index a9200f8..0c4ac79 100644 --- a/BlogClient.markdown +++ b/BlogClient.markdown @@ -12,15 +12,15 @@ The client identifer is random: ### Message types -**0: INVITATION** - The content is a BDF list with three elements: `blog` (list) and `note` (string, may be null). `blog` is a list with two elements, `name` and `public_key`, as described above. `note` is an optional note from the inviter to the invitee. +**0: INVITATION** - The content is a BDF list with two elements: `blog` (list) and `note` (string, may be null). `blog` is a list with two elements, `name` and `public_key`, 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, may be 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. +**1: RESPONSE** - The content is a list with three elements: `invitation_id` (raw), `decision` (boolean), and `note` (string, may be 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. +**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 BDF list with two elements: `signature` (raw) and `content` (list). `signature` is calculated over `content`. +**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, may be null), `body` (string), and `attachments` (dictionary, may be null). If `parent_id` is not null, it 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). -`content` is a list with three elements: `parent_id` (raw, may be null), `body` (string), and `attachments` (dictionary, may be null). If `parent_id` is not null, it 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 calculated over a list with three elements: `blog` (list), `timestamp` (int), and `content` (list). `blog` and `content` are described above. `timestamp` is the timestamp from the [message header](BSP#message-format). **4: ATTACHMENT** - The content is raw data.