mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Handle HTTP signature draft 11
This commit is contained in:
@@ -147,6 +147,17 @@ describe('Test ActivityPub security', function () {
|
||||
}
|
||||
})
|
||||
|
||||
it('Should succeed with a valid HTTP signature draft 11 (without date but with (created))', async function () {
|
||||
const body = activityPubContextify(getAnnounceWithoutContext(servers[1]), 'Announce')
|
||||
const headers = buildGlobalHeaders(body)
|
||||
|
||||
const signatureOptions = baseHttpSignature()
|
||||
signatureOptions.headers = [ '(request-target)', '(created)', 'host', 'digest' ]
|
||||
|
||||
const { statusCode } = await makePOSTAPRequest(url, body, signatureOptions, headers)
|
||||
expect(statusCode).to.equal(HttpStatusCode.NO_CONTENT_204)
|
||||
})
|
||||
|
||||
it('Should succeed with a valid HTTP signature', async function () {
|
||||
const body = activityPubContextify(getAnnounceWithoutContext(servers[1]), 'Announce')
|
||||
const headers = buildGlobalHeaders(body)
|
||||
|
||||
Reference in New Issue
Block a user